rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
this.menu2 = document.getElementById("userscript-commands-sb2"); this.menuPopup2 = this.menu2.firstChild; this.menuItems2 = [];
function GM_MenuCommander() { GM_log("> GM_MenuCommander") this.menu = document.getElementById("userscript-commands-sb"); this.keyset = document.getElementById("mainKeyset"); this.menuPopup = this.menu.firstChild; this.menuItems = []; this.keys = []; this.attached = false; GM_log("< GM_MenuCommander")}
function GM_MenuCommander() {
function GM_MenuCommander(contentWindow) {
function GM_MenuCommander() { GM_log("> GM_MenuCommander") this.menu = document.getElementById("userscript-commands"); this.keyset = document.getElementById("mainKeyset"); this.menuPopup = this.menu.firstChild; this.menuItems = []; this.keys = []; this.attached = false; GM_log("< GM_MenuCommander")}
this.contentWindow = contentWindow;
function GM_MenuCommander() { GM_log("> GM_MenuCommander") this.menu = document.getElementById("userscript-commands"); this.keyset = document.getElementById("mainKeyset"); this.menuPopup = this.menu.firstChild; this.menuItems = []; this.keys = []; this.attached = false; GM_log("< GM_MenuCommander")}
this.contentWindow = contentWindow;
function GM_MenuCommander(contentWindow) { GM_log("> GM_MenuCommander") this.menu = document.getElementById("userscript-commands"); this.keyset = document.getElementById("mainKeyset"); this.menuPopup = this.menu.firstChild; this.contentWindow = contentWindow; this.menuItems = []; this.keys = []; this.attached...
if (oldScriptsDir.exists()) {
if (oldScriptsDir.exists() && oldConfigFile.exists()) {
function GM_pointFourMigrate() { GM_log("> GM_pointFourMigrate"); try { // the following code was copied directly from the old getContentDir() and // getScriptsDir() functions var profDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interface...
GM_log("new config file exists: " + newConfigFile.exists());
function GM_pointFourMigrate() { GM_log("> GM_pointFourMigrate"); try { // the following code was copied directly from the old getContentDir() and // getScriptsDir() functions var profDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interface...
if (!newScriptDir.exists()) { oldScriptsDir.moveTo(newScriptDir.parent);
if (!newScriptsDir.exists()) { oldScriptsDir.moveTo(newScriptsDir.parent, newScriptsDir.leafName);
function GM_pointFourMigrate() { GM_log("> GM_pointFourMigrate"); try { // the following code was copied directly from the old getContentDir() and // getScriptsDir() functions var profDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interface...
alert("Could not complete Greasemonkey 0.4 migration. See JS Console " + "for error details.");
alert("Could not complete Greasemonkey 0.4 migration. Error:\n\n" + e);
function GM_pointFourMigrate() { GM_log("> GM_pointFourMigrate"); try { // the following code was copied directly from the old getContentDir() and // getScriptsDir() functions var profDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interface...
oldScriptsDir.moveTo(newScriptsDir.parent, newScriptsDir.leafName);
oldScriptsDir.copyTo(newScriptsDir.parent, newScriptsDir.leafName); try { } catch (e) { }
function GM_pointFourMigrate() { GM_log("> GM_pointFourMigrate"); try { // the following code was copied directly from the old getContentDir() and // getScriptsDir() functions var profDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interface...
if (!getScriptFile("config.xml").exists()) {
var configExists = GM_getPointThreeScriptFile("config.xml").exists(); GM_log("config file exists: " + configExists); if (!configExists) {
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
GM_log("Starting 0.3 migration...");
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
var scriptDir = getScriptDir();
var scriptDir = GM_getPointThreeScriptDir();
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
doc.load(getScriptChrome("config.xml"));
doc.load(configURI.spec);
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
var configStream = getWriteStream(getScriptFile("config.xml"));
var configStream = getWriteStream(configFile);
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
var config = new Config();
var config = new Config(GM_getPointThreeScriptFile("config.xml"));
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
scriptFile = getScriptFile(script.filename);
scriptFile = GM_getPointThreeScriptFile(script.filename);
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
} finally { GM_log("< GM_pointThreeMigrate");
function GM_pointThreeMigrate() { // check to see whether there's any config to migrate if (!getScriptFile("config.xml").exists()) { return; } GM_log("Starting 0.3 migration..."); // back up the config directory // if an error happens, report it and exit try { var scriptDir = getScriptDir(); var tempD...
registerMenuCommand(docId, commandName, commandCallback, accel, access);
registerMenuCommand(docId, commandName, commandCallback, accel, access, e.explicitOriginalTarget.defaultView);
e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access); };
document.GM_registerMenuCommand =
e.view.GM_registerMenuCommand =
document.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); };
function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback);
function(commandName, commandCallback, accel, access) { registerMenuCommand(docId, commandName, commandCallback, accel, access);
e.explicitOriginalTarget.defaultView.GM_registerMenuCommand = function(commandName, commandCallback) { registerMenuCommand(docId, commandName, commandCallback); };
var namespace = script.namespace; if (namespace.substring(namespace.length - 1) != "/") { namespace += "/"; }
function GM_ScriptStorage(script) { var namespace = script.namespace; if (namespace.substring(namespace.length - 1) != "/") { namespace += "/"; } this.prefMan = new GM_PrefManager(["scriptvals.", namespace, "/", ...
namespace,
script.namespace,
function GM_ScriptStorage(script) { var namespace = script.namespace; if (namespace.substring(namespace.length - 1) != "/") { namespace += "/"; } this.prefMan = new GM_PrefManager(["scriptvals.", namespace, "/", ...
var foundScript = false;
var foundInjectedScript = false;
function GM_showPopup(aEvent) { var config = new Config(getScriptFile("config.xml")); config.load(); var popup = aEvent.target; var url = getBrowser().contentWindow.document.location.href; // set the enabled/disabled state GM_BrowserUI.statusEnabledItem.setAttribute("checked", GM_getEnabled()); // remove all the...
.getService(Components.interfaces.nsIExtensionManager);
if( extensionManager ) { extensionManager = extensionManager.getService(Components.interfaces.nsIExtensionManager);
function GM_updateVersion(prefMan) { var extensionManager = Components.classes["@mozilla.org/extensions/manager;1"] .getService(Components.interfaces.nsIExtensionManager); // get the currently installed version according to extension manager if (extensionManager.getItemForID) { var installed = extensionManager....
if (extensionManager.getItemForID) { var installed = extensionManager.getItemForID(GUID).version; } else { installed = extensionManager .getItemList(GUID, Components.interfaces.nsIUpdateItem.TYPE_EXTENSION,{})[0].version;
if (extensionManager.getItemForID) { var installed = extensionManager.getItemForID(GUID).version; } else { installed = extensionManager .getItemList(GUID, Components.interfaces.nsIUpdateItem.TYPE_EXTENSION,{})[0].version; }
function GM_updateVersion(prefMan) { var extensionManager = Components.classes["@mozilla.org/extensions/manager;1"] .getService(Components.interfaces.nsIExtensionManager); // get the currently installed version according to extension manager if (extensionManager.getItemForID) { var installed = extensionManager....
GM_prefRoot.setValue("version", "0.4.9.9");
GM_prefRoot.setValue("version", "0.5");
function GM_updateVersion() { GM_log("> GM_updateVersion"); // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version", "0.0"); if (GM_compareVersions(initialized, "0.3") < 0) { GM_pointThreeMigrate(); } if (GM_compareVersions(initialized, "0.4.2") < 0) { ...
if (GM_compareVersions(initialized, "0.3") < 0) {
if (!GM_versionIsGreaterOrEqual(initialized, "0.3")) {
function GM_updateVersion() { GM_log("> GM_updateVersion"); // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version", "0.0"); if (GM_compareVersions(initialized, "0.3") < 0) { GM_pointThreeMigrate(); } if (GM_compareVersions(initialized, "0.4.2") < 0) { ...
if (GM_compareVersions(initialized, "0.4.2") < 0) {
if (!GM_versionIsGreaterOrEqual(initialized, "0.4.2")) {
function GM_updateVersion() { GM_log("> GM_updateVersion"); // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version", "0.0"); if (GM_compareVersions(initialized, "0.3") < 0) { GM_pointThreeMigrate(); } if (GM_compareVersions(initialized, "0.4.2") < 0) { ...
var initialized = GM_prefRoot.getValue("version");
var initialized = GM_prefRoot.getValue("version", "0.0");
function GM_updateVersion() { // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version"); // for now, we don't have to do any schmancy version comparisons because // we never had versions before. if (!initialized) { GM_pointThreeMigrate(); } // update th...
if (!initialized) {
if (GM_compareVersions(initialized, "0.3") < 0) {
function GM_updateVersion() { // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version"); // for now, we don't have to do any schmancy version comparisons because // we never had versions before. if (!initialized) { GM_pointThreeMigrate(); } // update th...
GM_prefRoot.setValue("version", "0.4.1");
GM_prefRoot.setValue("version", "0.4.2"); GM_log("< GM_updateVersion");
function GM_updateVersion() { // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version"); // for now, we don't have to do any schmancy version comparisons because // we never had versions before. if (!initialized) { GM_pointThreeMigrate(); } // update th...
GM_prefRoot.setValue("version", "0.5.1");
GM_prefRoot.setValue("version", "0.5.2");
function GM_updateVersion() { GM_log("> GM_updateVersion"); // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version", "0.0"); if (!GM_versionIsGreaterOrEqual(initialized, "0.3")) { GM_pointThreeMigrate(); } if (!GM_versionIsGreaterOrEqual(initialized, "0...
GM_prefRoot.setValue("version", "0.4.2");
GM_prefRoot.setValue("version", "0.4.9.9");
function GM_updateVersion() { GM_log("> GM_updateVersion"); // this is the last version which has been run at least once var initialized = GM_prefRoot.getValue("version", "0.0"); if (GM_compareVersions(initialized, "0.3") < 0) { GM_pointThreeMigrate(); } if (GM_compareVersions(initialized, "0.4.2") < 0) { ...
this.host='gnats.bbsdev.net';
this.host='bugs.synchro.net';
function GNATS(host,user,pass,email){ // Properties if(host == undefined) this.host='gnats.bbsdev.net'; else this.host=host; if(user == undefined) this.user=guest; else this.user=user; if(pass == undefined) this.pass='' else this.pass=pass; if(email==undefined) this.email='bugs@'+this.host; else this.email=emai...
email='bugs@'+this.host;
this.email='bugs@'+this.host;
function GNATS(host,user,pass,email){ // Properties if(host == undefined) this.host='gnats.bbsdev.net'; else this.host=host; if(user == undefined) this.user=guest; else this.user=user; if(pass == undefined) this.pass='' else this.pass=pass; if(email==undefined) email='bugs@'+this.host; else this.email=email; th...
if(!this.expect("APPN",210,213))
if(!this.expect("APPN2",210,213))
function GNATS_append(pr,field,newval,reason){ if(!this.cmd("APPN",pr,field)) return(false); if(!this.expect("APPN",212)) return(false); lines=newval.split(/\r?\n/); for(i=0; i<lines.length; i++) { if(!this.socket.send(lines[i].replace(/^\./,'..')+"\r\n")) { this.error="Error sending data"; this.close(); retur...
if(!expect("APPN",210))
if(!this.get_response()) return(false); if(!expect("APPN3",210))
function GNATS_append(pr,field,newval,reason){ if(!this.cmd("APPN",pr,field)) return(false); if(!this.expect("APPN",212)) return(false); lines=newval.split(/\r?\n/); for(i=0; i<lines.length; i++) { if(!this.socket.send(lines[i].replace(/^\./,'..')+"\r\n")) { this.error="Error sending data"; this.close(); retur...
note += field+'-Changed-Why:\r\n";
note += field+'-Changed-Why:\r\n';
function GNATS_change_field(pr,field,newval,why){ var old; var note=''; if(!this.set_qfmt('"%s" '+field)) return(false); if(!this.set_expr("Number=="+pr)) return(false); old=this.get_result(); if(old==undefined) return(false); if(old==newval) return(false); if(!this.replace(pr,field,newval)) return(false); note +=...
var send=arguments.join(" ")+"\r\n";
var send; var i; var args=new Array();
function GNATS_cmd(){ var send=arguments.join(" ")+"\r\n"; if(!this.socket.is_connected) { this.error="Socket not connected"; return(false); } this.socket.send(send); return(this.get_response);}
this.socket.send(send); return(this.get_response);
if(!this.socket.send(send)) { this.error="Error sending on socket"; return(false); } return(this.get_response());
function GNATS_cmd(){ var send=arguments.join(" ")+"\r\n"; if(!this.socket.is_connected) { this.error="Socket not connected"; return(false); } this.socket.send(send); return(this.get_response);}
lines.pop();
function GNATS_connect(){ this.socket.connect(this.host,1529); if(!this.socket.is_connected) { this.error="Cannot connect to GNATS database"; return(false); } if(!this.get_response()) return(false); if(!this.expect("CONNECT",200)) return(false); if(!this.cmd("USER",this.user,this.pass)) return(false); if(!this.exp...
if(!this.expect("USER",210);
if(!this.expect("USER",210))
function GNATS_connect(){ this.socket.connect(this.host,1529); if(!this.socket.is_connected) { this.error="Cannot connect to GNATS database"; return(false); } if(!this.get_response()) return(false); if(!this.expect("CONNECT",200)) return(false); if(!this.cmd("USER",this.user,this.pass)) return(false); if(!this.exp...
for(i=1; i<arguments.length; i++) { if(this.response.code == arguments[i])
var args=new Array(); var desc; desc=arguments[0]; for(i=1; i<arguments.length; i++) args.push(arguments[i]); for(i=0; i<args.length; i++) { if(this.response.code == args[i])
function GNATS_expect(){ var i; for(i=1; i<arguments.length; i++) { if(this.response.code == arguments[i]) return(true); } this.error=arguments.unshift()+" expected "+arguments.join(" or ")+"\r\n"+this.response.message; return(false);}
this.error=arguments.unshift()+" expected "+arguments.join(" or ")+"\r\n"+this.response.message;
this.error=desc+" expected "+args.join(" or ")+" got "+this.response.code+"\r\n"+this.response.message;
function GNATS_expect(){ var i; for(i=1; i<arguments.length; i++) { if(this.response.code == arguments[i]) return(true); } this.error=arguments.unshift()+" expected "+arguments.join(" or ")+"\r\n"+this.response.message; return(false);}
if(!this.set_expr("State==State"));
if(!this.set_expr("State==State"))
function GNATS_get_fullpr(num){ if(!this.reset_expr()) // Reset current expression. return(undefined); if(!this.set_expr("State==State")); // Select all PRs return(undefined); if(!this.set_qfmt("full")) // Request full PR return(undefined); if(!this.cmd("QUER",num)) // Get PR return(undefined); if(!this.expect("...
resp.raw+=this.socket.recvline(); m=resp.raw.match(/^([0-9]{3})([- ])(.*)$/);
line=this.socket.recvline(); this.response.raw += line; m=line.match(/^([0-9]{3})([- ])(.*)$/);
function GNATS_get_response(){ var line; var m; this.error=''; this.response.message=''; this.response.text=''; this.response.raw=''; this.response.code=0; this.response.type=PR_ERROR; if(!this.socket.is_connected) { this.error="Socket not connected"; return(false); } while(!done) { if(this.socket.poll(30)) { resp...
if(!this.expect("REPL",210,213))
if(!this.expect("REPL2",210,213,403))
function GNATS_replace(pr,field,newval,reason){ if(!this.cmd("REPL",pr,field)) return(false); if(!this.expect("REPL",212)) return(false); lines=newval.split(/\r?\n/); for(i=0; i<lines.length; i++) { if(!this.socket.send(lines[i].replace(/^\./,'..')+"\r\n")) { this.error="Error sending data"; this.close(); retu...
if(!expect("REPL",210))
if(!this.get_response()) return(false); if(!this.expect("REPL3",210))
function GNATS_replace(pr,field,newval,reason){ if(!this.cmd("REPL",pr,field)) return(false); if(!this.expect("REPL",212)) return(false); lines=newval.split(/\r?\n/); for(i=0; i<lines.length; i++) { if(!this.socket.send(lines[i].replace(/^\./,'..')+"\r\n")) { this.error="Error sending data"; this.close(); retu...
recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; hdrs.rcpt_list = new Array(); hdrs.rcpt_list.push(recip); var orig=this.get_field(pr,'Reply-To'); recip = new Object;
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; hdrs.rcpt_list = new Array(); hdrs.rcpt_list.push(recip); var orig=this.get_field(pr,'Reply-To'); recip = new Object...
if(!this.set_qfmt('"Re: %s/%d: %s" Category Number Synopsis'));
if(!this.set_qfmt('"Re: %s/%d: %s" Category Number Synopsis'))
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; hdrs.rcpt_list = new Array(); hdrs.rcpt_list.push(recip); var orig=this.get_field(pr,'Reply-To'); recip = new Object...
this.error=msgbase.error;
this.error='Error saving message: '+msgbase.error; msgbase.close();
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; hdrs.rcpt_list = new Array(); hdrs.rcpt_list.push(recip); var orig=this.get_field(pr,'Reply-To'); recip = new Object...
msgbase.close();
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; hdrs.rcpt_list = new Array(); hdrs.rcpt_list.push(recip); var orig=this.get_field(pr,'Reply-To'); recip = new Object...
var recips = new Array();
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var rcpt_list = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; var orig=this.get_field(pr,'Reply-To'); var recip = new Object; recip.to=mail_get_name(...
recip.to='bugs';
recip.to=mail_get_name(this.email);
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var rcpt_list = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; var orig=this.get_field(pr,'Reply-To'); var recip = new Object; recip.to=mail_get_name(...
recip.to_net_addr=this.email;
recip.to_net_addr=mail_get_address(this.email); rcpt_list.push(recip);
function GNATS_send_followup(pr,name,from,message){ var hdrs = new Object; var recips = new Array(); var rcpt_list = new Array(); var recip = new Object; recip.to='bugs'; recip.to_net_type=NET_INTERNET; recip.to_net_addr=this.email; var orig=this.get_field(pr,'Reply-To'); var recip = new Object; recip.to=mail_get_name(...
if(!this.cmd("EXPR",arguments.join(" "))
if(!this.cmd("EXPR",args.join(" ")))
function GNATS_set_expr(){ if(!this.reset_expr()) return(false); if(!this.cmd("EXPR",arguments.join(" ")) return(false); if(!this.expect("EXPR",210)) return(FALSE); return(true);}
if(!this.cmd("QFMT",format)
if(!this.cmd("QFMT",format))
function GNATS_set_qfmt(format){ if(format==undefined) format="standard"; if(!this.cmd("QFMT",format) return(false); if(!this.expect("QFMT",210)) return(FALSE); return(true);}
if (c > 500) { console.log("avg " + miss_c/c + "ms per frame (" + now_playing + ")");
if (c > 750) { console.log("avg " + Math.round(miss_c/c) + "ms per frame, frame rate needs " + (1000/FRAME_RATE));
function go() { var d = (new Date).getTime(); miss_c+=d-next_frame; next_frame = d+1000/FRAME_RATE; c++; if (now_playing[0][1] <= 0) { now_playing.splice(0,1); } if (c > 500) { console.log("avg " + miss_c/c + "ms per frame (" + now_playing + ")"); if (now_playing.length == 1) { var keys = Object....
if (p[0] == keys[k]) {
if (now_playing[p][0] === keys[k]) {
function go() { var d = (new Date).getTime(); miss_c+=d-next_frame; next_frame = d+1000/FRAME_RATE; c++; if (now_playing[0][1] <= 0) { now_playing.splice(0,1); } if (c > 500) { console.log("avg " + miss_c/c + "ms per frame (" + now_playing + ")"); if (now_playing.length == 1) { var keys = Object....
global.gc();
function go() { var d = (new Date).getTime(); miss_c+=d-next_frame; next_frame = d+1000/FRAME_RATE; c++; if (now_playing[0][1] <= 0) { now_playing.splice(0,1); } if (c > 500) { console.log("avg " + miss_c/c + "ms per frame (" + now_playing + ")"); if (now_playing.length == 1) { var keys = Object....
kinds = parent.frames["navigationFrame"].document.getElementById("kinds") oldLocation = parent.frames["classesFrame"].window.location.href
kinds = parent.navigationFrame.document.getElementById("kinds") oldLocation = parent.classesFrame.window.location.href
function goto() { kinds = parent.frames["navigationFrame"].document.getElementById("kinds") oldLocation = parent.frames["classesFrame"].window.location.href //alert("oldLocation="+oldLocation); pos = oldLocation.lastIndexOf("#") classesURL = (pos > 0) ? oldLocation.substring(0, pos) : oldLocation; newLocation = c...
parent.frames["classesFrame"].window.location = newLocation;
parent.classesFrame.window.location = newLocation;
function goto() { kinds = parent.frames["navigationFrame"].document.getElementById("kinds") oldLocation = parent.frames["classesFrame"].window.location.href //alert("oldLocation="+oldLocation); pos = oldLocation.lastIndexOf("#") classesURL = (pos > 0) ? oldLocation.substring(0, pos) : oldLocation; newLocation = c...
function Graphic(width,height,attribute,char)
function Graphic(w,h,attr,ch)
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
if(char==undefined) this.char=' ';
if(ch==undefined) this.ch=' ';
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.char=char; if(attribute==undefined)
this.ch=ch; if(attr==undefined)
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.attribute=attribute; if(height==undefined)
this.attribute=attr; if(h==undefined)
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.height=height; if(width==undefined)
this.height=h; if(w==undefined)
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.width=width;
this.width=w;
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.data=new Array(width,height);
this.data=new Array(w);
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.data[x][y].char=char; this.data[x][y].attr=attribute;
this.data[x][y].ch=ch; this.data[x][y].attr=attr;
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.load=Graphic_load;
function Graphic(width,height,attribute,char){ if(char==undefined) this.char=' '; else this.char=char; if(attribute==undefined) this.attribute=7; else this.attribute=attribute; if(height==undefined) this.height=24; else this.height=height; if(width==undefined) this.width=80; else this.width=width; this.data=new...
this.scroll=Graphic_scroll; this.putmsg=Graphic_putmsg;
function Graphic(w,h,attr,ch){ if(ch==undefined) this.ch=' '; else this.ch=ch; if(attr==undefined) this.attribute=7; else this.attribute=attr; if(h==undefined) this.height=24; else this.height=h; if(w==undefined) this.width=80; else this.width=w; this.data=new Array(w); var x; var y; for(y=0; y<this.height; y++...
if(xpos+width > console.screen_columns || ypos+height > console.screen_rows) {
if(xpos+width-1 > console.screen_columns || ypos+height-1 > console.screen_rows) {
function Graphic_draw(xpos,ypos,width,height,xoff,yoff){ var x; var y; if(xpos==undefined) xpos=1; if(ypos==undefined) ypos=1; if(width==undefined) width=this.width; if(height==undefined) height=this.height; if(xoff==undefined) xoff=0; if(yoff==undefined) yoff=0; if(xoff+width > this.width || yoff+height > this.h...
gotoxy(xpos,ypos+y);
console.gotoxy(xpos,ypos+y);
function Graphic_draw(xpos,ypos,width,height,xoff,yoff){ var x; var y; if(xpos==undefined) xpos=1; if(ypos==undefined) ypos=1; if(width==undefined) width=this.width; if(height==undefined) height=this.height; if(xoff==undefined) xoff=0; if(yoff==undefined) yoff=0; if(xoff+width > this.width || yoff+height > this.h...
console.write(this.data[x+xoff][y+yoff].char;
console.write(this.data[x+xoff][y+yoff].ch);
function Graphic_draw(xpos,ypos,width,height,xoff,yoff){ var x; var y; if(xpos==undefined) xpos=1; if(ypos==undefined) ypos=1; if(width==undefined) width=this.width; if(height==undefined) height=this.height; if(xoff==undefined) xoff=0; if(yoff==undefined) yoff=0; if(xoff+width > this.width || yoff+height > this.h...
alert("Attempt to draw from outside of graphic");
alert("Attempt to draw from outside of graphic: "+xoff+":"+yoff+" "+width+"x"+height+" "+this.width+"x"+this.height);
function Graphic_draw(xpos,ypos,width,height,xoff,yoff){ var x; var y; if(xpos==undefined) xpos=1; if(ypos==undefined) ypos=1; if(width==undefined) width=this.width; if(height==undefined) height=this.height; if(xoff==undefined) xoff=0; if(yoff==undefined) yoff=0; if(xoff+width > this.width || yoff+height > this.h...
if(!(f.open("rb",true))
if(!(f.open("rb",true)))
function Graphic_load(filename){ var x; var y; var f=new File(filename); if(!(f.open("rb",true)) return(false); for(y=0; y<this.height; y++) { for(x=0; x<this.width; x++) { this.data[x][y]=new Object; if(f.eof) return(false); this.data[x][y].ch=f.read(1); if(f.eof) return(false); this.data[x][y].attr=...
ch=txt.substr(p++,1);
ch=txt.substr(p++,1).toUpperCase();
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; var x=xpos-1; var y=ypos-1; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo:...
if(scroll && y==this.height) {
if(scroll && y>=this.height) {
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; var x=xpos-1; var y=ypos-1; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo:...
curattr=(curattr)&0x8f;
curattr=(curattr)&0xf8;
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; var x=xpos-1; var y=ypos-1; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo:...
curattr=((curattr)&0xff)|RED;
curattr=((curattr)&0xf8)|RED;
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; var x=xpos-1; var y=ypos-1; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo:...
this.data[x][y].ch=txt.substr(p,1);
this.data[x][y].ch=ch;
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; var x=xpos-1; var y=ypos-1; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo:...
var x=xpos-1; var y=ypos-1;
function Graphic_putmsg(xpos, ypos, txt, attr, scroll){ var curattr=attr; var ch; if(curattr==undefined) curattr=this.attribute; /* Expand @-codes */ txt=txt.replace(/@(.*)@/g, function (str, code, offset, s) { return bbs.atcode(code); } ); /* ToDo: Expand \1D, \1T, \1<, \1Z */ /* ToDo: "Expand" (ie: remove from s...
for(y=height-lines; y<this.height; y++) {
for(y=this.height-lines; y<this.height; y++) {
function Graphic_scroll(lines){ var x; var y; if(lines<1) /* Do not (yet... ToDo) allow negative scroll */ return; for(y=lines; y<this.height; y++) { for(x=0; x<this.width; x++) { this.data[x][y-lines].ch=this.data[x][y].ch; this.data[x][y-lines].attr=this.data[x][y].attr; } } for(y=height-lines; y<this.height; ...
this.data[x][y-lines].ch=this.ch; this.data[x][y-lines].attr=this.attribute;
this.data[x][y].ch=this.ch; this.data[x][y].attr=this.attribute;
function Graphic_scroll(lines){ var x; var y; if(lines<1) /* Do not (yet... ToDo) allow negative scroll */ return; for(y=lines; y<this.height; y++) { for(x=0; x<this.width; x++) { this.data[x][y-lines].ch=this.data[x][y].ch; this.data[x][y-lines].attr=this.data[x][y].attr; } } for(y=height-lines; y<this.height; ...
this.data[x][y].ch=txt.substr(p,1);
this.data[x][y].ch=txt.substr(p++,1);
function Graphic_write(xpos, ypos, txt, attr){ var x=xpos-1; var y=ypos-1; var p=0; while(p<txt.length && x<this.width && y<this.height) { this.data[x][y].ch=txt.substr(p,1); if(attr!=undefined) this.data[x][y].attr=attr; x++; if(x>=this.width) { x=0; y++; } }}
while(p<txt.length && x<=this.width && y<=this.height) {
while(p<txt.length && x<this.width && y<this.height) {
function Graphic_write(xpos, ypos, txt, attr){ var x=xpos-1; var y=ypos-1; var p=0; while(p<txt.length && x<=this.width && y<=this.height) { this.data[x][y].ch=txt.substr(p,1); if(attr!=undefined) this.data[x][y].attr=attr; x++; if(x>=this.width) { x=0; y++; } }}
list[i].checked = false;
list[i].checked = false; }
function GridSphere_CheckBoxList_checkOne(list) { // alert("GridSphere CheckBoxList Check One"); // Uncheck "all" option list[0].checked = false; // Uncheck those that don't match selection for (i = 1; i < list.length; i++) { if (list[i].value != list[0].value) { list[i].checked = false; ...
}
function GridSphere_CheckBoxList_checkOne(list) { // alert("GridSphere CheckBoxList Check One"); // Uncheck "all" option list[0].checked = false; // Uncheck those that don't match selection for (i = 1; i < list.length; i++) { if (list[i].value != list[0].value) { list[i].checked = false; ...
alert("GridSphere CheckBoxList Clear");
function GridSphere_CheckBoxList_clear(list) { // alert("GridSphere CheckBoxList Clear"); for (i = 0; i < list.length; i++) { list[i].checked = false; } // Clear selected value list[0].value = ""; }
if (newSelection.checked == true) {
function GridSphere_CheckBoxList_onClick(list, newSelection) { // alert("GridSphere CheckBoxList On Click"); // alert("GridSphere CheckBoxList current selection: " + list[0].value); if (newSelection.checked == true) { // Save selection only if none made yet if (list[0].value == "") { list[0...
if (newSelection.checked == true) {
if (list[0].value == "") {
function GridSphere_CheckBoxList_onClick(list, newSelection) { // alert("GridSphere CheckBoxList On Click"); // alert("GridSphere CheckBoxList current selection: " + list[0].value); if (newSelection.checked == true) { // Save selection only if none made yet if (list[0].value == "") { list[0...
if (list[0].value == "") {
list[0].value = newSelection.value; }
function GridSphere_CheckBoxList_onClick(list, newSelection) { // alert("GridSphere CheckBoxList On Click"); // alert("GridSphere CheckBoxList current selection: " + list[0].value); if (newSelection.checked == true) { // Save selection only if none made yet if (list[0].value == "") { list[0...
list[0].value = newSelection.value;
} else { if (list[0].value == newSelection.value) { var found = false; for (i = 1; i < list.length && !found; i++) { if (list[i].checked == true) { if (list[i].value != item.value) { list[0].value = list[i].value; found = true; } } } if (!found) { list[0].value = ""; } }
function GridSphere_CheckBoxList_onClick(list, newSelection) { // alert("GridSphere CheckBoxList On Click"); // alert("GridSphere CheckBoxList current selection: " + list[0].value); if (newSelection.checked == true) { // Save selection only if none made yet if (list[0].value == "") { list[0...
} else { if (list[0].value == newSelection.value) { var found = false; for (i = 1; i < list.length && !found; i++) { if (list[i].checked == true) { if (list[i].value != item.value) { list[0].value = list[i].value; found = true; } } } if (!found) { list[0].value = ""; } } }
function GridSphere_CheckBoxList_onClick(list, newSelection) { // alert("GridSphere CheckBoxList On Click"); // alert("GridSphere CheckBoxList current selection: " + list[0].value); if (newSelection.checked == true) { // Save selection only if none made yet if (list[0].value == "") { list[0...
var grid = document.getElementById (ctx);
var grid = document.getElementById (ctx + "_div");
function GridView_ClientRender (data, ctx){ var gridData = eval (ctx + "_data"); var grid = document.getElementById (ctx); var i = data.indexOf ("|"); var j = data.indexOf ("|", i+1); var k = data.indexOf ("|", j+1); gridData.pageIndex = parseInt (data.substring (0, i)); gridData.sortExp = unescape (data.substring (i+1...
var groupManager = getGroupManager(); var groupId = ""; var name = ""; var description = ""; var message = ""; while (true) { sendPageAndWait("groups/profile.xml", { "page-title" : "Add Group", "group-id" : groupId, "name" : name, "description" : description, "message" : message, "new-group" : true });
resolve(); try { var groupManager = getAccreditableManager().getGroupManager(); var groupId = ""; var name = ""; var description = ""; var message = "";
function group_add_group() { var groupManager = getGroupManager(); var groupId = ""; var name = ""; var description = ""; var message = ""; while (true) { sendPageAndWait("groups/profile.xml", { "page-title" : "Add Group", "group-id" : groupId, "name" : name, "description" : description, "messag...
if (cocoon.request.get("cancel")) { break; } message = ""; groupId = cocoon.request.get("group-id"); name = cocoon.request.get("name"); description = cocoon.request.get("description"); var existingGroup = groupManager.getGroup(groupId); if (existingGroup != null) { message = "This group already exists.";
while (true) { cocoon.sendPageAndWait("groups/profile.xml", { "page-title" : "Add Group", "group-id" : groupId, "name" : name, "description" : description, "message" : message, "new-group" : true }); if (cocoon.request.get("cancel")) { break; } message = ""; groupId = cocoon.request.get("group-id"); name = cocoon.req...
function group_add_group() { var groupManager = getGroupManager(); var groupId = ""; var name = ""; var description = ""; var message = ""; while (true) { sendPageAndWait("groups/profile.xml", { "page-title" : "Add Group", "group-id" : groupId, "name" : name, "description" : description, "messag...
else if (!Packages.org.apache.lenya.cms.ac.AbstractItem.isValidId(groupId)) { message = "This is not a valid group ID."; } else { var configDir = groupManager.getConfigurationDirectory(); var group = new Packages.org.apache.lenya.cms.ac.FileGroup(configDir, groupId); group.setName(name); group.setDescription(descriptio...
cocoon.sendPage("redirect.html", { "url" : "../groups.html" }); } finally { release(); }
function group_add_group() { var groupManager = getGroupManager(); var groupId = ""; var name = ""; var description = ""; var message = ""; while (true) { sendPageAndWait("groups/profile.xml", { "page-title" : "Add Group", "group-id" : groupId, "name" : name, "description" : description, "messag...
if (cocoon.request.get("add_user") && otherUserId != "") {
if (cocoon.request.get("add_user") && otherUserId != null) {
function group_change_members(groupId) { resolve(); try { var userManager = getAccreditableManager().getUserManager(); var groupManager = getAccreditableManager().getGroupManager(); var group = groupManager.getGroup(groupId); var memberArray = group.getMembers(); var groupUsers = new java...