Editing User:Wikiwide

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 69: Line 69:
[http://agvc.net.au/ Annual Autonomous Ground Vehicle Competition]
[http://agvc.net.au/ Annual Autonomous Ground Vehicle Competition]
-
 
-
==Keyword search: local page==
 
-
 
-
Copied from: [http://talk.maemo.org/showthread.php?t=25103 HOW-TO Keyword search in MicroB Browser] by q335r49
 
-
 
-
Edits: break-lines. Most of the script is barely readable.
 
-
 
-
Edits: list of search engines.
 
-
 
-
<source lang="html4strict">
 
-
<HTML>
 
-
<HEAD>
 
-
<SCRIPT LANGUAGE="JavaScript">
 
-
 
-
if( typeof(window.safeGet) != typeof(false) ) { window.safeGet = new Object(); }
 
-
 
-
function locclean( locvarcl, loctrue ) {
 
-
 
-
var locvarar = new Array(/\+/g,/%27/g,/%5C/g,/%0A/g,/%0D/g,/%0C/g,/%0B/g);
 
-
 
-
var varlocar = new Array(" ","\\'","\\\\","\\n","\\r","\\f","'+unescape('%0B' )+'");
 
-
 
-
var x;
 
-
 
-
if( loctrue ) { locvarar.length = 1; } //If I'm not using eval(), I only need to convert the +
 
-
 
-
for( x = 0; x < locvarar.length ; x++ ) {
 
-
locvarcl = locvarcl.replace( locvarar[x], varlocar[x] );
 
-
}
 
-
 
-
return unescape( locvarcl );
 
-
}
 
-
 
-
//returns the length of a valid string plus the whitespace around it
 
-
function findString(tempVal) {
 
-
 
-
if( tempVal.replace( /^\s*/, "" ).charAt( 0 ) != "'" && tempVal.replace( /^\s*/, "" ).charAt( 0 ) != '"' ) { return -1; }
 
-
 
-
//I did have a regular expression to detect valid strings but NS4 had a bug that made it fail.
 
-
var backSl = 0;
 
-
 
-
for( var y = 1; ( backSl % 2 || tempVal.replace( /^\s*/, "" ).charAt( y ) != tempVal.replace( /^\s*/, "" ).charAt( 0 ) ) && y < tempVal.length - 1; y++ ) {
 
-
 
-
if( !tempVal.replace( /^\s*/, "" ).charAt( y ).replace( /[\n\r\f]/, "" ) ) { return -1; }
 
-
 
-
if( tempVal.replace( /^\s*/, "" ).charAt( y ) == "\\" && ( tempVal.replace( /^\s*/, "" ).charAt( y + 1 ) == "\\" || tempVal.replace( /^\s*/, "" ).charAt( y + 1 ) == tempVal.replace( /^\s*/, "" ).charAt( 0 ) ) ) {
 
-
backSl++; } else { backSl = 0; }
 
-
 
-
}
 
-
 
-
if( y == 1 ) { y = 0; }
 
-
 
-
return y + 1 + ( tempVal.length - tempVal.replace( /^\s*/, "" ).length ) + ( tempVal.replace( /^\s*/, "" ).substr( y + 1 ).length - tempVal.replace( /^\s*/, "" ).substr( y + 1 ).replace( /^\s*/, "" ).length );
 
-
 
-
}
 
-
 
-
 
-
var lvTempVar = window.location.href.replace( /#.*/, "" ).replace(/'/g,'%27').replace( /&/g, "&window."+(safeGet?'safeGet.':'') ) + "&", getVars = new Array(), locvarx = 0, locvartemp = "";
 
-
 
-
if( lvTempVar.indexOf( "?" ) + 1 && lvTempVar.substr( lvTempVar.indexOf( "?" ) + 1 ).length > 1 ) {
 
-
 
-
//there are variables, what are they?
 
-
lvTempVar = ( "window." + (safeGet?'safeGet.':'') + lvTempVar.substr( lvTempVar.indexOf( "?" ) + 1 ) );
 
-
 
-
while( lvTempVar.indexOf( "&" ) + 1 ) {
 
-
 
-
locvartemp += locclean( lvTempVar.substr( 0, lvTempVar.indexOf( "=" ) ), true ) + lvTempVar.substring( lvTempVar.indexOf( "=" ), lvTempVar.indexOf( "&" ) + 1 );
 
-
 
-
lvTempVar = lvTempVar.substr( lvTempVar.indexOf( "&" ) + 1 );
 
-
 
-
} //that unescaped the variable names but not the contents
 
-
 
-
lvTempVar = "window";
 
-
 
-
while( locvartemp.length > 0 ) {
 
-
 
-
if( "^fdg".replace( /\W[\w\W]*/, "" ) ) { window.defaultStatus = "Browser bug detected. Script aborted without error."; break; }
 
-
 
-
if( locvartemp.charAt( locvartemp.search( /\W/ ) ) == "." ) {
 
-
//That last one was an object
 
-
 
-
if( typeof( eval( lvTempVar ) ) != "object" ) { eval( lvTempVar + " = new Object();" ); }
 
-
//this is a valid object. create it.
 
-
 
-
locvartemp = locvartemp.substr( locvartemp.indexOf( "." ) + 1 );
 
-
//add the next valid word to the text to be evaluated
 
-
 
-
lvTempVar += "." + locvartemp.substr( 0, locvartemp.search( /\W/ ) );
 
-
 
-
if( locvartemp.search( /[a-z_]/i ) != 0 ) { locvartemp = "&"; continue; }
 
-
//the . after an object MUST be followed by a-z, A-Z, _. Force safe failure
 
-
 
-
} else { if( locvartemp.charAt( locvartemp.search( /\W/ ) ) == "[" ) {
 
-
//That last one was an array
 
-
 
-
if( typeof( eval( lvTempVar ) ) != "object" ) { eval( lvTempVar + " = new Array();" ); }
 
-
 
-
if( locvartemp.charAt( locvartemp.indexOf( "[" ) + findString( locvartemp.substr( locvartemp.indexOf( "[" ) + 1 ) ) + 1 ) == "]" ) {
 
-
//they have used quotes.
 
-
 
-
lvTempVar += locvartemp.substr( locvartemp.indexOf( "[" ), findString( locvartemp.substr( locvartemp.indexOf( "[" ) + 1 ) ) + 2 );
 
-
//valid. Add [THEIR_STRING] to the text to be evaluated
 
-
 
-
locvartemp = locvartemp.substr( locvartemp.indexOf( "[" ) + findString( locvartemp.substr( locvartemp.indexOf( "[" ) + 1 ) ) + 2 );
 
-
 
-
} else {
 
-
//they should have used a number. Have they? If not, force safe failure
 
-
 
-
if( "" + parseInt( locvartemp.substring( locvartemp.indexOf( "[" ) + 1, locvartemp.indexOf( "]" ) ) ) + "" != locvartemp.substring( locvartemp.indexOf( "[" ) + 1, locvartemp.indexOf( "]" ) ).replace( /\s/g, "" ) || isNaN( parseInt( locvartemp.substring( locvartemp.indexOf( "[" ) + 1, locvartemp.indexOf( "]" ) ) ) ) ) { locvartemp = "&"; continue; }
 
-
 
-
lvTempVar += locvartemp.substring( locvartemp.indexOf( "[" ), locvartemp.indexOf( "]" ) + 1 );
 
-
//valid. Add [THEIR_NUM] to the text to be evaluated
 
-
 
-
locvartemp = locvartemp.substr( locvartemp.indexOf( "]" ) + 1 );
 
-
}
 
-
 
-
if( locvartemp.charAt( 0 ) != "[" && locvartemp.charAt( 0 ) != "." && locvartemp.charAt( 0 ) != "=" ) { locvartemp = "&"; continue; }
 
-
//the ] after an array MUST be followed by . or [ or =. Force safe failure
 
-
 
-
} else { if( locvartemp.charAt( locvartemp.search( /\W/ ) ) == "=" ) { //This is the end of the variable name
 
-
//this is a valid variable. create it/them.
 
-
 
-
eval( lvTempVar + " = '" + locclean( locvartemp.substring( locvartemp.indexOf( "=" ) + 1, locvartemp.indexOf( "&" ) ) ) + "';" );
 
-
 
-
if( window.useArray ) { //they want the getVars array. Fill it up
 
-
getVars[lvTempVar.replace( (safeGet?/window\.safeGet\./:/window\./), "" )] = locclean( locvartemp.substring( locvartemp.indexOf( "=" ) + 1, locvartemp.indexOf( "&" ) ), true );
 
-
 
-
getVars[locvarx] = locclean( locvartemp.substring( locvartemp.indexOf( "=" ) + 1, locvartemp.indexOf( "&" ) ), true );
 
-
 
-
locvarx++;
 
-
}
 
-
 
-
//prepare to use the next variable
 
-
locvartemp = locvartemp.substr( locvartemp.indexOf( "&" ) + 1 );
 
-
 
-
lvTempVar = locvartemp.substr( 0, locvartemp.search( /\W/ ) );
 
-
 
-
} else { //safe failure
 
-
 
-
window.defaultStatus = "Invalid variable format. Script aborted without error.";
 
-
 
-
getVars = new Array(); //remove older answers
 
-
 
-
break; //They have put in a variable that does not have a valid name format. abort.
 
-
}
 
-
}
 
-
}
 
-
}
 
-
}
 
-
locvartemp = null; lvTempVar = null; locvarx = null; //clear up
 
-
 
-
i = safeGet.q.indexOf(" ")
 
-
 
-
engine = safeGet.q.substr(0,i)
 
-
 
-
term = safeGet.q.substr(i+1)
 
-
 
-
switch (engine) {
 
-
case "g": SearchSite = "https://www.google.com/search?q=%s"; break
 
-
case "wp": SearchSite = "https://en.wikipedia.org/wiki/search?search=%s&go=Go"; break
 
-
case "az": SearchSite = "https://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=%s&x=0&y=0"; break
 
-
case "tl": SearchSite= "https://www.teamliquid.net/tlpd/search.php?search=%s&type=all&x=18&y=7"; break
 
-
case "d": SearchSite = "https://dictionary.reference.com/browse/%s";break
 
-
case "itt": SearchSite = "https://www.internettablettalk.com/search/results.html?cx=partner-pub-1540416982644573%3As1i8nedfnqe&cof=FORID%3A9&q=%s& sa=Go"; break
 
-
case "ma": SearchSite = "https://search.maemo.org/search?q=%s&btnG=Search&site=maemo-org&client=maemo-org&proxystylesheet=maemo-org&output=xml_no_dtd"; break
 
-
case "qr": SearchSite = "./QrCodeR.html?q=%s"; break
 
-
case "ssh": SearchSite = "./FireSSH.html?q=%s"; break
 
-
case "om": SearchSite = "https://www.openstreetmap.org/search?query=%s"; break
 
-
default: SearchSite= ""
 
-
}
 
-
window.location = SearchSite.replace("%s",term)
 
-
</SCRIPT>
 
-
</HEAD>
 
-
</HTML>
 
-
</source>
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)