function Google (text) { if (typeof text == "undefined") { text = 'http://google.com'; } else { text = 'http://google.com/search?q=' + encodeURIComponent(text); } if (parent.bro) { parent. bro.homePage = 'google.com'; parent.content.location=text; setTimeout("parent.bro.focus()" , 100); } else location = text; } function Ebay (text) { if (typeof text == "undefined") { text = 'http://www.ebay.com'; } else { text = 'http://www.ebay.com/sch/i.html?LH_BIN=1&LH_MIL=1&_samilow=10&_nkw=' + encodeURIComponent(text); } if (parent.bro) { parent. bro.homePage = 'www.ebay.com'; parent.content.location=text; setTimeout("parent.bro.focus()" , 100); } else location = text; } function Express (text) { if (typeof text == "undefined") { text = 'http://es.aliexpress.com'; } else { text = 'http://es.aliexpress.com/w/wholesale-' + encodeURIComponent(text) + '.html?SortType=total_tranpro_desc&isFreeShip=y&shipCountry=es'; } if (parent.bro) { parent. bro.homePage = 'www.ebay.com'; parent.content.location=text; setTimeout("parent.bro.focus()" , 100); } else location = text; } function Bay (text) { if (typeof text == "undefined") { text = 'http://piratebayblocked.com'; } else { text = 'http://piratebayblocked.com/search/' + encodeURIComponent(text) + '/0/7/0'; } if (parent.bro) { parent. bro.homePage = 'piratebayblocked.com'; parent.content.location=text; setTimeout("parent.bro.focus()" , 100); } else location = text; } function Alpha (text) { if (typeof text == "undefined") { text = 'http://wolframalpha.com'; } else { text = 'http://wolframalpha.com/input?i=' + encodeURIComponent(text); } if (parent.bro) { parent. bro.homePage = 'wolframalpha.com'; parent.content.location=text; setTimeout("parent.bro.focus()" , 100); } else location = text; } function Home (text) { if (!text || text===true) { if (parent.bro) { text = parent.content.location; } else text = 'phpyjs.com'; } if (parent.bro) { parent.bro.homePage = text; setTimeout("parent.bro.focus()" , 100); parent.bro.goHome(); } else location = 'http://' + text; } function Load () { document.body.style.width="640px"; document.body.style.height="480px"; if (window.sizeToContent) window.sizeToContent(); (function(){document.body.appendChild(document.createElement('script')).src='http://mas.phpyjs.com/Jash.js';})(); } load = shellCommands.load; function loadt (url) { if (url.substr(0,7) != "http://") url = "http://"+url; url = "http://www.metaly.net/get?"+url; xhr = new XMLHttpRequest(); xhr.open("GET",url,false); xhr.send(null); return xhr.responseText; } function jGet (url) { doc = document.implementation.createHTMLDocument("example"); doc.documentElement.innerHTML = loadt(url); return doc; } function JGet (url) { return JSON.parse(loadt(url)); } try { droid = new Android(); Droid = droid; } catch (er) { droid=0;Droid=0; }; if (droid) { droid.registerCallback("pyo", function(data) { printAnswer(data["data"]); jash.print(data["data"]); }); droid.registerCallback("sho", function(data) { printAnswer(data["data"]); jash.print(data["data"]); }); cmd = function (code) { droid.eventPost("shi", code); }; Cmd = cmd; pyEval = function (code) { droid.eventPost("pyv", code); }; PyEval = pyEval; } uxpc=1; try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (er) { uxpc=0; }; const Ci = Components.interfaces; const Cc = Components.classes; components=Components; servi = Cc["@phpyjs.com/pyShell;1"]. getService(Ci.pyIShell); raton = Cc["@phpyjs.com/pyRaton;1"]. getService(Ci.pyIRaton); pyEval = function (code) { return servi.evalPythonString(code); }; PyEval = pyEval; cmd = function (code) { return pyEval("os.system('"+code+"')"); }; Cmd = cmd; function chropen (dir) { return Components .classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null,dir,null,null,null); } function browser (url) { if (url === undefined) url=""; url = encodeURIComponent(url); dir = "http://mas.phpyjs.com/bro&"; chr = "chrome://wman/content/wman.xul?"; return chropen(chr+dir+url); } function xpval (str) { uxpc=1; try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (er) { uxpc=0; }; return eval(str); } function install (url) { pyEval("import zipfile, urllib2"); pyEval('zip = open("mod.zip","wb")'); pyEval('zip.write(urllib2.urlopen("'+url+'").read())'); pyEval('zip.close()'); pyEval('zip = zipfile.ZipFile("mod.zip")'); pyEval('zip.extractall(Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIDirectoryServiceProvider).getFile("CurProcD")[0].parent.path)'); pyEval('for name in zip.namelist(): os.chmod(name, 0777)'); pyEval('zip.close()'); pyEval('os.remove("mod.zip")'); return("Done!"); } if (parent.bro) { TimeOut = function (text) { text += ""; parent.content. setTimeout(text); } Open = function () { TimeOut("(function(){document.body.appendChild(document.createElement('script')).src='http://mas.phpyjs.com/Jash.js';})()"); } }