rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
this.fromLocatorString = function(locatorString) { var locatorType = 'label'; var locatorValue = locatorString; var result = locatorString.match(/^([a-zA-Z]+)=(.*)/); if (result) { locatorType = result[1]; locatorValue = result[2]; } if ('label' == locatorType) { return new OptionLocatorByLabel(locatorValue); } else if ('index' == locatorType) { return new OptionLocatorByIndex(locatorValue); } else if ('value' == locatorType) { return new OptionLocatorByValue(locatorValue); } throw new Error("Unkown option locator type: " + locatorType); }; | function OptionLocatorFactory() { this.fromLocatorString = function(locatorString) { var locatorType = 'label'; var locatorValue = locatorString; // If there is a locator prefix, use the specified strategy var result = locatorString.match(/^([a-zA-Z]+)=(.*)/); if (result) { locatorType = result[1]; locatorValue = result[2]; } if ('label' == locatorType) { return new OptionLocatorByLabel(locatorValue); } else if ('index' == locatorType) { return new OptionLocatorByIndex(locatorValue); } else if ('value' == locatorType) { return new OptionLocatorByValue(locatorValue); } throw new Error("Unkown option locator type: " + locatorType); };} |
|
options: function(element){ element = $(element); return this.sortables.detect(function(s) { return s.element == element }); | options: function(element) { element = Sortable._findRootElement($(element)); if(!element) return; return Sortable.sortables[element.id]; | options: function(element){ element = $(element); return this.sortables.detect(function(s) { return s.element == element }); }, |
var element = $(element); for(var i=0;i<this.sortables.length;i++) if(this.sortables[i].element == element) return this.sortables[i]; return null; | element = $(element); return this.sortables.detect(function(s) { return s.element == element }); | options: function(element){ var element = $(element); for(var i=0;i<this.sortables.length;i++) if(this.sortables[i].element == element) return this.sortables[i]; return null; }, |
function options() { | function options(type) { | function options() { cocoon.response.setHeader("DAV","1"); var options = "OPTIONS,GET,PUT,LOCK,PROPFIND,DELETE";// var options = "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PUT,LOCK" // + ",MKCOL,PROPFIND,PROPPATCH,COPY,MOVE"; cocoon.response.setHeader("Allow",options); //interoperability with Windows 2000 var w2kDAVDiscoverAgent = "Microsoft Data Access Internet" + " Publishing Provider Protocol Discovery"; if (cocoon.request.getHeader("User-Agent") == w2kDAVDiscoverAgent) { cocoon.response.setHeader("MS-Author-Via","DAV"); } sendStatus(200);} |
var options = "OPTIONS,GET,PUT,LOCK,PROPFIND,DELETE"; | var options = ""; if (type == "file") { options = "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK"; } else { options = "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK"; } | function options() { cocoon.response.setHeader("DAV","1"); var options = "OPTIONS,GET,PUT,LOCK,PROPFIND,DELETE";// var options = "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PUT,LOCK" // + ",MKCOL,PROPFIND,PROPPATCH,COPY,MOVE"; cocoon.response.setHeader("Allow",options); //interoperability with Windows 2000 var w2kDAVDiscoverAgent = "Microsoft Data Access Internet" + " Publishing Provider Protocol Discovery"; if (cocoon.request.getHeader("User-Agent") == w2kDAVDiscoverAgent) { cocoon.response.setHeader("MS-Author-Via","DAV"); } sendStatus(200);} |
if (!this.sendq.bytes && !sendsock.send(send_data + "\r\n")) | if (this.sendq.bytes || !sendsock.send(send_data + "\r\n")) | function originatorout(str,origin) { var send_data; var sendsock; if (debug) log(format("[%s->%s]: %s",origin.nick,this.nick,str)); sendsock = this.socket; if(this.local && !this.server) { if (origin.server) send_data = ":" + origin.nick + " " + str; else send_data = ":" + origin.nuh + " " + str; } else if (this.server) { send_data = ":" + origin.nick + " " + str; } else if (!this.local) { sendsock = Servers[this.parent.toLowerCase()].socket; send_data = ":" + origin.nick + " " + str; } else { log(LOG_ERR,"!ERROR: No socket to send to?"); return 0; } if (!this.sendq.bytes && !sendsock.send(send_data + "\r\n")) this.sendq.add(send_data);} |
sendsock = Servers[this.parent].socket; | sendsock = Servers[this.parent.toLowerCase()].socket; | function originatorout(str,origin) { var send_data; var sendsock; if (debug) log(format("[%s->%s]: %s",origin.nick,this.nick,str)); sendsock = this.socket; if(this.local && !this.server) { if (origin.server) send_data = ":" + origin.nick + " " + str; else send_data = ":" + origin.nuh + " " + str; } else if (this.server) { send_data = ":" + origin.nick + " " + str; } else if (!this.local) { sendsock = Servers[this.parent].socket; send_data = ":" + origin.nick + " " + str; } else { log("!ERROR: No socket to send to?"); return 0; } if (!writeout(sendsock,send_data)) this.flagged_for_quit = "Socket write failed miserably";} |
send_data = ":" + origin.nuh + " " + str; } else if (this.parent) { | if (origin.server) send_data = ":" + origin.nick + " " + str; else send_data = ":" + origin.nuh + " " + str; } else if (this.server) { send_data = ":" + origin.nick + " " + str; } else if (!this.local) { | function originatorout(str,origin) { var send_data; var sendsock; if (debug) log(format("[%s->%s]: %s",origin.nick,this.nick,str)); sendsock = this.socket; if(this.local && !this.server) { send_data = ":" + origin.nuh + " " + str; } else if (this.parent) { sendsock = Servers[this.parent].socket; send_data = ":" + origin.nick + " " + str; } else if (this.server) { send_data = ":" + origin.nick + " " + str; } else { log("!ERROR: No socket to send to?"); return 0; } if (!writeout(sendsock,send_data)) this.flagged_for_quit = "Socket write failed miserably";} |
send_data = ":" + origin.nick + " " + str; } else if (this.server) { | function originatorout(str,origin) { var send_data; var sendsock; if (debug) log(format("[%s->%s]: %s",origin.nick,this.nick,str)); sendsock = this.socket; if(this.local && !this.server) { send_data = ":" + origin.nuh + " " + str; } else if (this.parent) { sendsock = Servers[this.parent].socket; send_data = ":" + origin.nick + " " + str; } else if (this.server) { send_data = ":" + origin.nick + " " + str; } else { log("!ERROR: No socket to send to?"); return 0; } if (!writeout(sendsock,send_data)) this.flagged_for_quit = "Socket write failed miserably";} |
|
return ((element.offsetTop+element.offsetHeight)-this.ycomp) / element.offsetHeight; | return ((this.offset[1]+element.offsetHeight)-this.ycomp) / element.offsetHeight; | overlap: function(mode, element) { if(!mode) return 0; if(mode == 'vertical') return ((element.offsetTop+element.offsetHeight)-this.ycomp) / element.offsetHeight; if(mode == 'horizontal') return ((element.offsetLeft+element.offsetWidth)-this.xcomp) / element.offsetWidth; }, |
return ((element.offsetLeft+element.offsetWidth)-this.xcomp) / element.offsetWidth; | return ((this.offset[0]+element.offsetWidth)-this.xcomp) / element.offsetWidth; | overlap: function(mode, element) { if(!mode) return 0; if(mode == 'vertical') return ((element.offsetTop+element.offsetHeight)-this.ycomp) / element.offsetHeight; if(mode == 'horizontal') return ((element.offsetLeft+element.offsetWidth)-this.xcomp) / element.offsetWidth; }, |
new_string = this; | var new_string = this; | String.prototype.pad_left = function(pad_length, pad_string) { new_string = this; for (var i = 0; new_string.length < pad_length; i++) { new_string = pad_string + new_string; } return new_string;} |
if(element == document.body) return [0, 0]; | Position.page = function(forElement) { if(element == document.body) return [0, 0]; var valueT = 0, valueL = 0; var element = forElement; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; // Safari fix if (element.offsetParent==document.body) if (Element.getStyle(element,'position')=='absolute') break; } while (element = element.offsetParent); element = forElement; do { valueT -= element.scrollTop || 0; valueL -= element.scrollLeft || 0; } while (element = element.parentNode); return [valueL, valueT];} |
|
return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); | if (locator.startsWith(' return this.locateElementByXPath(locator, inDocument); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument); } return this.locateElementByIdentifier(locator, inDocument); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; |
PageBot = function(pageWindow) { | var PageBot = function(pageWindow) { | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument); } return this.locateElementByIdentifier(locator, inDocument); };}; |
this.location = pageWindow.location.pathname; | this.location = pageWindow.location; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; |
this.locatorFunctions = new Array(); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; |
|
this.locatorFunctions.push(locatorFunction); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; |
|
this.getLocator = function(prefix) { return this.locators[prefix]; }; this.implicitLocator = function(locator, inDocument) { return this.getLocator("identifier")(locator, inDocument) || this.getLocator("dom")(locator, inDocument) || this.getLocator("xpath")(locator, inDocument); }; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; } }}; |
|
this.location = pageWindow.location.pathname | this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title}; | PageBot = function(pageWindow, browserBot) { this.currentWindow = pageWindow; this.browserBot = browserBot; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname} |
this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); | this.locatorFunctions = new Array(); this.locators = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; // Register all locate* functions this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); } } }}; |
var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locatorFunctions.push(locatorFunction); this.locators[locatorPrefix] = locatorFunction; | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location.pathname; this.title = function() {return this.currentDocument.title;}; // Register all locate* functions this.locatorFunctions = new Array(); for (var f in this) { if (typeof(this[f]) == 'function' && f.match(/^locate/)) { this.locatorFunctions.push(this[f]); } } }}; |
|
throw new Error("Unrecognised locator type: '" + locatorType + "'"); | throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); | PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() {return this.currentDocument.title;}; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new Error("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument) { return this.locateElementByIdentifier(locator, inDocument) || this.locateElementByDomTraversal(locator, inDocument) || this.locateElementByXPath(locator, inDocument); }; }; |
this.currentDocument = pageWindow.document; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; |
|
var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; | var t = this.document().title; if (typeof(t) == "string") { t = t.trim(); } return t; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; |
} this.document = function() { return this.currentWindow.document; | var PageBot = function(pageWindow) { if (pageWindow) { this.currentWindow = pageWindow; this.currentDocument = pageWindow.document; this.location = pageWindow.location; this.title = function() { var t = this.currentDocument.title; if (typeof(t) == "string") { t = t.trim(); } return t; }; } // Register all locateElementBy* functions // TODO - don't do this in the constructor - only needed once ever this.locationStrategies = {}; for (var functionName in this) { var result = /^locateElementBy([A-Z].+)$/.exec(functionName); if (result != null) { var locatorFunction = this[functionName]; if (typeof(locatorFunction) != 'function') { continue; } // Use a specified prefix in preference to one generated from // the function name var locatorPrefix = locatorFunction.prefix || result[1].toLowerCase(); this.locationStrategies[locatorPrefix] = locatorFunction; } } /** * Find a locator based on a prefix. */ this.findElementBy = function(locatorType, locator, inDocument, inWindow) { var locatorFunction = this.locationStrategies[locatorType]; if (! locatorFunction) { throw new SeleniumError("Unrecognised locator type: '" + locatorType + "'"); } return locatorFunction.call(this, locator, inDocument, inWindow); }; /** * The implicit locator, that is used when no prefix is supplied. */ this.locationStrategies['implicit'] = function(locator, inDocument, inWindow) { if (locator.startsWith('//')) { return this.locateElementByXPath(locator, inDocument, inWindow); } if (locator.startsWith('document.')) { return this.locateElementByDomTraversal(locator, inDocument, inWindow); } return this.locateElementByIdentifier(locator, inDocument, inWindow); };}; |
|
var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http: | var val = gmPrompt(manageBundle.getString("promptForNewPage.msg"), manageBundle.getString("promptForNewPage.defVal"), manageBundle.getString("promptForNewPage.title"));; | function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } } |
var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); | var val = gmPrompt(manageBundle.getString("promptForEdit.msg"), self.listbox.selectedItem.label, manageBundle.getString("promptForEdit.title")); | function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } } |
var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http: | var val = gmPrompt(manageBundle.getString("promptForNewPage.msg"), manageBundle.getString("promptForNewPage.defVal"), manageBundle.getString("promptForNewPage.title"));; | function PagesControl(ctlPages) { var document = ctlPages.ownerDocument; var includesBox = new PagesBox(document.getElementById("grpIncluded")); var excludesBox = new PagesBox(document.getElementById("grpExcluded")); this.populate = function(script) { includesBox.populate(script.includes); excludesBox.populate(script.excludes); } this.clear = function() { includesBox.clear(); excludesBox.clear(); } function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } }} |
var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); | var val = gmPrompt(manageBundle.getString("promptForEdit.msg"), self.listbox.selectedItem.label, manageBundle.getString("promptForEdit.title")); | function PagesControl(ctlPages) { var document = ctlPages.ownerDocument; var includesBox = new PagesBox(document.getElementById("grpIncluded")); var excludesBox = new PagesBox(document.getElementById("grpExcluded")); this.populate = function(script) { includesBox.populate(script.includes); excludesBox.populate(script.excludes); } this.clear = function() { includesBox.clear(); excludesBox.clear(); } function PagesBox(grpBox) { var buttons = grpBox.getElementsByTagName("button"); var self = this; var selectedPage = null; this.pages = null; this.groupbox = grpBox; this.listbox = grpBox.getElementsByTagName("listbox")[0]; this.btnAdd = buttons[0]; this.btnEdit = buttons[1]; this.btnRemove = buttons[2]; this.listbox.addEventListener("select", updatePagesBox, true); this.btnAdd.addEventListener("command", promptForNewPage, true); this.btnEdit.addEventListener("command", promptForEdit, true); this.btnRemove.addEventListener("command", remove, true); this.populate = function(pages) { this.clear(); this.pages = pages; for (var i = 0, page = null; (page = self.pages[i]); i++) { addPage(page); } } this.clear = function() { this.pages = null; while (this.listbox.hasChildNodes()) { this.listbox.removeChild(this.listbox.childNodes[0]); } } function updatePagesBox(ev) { selectedPage = self.listbox.getSelectedItem(0); self.btnEdit.disabled = selectedPage == null; self.btnRemove.disabled = selectedPage == null; } function promptForNewPage(ev) { var val = gmPrompt("Enter a new URL below. You can specify multiple pages using the wildcard (*) character.", "http://foo.com/*", "Add Page"); if (val && val != "") { addPage(val); self.pages.push(val); dirty = true; } } function promptForEdit(ev) { var val = gmPrompt("Modify the URL of the page below. You can specify multiple pages using the wildcard (*) character.", self.listbox.selectedItem.label, "Edit Page"); if (val && val != "") { self.listbox.selectedItem.label = val; self.pages[self.listbox.selectedIndex] = val; dirty = true; } } function remove(ev) { self.pages.splice(self.listbox.selectedIndex, 1); self.listbox.removeChild(self.listbox.getSelectedItem(0)); // it's sorta wierd that the button stays focused when it is disabled because nothing is selected if (self.listbox.length == 0) { self.listbox.focus(); dirty = true; } } function addPage(pageSpec) { var listitem = document.createElement("listitem"); listitem.setAttribute("label", pageSpec); self.listbox.appendChild(listitem); } }} |
var lastIndex = commandOrCommentRegexp.lastIndex; | lastIndex = commandOrCommentRegexp.lastIndex; | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); var lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} |
testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); | testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); var lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(commandOrCommentRegexp.lastIndex); //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} |
eval(options.commandLoadScript); | eval(options.commandLoadScript, {command: command, result: result}); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; var lastIndex; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} |
eval(options.commentLoadScript); | eval(options.commentLoadScript, {comment: comment, result: result}); | function parse(testCase, source) { var commandRegexp = new RegExp(options.commandLoadPattern, 'i'); var commentRegexp = new RegExp(options.commentLoadPattern, 'i'); var commandOrCommentRegexp = new RegExp("((" + options.commandLoadPattern + ")|(" + options.commentLoadPattern + "))", 'ig'); var doc = source; var commands = []; var commandFound = false; var lastIndex; while (true) { //log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); lastIndex = commandOrCommentRegexp.lastIndex; var docResult = commandOrCommentRegexp.exec(doc); if (docResult) { if (docResult[2]) { // command var command = new Command(); command.skip = docResult.index - lastIndex; command.index = lastIndex; var result = commandRegexp.exec(doc.substring(lastIndex)); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); if (!commandFound) { // remove comments before the first command or comment for (var i = commands.length - 1; i >= 0; i--) { if (commands[i].skip > 0) { commands.splice(0, i); break; } } testCase.header = doc.substr(0, commands[0].index); commandFound = true; } } else { // comment var comment = new Comment(); comment.skip = docResult.index - lastIndex; comment.index = docResult.index; var result = commentRegexp.exec(doc.substring(lastIndex)); eval(options.commentLoadScript); commands.push(comment); } } else { break; } } if (commands.length > 0) { testCase.footer = doc.substring(lastIndex); log.debug("header=" + testCase.header); log.debug("footer=" + testCase.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} |
log.debug("doc=" + doc + ", commandRegexp=" + commandRegexp); | function parse(testCase, source) { var commandLoadPattern = options.commandLoadPattern; var commandRegexp = new RegExp(commandLoadPattern, 'i'); var commentRegexp = new RegExp("^" + options.commentLoadPattern, 'i'); var doc = source; var result; var commands = []; var command; var first = true; var i; //var vars = this.options.commandLoadVars; while (true) { if ((result = commandRegexp.exec(doc)) != null) { if (first) { // treat text before the first match as header i = doc.indexOf(result[0]); testCase.header = doc.substr(0, i); doc = doc.substr(i); } //log.debug("result=" + result); command = new Command(); eval(options.commandLoadScript); convertText(command, decodeText); commands.push(command); doc = doc.substr(result[0].length); if (first) { commandRegexp = new RegExp("^" + commandLoadPattern, 'i'); } first = false; } else if ((result = commentRegexp.exec(doc)) != null) { if (first) { // no command found, but found a comment break; } var comment = new Comment(); eval(options.commentLoadScript); commands.push(comment); doc = doc.substr(result[0].length); } else { break; } } if (commands.length > 0) { testCase.footer = doc; //log.debug("header=" + this.header); //log.debug("footer=" + this.footer); //log.debug("commands.length=" + commands.length); testCase.commands = commands; } else { throw "no command found"; }} |
|
browser = document.getElementById( 'browser' ); | browser_iesuxx = document.getElementById( 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); | while( browser_iesuxx.hasChildNodes() ) browser_iesuxx.removeChild( browser.firstChild ); browser_iesuxx.appendChild( pos ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
item.setAttribute( 'class', 'browser' ); | setclass( item, 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); | var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); | item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); | item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); | item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); | var item = document.createElement( "a" ); item.setAttribute( 'class', 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); | clear_children( browser ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(elt.getAttribute( 'path' ))+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser.hasChildNodes() ) browser.removeChild( browser.firstChild ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
browser_iesuxx.removeChild( browser.firstChild ); | browser_iesuxx.removeChild( browser_iesuxx.firstChild ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { answer = req.responseXML.documentElement; browser_iesuxx = document.getElementById( 'browser' ); pos = document.createElement( "div" ); elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.lastChild.setAttribute( 'href', 'javascript:browse_dir(\''+elt.getAttribute( 'path' )+'\');'); } else { pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');' ); } pos.lastChild.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); pos.appendChild( document.createElement( "a" ) ); pos.lastChild.setAttribute( 'class', 'browser' ); pos.lastChild.setAttribute( 'href', 'javascript:browse_path(\''+elt.getAttribute( 'path' )+'\');'); pos.lastChild.appendChild( document.createTextNode( '(select)' ) ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } while( browser_iesuxx.hasChildNodes() ) browser_iesuxx.removeChild( browser.firstChild ); browser_iesuxx.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); | item.setAttribute( 'href', 'javascript:browse_dir(\''+addslashes(escapebackslashes(elt.getAttribute( 'path' )))+'\');'); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); setclass( item, 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); setclass( item, 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); | item.setAttribute( 'href', 'javascript:browse_path(\''+addslashes(escapebackslashes(elt.getAttribute( 'path' )))+'\');' ); | function parse_browse_dir( ){ if( req.readyState == 4 ) { if( req.status == 200 ) { var answer = req.responseXML.documentElement; if( !answer ) return; var browser = document.getElementById( 'browser' ); var pos = document.createElement( "div" ); var elt = answer.firstChild; while( elt ) { if( elt.nodeName == "element" ) { var item = document.createElement( "a" ); setclass( item, 'browser' ); if( elt.getAttribute( 'type' ) == 'directory' ) { item.setAttribute( 'href', 'javascript:browse_dir(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); } else { item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');' ); } item.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pos.appendChild( item ); if( elt.getAttribute( 'type' ) == 'directory' ) { pos.appendChild( document.createTextNode( ' ' ) ); var item = document.createElement( "a" ); setclass( item, 'browser' ); item.setAttribute( 'href', 'javascript:browse_path(\''+escapebackslashes(addslashes(elt.getAttribute( 'path' )))+'\');'); item.appendChild( document.createTextNode( '(select)' ) ); pos.appendChild( item ); } pos.appendChild( document.createElement( "br" ) ); } elt = elt.nextSibling; } clear_children( browser ); browser.appendChild( pos ); } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
var match = msgtxt[i].match(/\s*(\S+)\s*:\s*(.*)/); hdr[match[0]]=match[1]; | var match = msgtxt[i].match(/(\S+)\s*:\s*(.*)/); if(match) hdr[last_field=match[1]]=match[2]; else if(last_field) hdr[last_field]+=msgtxt[i]; | function parse_msg_header(msgtxt){ var hdr={}; for(i in msgtxt) { if(msgtxt[i].length==0) /* Header delimiter */ break; var match = msgtxt[i].match(/\s*(\S+)\s*:\s*(.*)/); hdr[match[0]]=match[1]; } return(hdr);} |
if(line.charAt(0)==' ' || line.charAt(0)=='\t' && hdr.field_list) { | if((line.charAt(0)==' ' || line.charAt(0)=='\t') && hdr.field_list) { | function parse_news_header(hdr, line){ /* Parse header lines */ if(line.charAt(0)==' ' || line.charAt(0)=='\t' && hdr.field_list) { /* "folded" header field */ hdr.field_list.push( { type: RFC822HEADER, data: line } ); return; } if((sp=line.indexOf(':'))==-1) return; data=line.slice(sp+1); while(data.charAt(0)==' ') // trim prepended spaces data=data.slice(1); data=truncsp(data); // trim trailing spaces line=line.substr(0,sp); while(line.charAt(0)==' ') // trim prepended spaces line=line.slice(1); switch(line.toLowerCase()) { case "to": case "apparently-to": case "x-comment-to": hdr.to=data; break; case "newsgroups": hdr.newsgroups=data; break; case "path": hdr.path=data; break; case "from": hdr.from=data; break; case "organization": hdr.from_org=data; break; case "reply-to": hdr.replyto_net_type=NET_INTERNET; hdr.replyto=data; break; case "date": hdr.date=data; break; case "subject": hdr.subject=data; break; case "message-id": hdr.id=data; break; case "references": hdr.reply_id=data; break; case "x-gateway": hdr.gateway=data; break; /* FidoNet header fields */ case "x-ftn-pid": hdr.ftn_pid=data; break; case "x-ftn-tid": hdr.ftn_tid=data; break; case "x-ftn-area": hdr.ftn_area=data; break; case "x-ftn-flags": hdr.ftn_flags=data; break; case "x-ftn-msgid": hdr.ftn_msgid=data; break; case "x-ftn-reply": hdr.ftn_reply=data; break; default: if(hdr.field_list==undefined) hdr.field_list=new Array(); hdr.field_list.push( { type: RFC822HEADER, data: line + ": " + data } ); break; }} |
nline_flags |= NLINE_IS_DREAMHAVEN; | nline_flags |= NLINE_IS_DREAMFORGE; | function parse_nline_flags(flags) { var nline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "q": nline_flags |= NLINE_CHECK_QWKPASSWD; break; case "w": nline_flags |= NLINE_IS_QWKMASTER; break; case "k": nline_flags |= NLINE_CHECK_WITH_QWKMASTER; break; case "d": nline_flags |= NLINE_IS_DREAMHAVEN; break; default: log(LOG_WARNING,"!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); break; } } return nline_flags;} |
break; case "c": nline_flags |= NLINE_CAN_CLINE; | function parse_nline_flags(flags) { var nline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "q": nline_flags |= NLINE_CHECK_QWKPASSWD; break; case "c": nline_flags |= NLINE_CAN_CLINE; break; default: log("!WARNING Unknown N:Line flag '" + flags[thisflag] + "' in config."); break; } } return nline_flags;} |
|
oline_flags |= OLINE_IS_GOPER; | function parse_oline_flags(flags) { var oline_flags = 0; for(thisflag in flags) { switch(flags[thisflag]) { case "r": oline_flags |= OLINE_CAN_REHASH; break; case "R": oline_flags |= OLINE_CAN_RESTART; break; case "D": oline_flags |= OLINE_CAN_DIE; break; case "g": oline_flags |= OLINE_CAN_GLOBOPS; break; case "w": oline_flags |= OLINE_CAN_WALLOPS; break; case "l": oline_flags |= OLINE_CAN_LOCOPS; break; case "c": oline_flags |= OLINE_CAN_LSQUITCON; break; case "C": oline_flags |= OLINE_CAN_GSQUITCON; break; case "k": oline_flags |= OLINE_CAN_LKILL; break; case "K": oline_flags |= OLINE_CAN_GKILL; break; case "b": oline_flags |= OLINE_CAN_KLINE; break; case "B": oline_flags |= OLINE_CAN_UNKLINE; break; case "n": oline_flags |= OLINE_CAN_LGNOTICE; break; case "N": oline_flags |= OLINE_CAN_GGNOTICE; break; case "A": case "a": case "u": case "f": case "F": break; // All reserved for future use. case "s": oline_flags |= OLINE_CAN_CHATOPS; break; case "S": oline_flags |= OLINE_CHECK_SYSPASSWD; break; case "x": case "X": oline_flags |= OLINE_CAN_DEBUG; break; case "O": oline_flags |= OLINE_CAN_GSQUITCON; oline_flags |= OLINE_CAN_GKILL; oline_flags |= OLINE_CAN_GGNOTICE; oline_flags |= OLINE_CAN_CHATOPS; case "o": oline_flags |= OLINE_CAN_REHASH; oline_flags |= OLINE_CAN_GLOBOPS; oline_flags |= OLINE_CAN_WALLOPS; oline_flags |= OLINE_CAN_LOCOPS; oline_flags |= OLINE_CAN_LSQUITCON; oline_flags |= OLINE_CAN_LKILL; oline_flags |= OLINE_CAN_KLINE; oline_flags |= OLINE_CAN_UNKLINE; oline_flags |= OLINE_CAN_LGNOTICE; break; default: log("!WARNING Unknown O:Line flag '" + flags[thisflag] + "' in config."); break; } } return oline_flags;} |
|
status = req.responseXML.documentElement; document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data ); document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data ); if( status.getElementsByTagName( 'volume' ).length != 0 ) document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%"; document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data; if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) | status_iesuxx = req.responseXML.documentElement; set_text( 'time', format_time( status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data ) ); set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) ); if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 ) set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data ); if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) | function parse_status(){ if( req.readyState == 4 ) { if( req.status == 200 ) { status = req.responseXML.documentElement; document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data ); document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data ); if( status.getElementsByTagName( 'volume' ).length != 0 ) document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%"; document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data; if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' ); } else { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/play.png' ); } } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); | set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+'%' ); | function parse_status(){ if( req.readyState == 4 ) { if( req.status == 200 ) { status_iesuxx = req.responseXML.documentElement; new_time = status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data; if( old_time > new_time ) setTimeout('update_playlist()',50); old_time = new_time; set_text( 'time', format_time( new_time ) ); set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) ); if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 ) set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data ); if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' ); } else { document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/play.png' ); } } else { /*alert( 'Error! HTTP server replied: ' + req.status );*/ } }} |
var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; | var title = "No title"; try { title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; } catch (e) { alert(e); } var description = "No description"; try { description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; } catch (e) { alert(e); } | parseData: function(ajaxRequest) { var doc = ajaxRequest.responseXML; if (!doc || ajaxRequest.fileType!="XML") { doc = OpenLayers.parseXMLString(ajaxRequest.responseText); } this.name = doc.getElementsByTagName("title")[0].firstChild.nodeValue; var itemlist = doc.getElementsByTagName('item'); for (var i = 0; i < itemlist.length; i++) { var data = {}; var point = OpenLayers.Util.getNodes(itemlist[i], 'georss:point'); var lat = OpenLayers.Util.getNodes(itemlist[i], 'geo:lat'); var lon = OpenLayers.Util.getNodes(itemlist[i], 'geo:long'); if (point.length > 0) { var location = point[0].firstChild.nodeValue.split(" "); if (location.length !=2) { var location = point[0].firstChild.nodeValue.split(","); } } else if (lat.length > 0 && lon.length > 0) { var location = [parseFloat(lat[0].firstChild.nodeValue), parseFloat(lon[0].firstChild.nodeValue)]; } else { continue; } location = new OpenLayers.LonLat(parseFloat(location[1]), parseFloat(location[0])); var title = OpenLayers.Util.getNodes(itemlist[i], "title")[0].firstChild.nodeValue; var description = OpenLayers.Util.getNodes(itemlist[i], "description")[0].firstChild.nodeValue; try { var link = OpenLayers.Util.getNodes(itemlist[i], "link")[0].firstChild.nodeValue; } catch (e) { } data.icon = OpenLayers.Marker.defaultIcon(); data.popupSize = new OpenLayers.Size(250, 100); if ((title != null) && (description != null)) { contentHTML = "<br />"; contentHTML += "<div style='margin: -0.5em 0.5em 0.5em 0.5em'>" contentHTML += "<div style='height: 1.3em; overflow: hidden'>"; contentHTML += "<span style='font-size: 1.2em; font-weight: bold'>"; if (link) contentHTML += "<a href='"+link+"' target='_blank'>"; contentHTML += title; if (link) contentHTML += "</a>"; contentHTML += "</span>"; contentHTML += "</div>"; contentHTML += "<span style='font-size: 0.7em; align:center'>"; contentHTML += description; contentHTML += "</span>"; contentHTML += "</div>" data['popupContentHTML'] = contentHTML; //data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>'; } var feature = new OpenLayers.Feature(this, location, data); this.features.push(feature); var marker = feature.createMarker(); marker.events.register('click', feature, this.markerClick); this.addMarker(marker); } }, |
var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); | var url_parts = ((url.substring(0,4)).toLowerCase() == "file") ? url.match(/(file:[\/]{2,3}(\w|\.|-|_|\/)+)\/(.*)/) : url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); | function ParsedURL(url){ // Since we're getting the URL from the browser, we're safe to assume the URL is already well formatted // and so there is no need for more sophisticated regular expression here var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); // the domain here is considered the whole http://www.example.org:8000 string for display purposes this.domain = url_parts[1]; // the relative path is everything following the domain this.relativePath = "/" + url_parts[5];} |
this.relativePath = "/" + url_parts[5]; | this.relativePath = (url_parts[5] === undefined) ? "/" + url_parts[3] : "/" + url_parts[5]; | function ParsedURL(url){ // Since we're getting the URL from the browser, we're safe to assume the URL is already well formatted // and so there is no need for more sophisticated regular expression here var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/); // the domain here is considered the whole http://www.example.org:8000 string for display purposes this.domain = url_parts[1]; // the relative path is everything following the domain this.relativePath = "/" + url_parts[5];} |
if (data.substring(0,1) != '{') { | if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { | function parseJson(data) { if (data.substring(0,1) != '{') { return { status: 0, data: data.length ? data : 'Unspecified error' }; } return eval('(' + data + ');');} |
debug("parseQuery: " + key + ' from ' + theQuery); | function parseQuery(key) { var theIdx = location.href.indexOf('?'); if (theIdx > -1) { var theQuery = location.href.substring(theIdx+1); //alert("parseQuery: " + key + ' from ' + theQuery); theIdx = theQuery.indexOf(key); if (theIdx > -1) { // parse past the key and the '=' var theValue = theQuery.substring(theIdx + key.length + 1); // stop at the terminating ';' or '&', if present theIdx = theValue.indexOf('&'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } theIdx = theValue.indexOf(';'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } //alert("parseQuery: " + key + ' = ' + theValue); return unescape(theValue); } // if theIdx } // if theQuery} // parseQuery |
|
debug("parseQuery: " + key + ' = ' + theValue); | function parseQuery(key) { var theIdx = location.href.indexOf('?'); if (theIdx > -1) { var theQuery = location.href.substring(theIdx+1); //alert("parseQuery: " + key + ' from ' + theQuery); theIdx = theQuery.indexOf(key); if (theIdx > -1) { // parse past the key and the '=' var theValue = theQuery.substring(theIdx + key.length + 1); // stop at the terminating ';' or '&', if present theIdx = theValue.indexOf('&'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } theIdx = theValue.indexOf(';'); if (theIdx > -1) { theValue = theValue.substring(0, theIdx); } //alert("parseQuery: " + key + ' = ' + theValue); return unescape(theValue); } // if theIdx } // if theQuery} // parseQuery |
|
r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); | r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), 'i'); | parseRuleStr : function(s) { var ta, p, r, a, i, x, px, t, tn, y, av, or = tinyMCE.clearArray(new Array()), dv; if (s == null || s.length == 0) return or; ta = s.split(','); for (x=0; x<ta.length; x++) { s = ta[x]; if (s.length == 0) continue; // Split tag/attrs p = this.split(/\[|\]/, s); if (p == null || p.length < 1) t = s.toUpperCase(); else t = p[0].toUpperCase(); // Handle all tag names tn = this.split('/', t); for (y=0; y<tn.length; y++) { r = {}; r.tag = tn[y]; r.forceAttribs = null; r.defaultAttribs = null; r.validAttribValues = null; // Handle prefixes px = r.tag.charAt(0); r.forceOpen = px == '+'; r.removeEmpty = px == '-'; r.fill = px == '#'; r.tag = r.tag.replace(/\+|-|#/g, ''); r.oTagName = tn[0].replace(/\+|-|#/g, '').toLowerCase(); r.isWild = new RegExp('\\*|\\?|\\+', 'g').test(r.tag); r.validRe = new RegExp(this._wildcardToRe('^' + r.tag + '$')); // Setup valid attributes if (p.length > 1) { r.vAttribsRe = '^('; a = this.split(/\|/, p[1]); for (i=0; i<a.length; i++) { t = a[i]; av = new RegExp('(=|:|<)(.*?)$').exec(t); t = t.replace(new RegExp('(=|:|<).*?$'), ''); if (av && av.length > 0) { if (av[0].charAt(0) == ':') { if (!r.forceAttribs) r.forceAttribs = tinyMCE.clearArray(new Array()); r.forceAttribs[t.toLowerCase()] = av[0].substring(1); } else if (av[0].charAt(0) == '=') { if (!r.defaultAttribs) r.defaultAttribs = tinyMCE.clearArray(new Array()); dv = av[0].substring(1); r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv; } else if (av[0].charAt(0) == '<') { if (!r.validAttribValues) r.validAttribValues = tinyMCE.clearArray(new Array()); r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); } } r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : ''); a[i] = t.toLowerCase(); } r.vAttribsRe += ')$'; r.vAttribsRe = this._wildcardToRe(r.vAttribsRe); r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe); r.vAttribsRe = new RegExp(r.vAttribsRe); r.vAttribs = a.reverse(); //tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC); } else { r.vAttribsRe = ''; r.vAttribs = tinyMCE.clearArray(new Array()); r.vAttribsReIsWild = false; } or[r.tag] = r; } } return or; }, |
if (r.reqAttribsRe) r.reqAttribsRe = new RegExp(r.reqAttribsRe + ')=\"', 'g'); | parseRuleStr : function(s) { var ta, p, r, a, i, x, px, t, tn, y, av, or = tinyMCE.clearArray(new Array()), dv; if (s == null || s.length == 0) return or; ta = s.split(','); for (x=0; x<ta.length; x++) { s = ta[x]; if (s.length == 0) continue; // Split tag/attrs p = this.split(/\[|\]/, s); if (p == null || p.length < 1) t = s.toUpperCase(); else t = p[0].toUpperCase(); // Handle all tag names tn = this.split('/', t); for (y=0; y<tn.length; y++) { r = {}; r.tag = tn[y]; r.forceAttribs = null; r.defaultAttribs = null; r.validAttribValues = null; // Handle prefixes px = r.tag.charAt(0); r.forceOpen = px == '+'; r.removeEmpty = px == '-'; r.fill = px == '#'; r.tag = r.tag.replace(/\+|-|#/g, ''); r.oTagName = tn[0].replace(/\+|-|#/g, '').toLowerCase(); r.isWild = new RegExp('\\*|\\?|\\+', 'g').test(r.tag); r.validRe = new RegExp(this._wildcardToRe('^' + r.tag + '$')); // Setup valid attributes if (p.length > 1) { r.vAttribsRe = '^('; a = this.split(/\|/, p[1]); for (i=0; i<a.length; i++) { t = a[i]; av = new RegExp('(=|:|<)(.*?)$').exec(t); t = t.replace(new RegExp('(=|:|<).*?$'), ''); if (av && av.length > 0) { if (av[0].charAt(0) == ':') { if (!r.forceAttribs) r.forceAttribs = tinyMCE.clearArray(new Array()); r.forceAttribs[t.toLowerCase()] = av[0].substring(1); } else if (av[0].charAt(0) == '=') { if (!r.defaultAttribs) r.defaultAttribs = tinyMCE.clearArray(new Array()); dv = av[0].substring(1); r.defaultAttribs[t.toLowerCase()] = dv == "" ? "mce_empty" : dv; } else if (av[0].charAt(0) == '<') { if (!r.validAttribValues) r.validAttribValues = tinyMCE.clearArray(new Array()); r.validAttribValues[t.toLowerCase()] = this._arrayToRe(this.split('?', av[0].substring(1)), ''); } } r.vAttribsRe += '' + t.toLowerCase() + (i != a.length - 1 ? '|' : ''); a[i] = t.toLowerCase(); } r.vAttribsRe += ')$'; r.vAttribsRe = this._wildcardToRe(r.vAttribsRe); r.vAttribsReIsWild = new RegExp('\\*|\\?|\\+', 'g').test(r.vAttribsRe); r.vAttribsRe = new RegExp(r.vAttribsRe); r.vAttribs = a.reverse(); //tinyMCE.debug(r.tag, r.oTagName, r.vAttribsRe, r.vAttribsReWC); } else { r.vAttribsRe = ''; r.vAttribs = tinyMCE.clearArray(new Array()); r.vAttribsReIsWild = false; } or[r.tag] = r; } } return or; }, |
|
var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result; | if(/MSIE/.test(navigator.userAgent) && !window.opera && this.indexOf('opacity') > -1) { styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]; } return styleRules; | String.prototype.parseStyle = function(){ var element = Element.extend(document.createElement('div')); element.innerHTML = '<div style="' + this + '"></div>'; var style = element.down().style, styleRules = $H(); Element.CSS_PROPERTIES.each(function(property){ if(style[property]) styleRules[property] = style[property]; }); var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } else if(Element.CSS_LENGTH.test(value)) var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result;}; |
var CSS_COLOR = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|rgb(\d,\d,\d))$/; | String.prototype.parseStyle = function(){ var element = Element.extend(document.createElement('div')); element.innerHTML = '<div style="' + this + '"></div>'; var style = element.down().style, styleRules = $H(); String.CSS_PROPERTIES.each(function(property){ if(style[property]) styleRules[property] = style[property]; }); var CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; var CSS_COLOR = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|rgb(\d,\d,\d))$/; var result = $H(); styleRules.each(function(pair){ var property = pair[0], value = pair[1], unit = null; if(CSS_LENGTH.test(value)) var components = value.match(/([\+\-]?[0-9\.]+)(.*)/), value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; else if(value.parseColor('#zzzzzz') != '#zzzzzz') { value = value.parseColor(); unit = 'color'; } result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); }.bind(this)); return result;}; |
|
value = flowHelper.getRequest(cocoon).getParameter(name); | function passRequestParameters(flowHelper, usecase) { var names = cocoon.request.getParameterNames(); while (names.hasMoreElements()) { var name = names.nextElement(); if (!name.equals("lenya.usecase") && !name.equals("lenya.continuation") && !name.equals("submit")) { var value = flowHelper.getRequest(cocoon).get(name); var string = new Packages.java.lang.String(); if (string.getClass().isInstance(value)) { usecase.setParameter(name, value); } else { usecase.setPart(name, value); } } }} |
|
this.pattern = pattern; var strategyName = 'glob'; if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern); | this.selectStrategy(pattern); | PatternMatcher = function(pattern) { this.pattern = pattern; var strategyName = 'glob'; // by default if (/^([a-zA-Z]+):(.*)/.test(pattern)) { strategyName = RegExp.$1; pattern = RegExp.$2; } strategyClassName = strategyName.ucfirst() + 'MatchStrategy'; if (! PatternMatcher[strategyClassName]) { throw new SeleniumError("cannot find PatternMatcher." + strategyClassName); } this.strategy = new PatternMatcher[strategyClassName](pattern);}; |
PatternMatcher = function(pattern) { | var PatternMatcher = function(pattern) { | PatternMatcher = function(pattern) { this.selectStrategy(pattern);}; |
treePopup.style.display = null; searchCount.style.display = null; searchField.style.width = null; | treePopup.style.removeProperty("display"); searchCount.style.removeProperty("display"); searchField.style.removeProperty("width"); | function performSearch(query){ var treePopup = document.getElementById("treePopup"); var searchField = document.getElementById("search"); var searchCount = document.getElementById("searchCount"); if (query.length && !searchActive) { treePopup.style.display = "none"; searchCount.style.display = "block"; searchField.style.width = "150px"; searchActive = true; } else if (!query.length && searchActive) { treePopup.style.display = null; searchCount.style.display = null; searchField.style.width = null; searchActive = false; } Inspector.searchPerformed(query);} |
gPGTranslate.enableTranslate(aLocation.asciiSpec); | function PGTranslate() // lets initialise some of the variables that we are going to use{ /* this.pref_theLanguage; this.pref_displayContextMenu ; this.pref_displayToolMenu ; */ this.translateBundle; //holds variable found in translate.properties this.PGTranslate_prefs = new PGTranslate_prefs(); this.myListener = //listens for page refreshs, if the page refreshed is an image then translate is disabled { onStateChange:function(aProgress,aRequest,aFlag,aStatus){}, onLocationChange:function(aProgress,aRequest,aLocation) { gPGTranslate.enableTranslate(aLocation.asciiSpec); }, onProgressChange:function(a,b,c,d,e,f){}, onStatusChange:function(a,b,c,d){}, onSecurityChange:function(a,b,c){}, onLinkIconAvailable:function(a){} } this.initPref(this.PGTranslate_prefs.PREF_CONTEXTMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_TOOLMENU_ENABLED , "bool", true); this.initPref(this.PGTranslate_prefs.PREF_LANGUAGE , "int", 0);} |
|
loadXMLDoc( 'requests/status.xml?command=pl_pause', parse_status ); | loadXMLDoc( 'requests/status.xml?command=pl_pause&id='+pl_cur_id, parse_status ); | function pl_pause(){ loadXMLDoc( 'requests/status.xml?command=pl_pause', parse_status );} |
pl_cur_id = id; | function pl_play( id ){ loadXMLDoc( 'requests/status.xml?command=pl_play&id='+id, parse_status ); setTimeout( 'update_playlist()', 1000 );} |
|
function pl_sort() | function pl_sort( sort, order ) | function pl_sort(){ /* FIXME */ loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); setTimeout( 'update_playlist()', 1000 );} |
loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); | loadXMLDoc( 'requests/status.xml?command=pl_sort&id='+order+'&val='+sort, parse_status ); | function pl_sort(){ /* FIXME */ loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status ); setTimeout( 'update_playlist()', 1000 );} |
d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) | d=parseFloat(dur); if(isNaN(f=parseInt(freq))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
case 'Q': exit(0); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
|
exit(1); | stop=true; break;; | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if(isNaN(f=parseInt(freq.charAt(0)))) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(Number(dur.charAt(0))) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; else pitch+=parseFloat(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(Number(dur.charAt(0))) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(truncstr(dur,'\\')); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
if((f=parseInt(freq))!=0) | if(isNaN(f=parseInt(freq.charAt(0)))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
if(parseInt(dur)) | if(Number(dur.charAt(0))) | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
if(parseInt(dur)) pitch=atof(dur)/32.0; | if(Number(dur.charAt(0))) pitch=parseFloat(dur)/32.0; | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
pitch+=atof(dur); | pitch+=parseFloat(dur); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
write(dur); | write(truncstr(dur,'\\')); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); | function play(freq, dur){ var notes=['c',' ','d',' ','e','f',' ','g',' ','a',' ','b']; var sharp=['B','C',' ','D',' ','E','F',' ','G',' ','A',' ']; var i,n,o,d; var len; var f;// writeln("play " + freq + ", " + dur); if(dur==undefined) dur="0"; d=parseInt(dur); if((f=parseInt(freq))!=0) switch(freq.charAt(0).toUpperCase()) { case 'O': /* default octave */ if(parseInt(dur)) octave=d; else octave+=d; return; case 'P': /* pitch variation */ if(parseInt(dur)) pitch=atof(dur)/32.0; else pitch+=atof(dur); return; case 'Q': /* quit */ exit(0); case 'R': /* rest */ f=0; break; case 'S': /* stacato */ if(parseInt(dur)) s=d; else s+=d; return; case 'T': /* time adjust */ t=d; return; case 'V': if(mode&NO_VISUAL) return; truncsp(dur); if(dur.charAt(dur.length-1)=='\\') write(dur); else writeln(dur); return; case 'X': /* exit */ exit(1); default: for(n=0;notes[n];n++) if(freq.charAt(0)==notes[n] || freq.charAt(0)==sharp[n]) break; if(parseInt(freq.charAt(1))) o=(freq.charAt(1)&0xf); else o=octave; f=pitch*Math.pow(2,o+n/12); break; } if(f && mode&SHOW_FREQ) { for(i=0;freq[i]>' ';i++) ; freq[i]=0; printf("%-4.4s",freq); } if(mode&SHOW_DOT) printf("."); if(t>10) len=(d*t)-(d*s); else len=d*t; if(isNaN(len)) return; if(f) beep(f,len); else sleep(len); if(s) { if(t>10) sleep(d*s); else sleep(s); }} |
|
var appcontent = window.document.getElementById("appcontent"); | function playback() { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); var window = wm.getMostRecentWindow('navigator:browser'); var contentWindow = window.getBrowser().contentWindow; var appcontent = window.document.getElementById("appcontent"); this.seleniumStartPage = contentWindow.location.href; this.seleniumWindow = contentWindow; // disable recording document.getElementById("enableRecording").checked = false; toggleRecordingEnabled(false); contentWindow.location.href = 'chrome://selenium-ide/content/selenium/TestRunner.html?test=/content/PlayerTestSuite.html' + '&userExtensionsURL=' + this.options.userExtensionsURL + '&baseURL=' + document.getElementById("baseURL").value;} |
|
var nodes = document.getElementsByClassName(accentClass); for (var i = 0; i < nodes.length; i++) { debug.print(label + " node for accent-color = " + nodes[i].nodeName); nodes[i].style.backgroundColor = this.accentColor; | var frames = new Array(document, parent.frames[1].document ); var nodes; debug.print(label + "frames " + frames.length); for (var i = 0; i < frames.length; i++) { debug.print(label + "frame " + i + " = " + frames[i]); nodes = frames[i].getElementsByClassName(accentClass); for (var j = 0; j < nodes.length; j++) { debug.print(label + "node for accent-color = " + nodes[j].nodeName); nodes[j].style.backgroundColor = this.accentColor; } | function PolicyClass(titleId, title, accentClass, accentColor) { debug.print("PolicyClass: " + "titleId = " + titleId) this.titleNode = $(titleId); this.title = title; this.accentClass = accentClass; this.accentColor = accentColor; this.getTitle = function() { return this.title; } this.getAccentColor = function() { return this.accentColor; } // see http://www.quirksmode.org/dom/w3c_css.html // see http://www.quirksmode.org/dom/changess.html this.enforce = function() { var label = "PolicyClass.enforce: "; debug.print(label + "titleNode = " + this.titleNode) debug.print(label + "title = " + this.title) if (null != this.titleNode && null != this.title && "" != this.title) { // enforce title Element.update(this.titleNode, ''); this.titleNode.appendChild(document.createTextNode(this.title)); } if (null != this.accentColor && "" != this.accentColor) { // enforce accentColor, on accent class only var nodes = document.getElementsByClassName(accentClass); for (var i = 0; i < nodes.length; i++) { debug.print(label + " node for accent-color = " + nodes[i].nodeName); nodes[i].style.backgroundColor = this.accentColor; } } }} // PolicyClass |
var last = this[this.length - 1 ]; this.length = this.length - 1; | var last = null; if ( this.length > 0 ) { last = this[this.length - 1 ]; this.length = this.length - 1; } | Array.prototype.pop=function() { var last = this[this.length - 1 ]; this.length = this.length - 1; return last; } |
out += '<li><a href="#needsJS" onclick=\'window.search("' + q + '"); return false;\'>' + d + '</a>' | out += '<li><a href="#needsJS" onclick=\'POPsearch("' + q + '"); return false;\'>' + d + '</a>' | function POPsearch(s) { var d = document.getElementById('Submit1') d.value = 'Searching...'; d.disabled = true document.getElementById('q').disabled = true var r = GXmlHttp.create(); r.open("GET", "/lookup.php?output=xml&q=" + encodeURIComponent(s), true); r.onreadystatechange = function(){ if (r.readyState == 4) { var d = document.getElementById('Submit1') d.value = 'Search'; d.disabled = false document.getElementById('q').disabled = false x = r.responseXML c = x.getElementsByTagName('center')[0] s = x.getElementsByTagName('span')[0] if (c && s) { p = GPoint.fromLatLngXml(c) s = GSize.fromLatLngXml(s) z = map.spec.getLowestZoomLevel(p, s, map.viewSize) map.centerAndZoom(p, z) document.getElementById('search_results').style.display = 'none' return 1; } refinements = x.getElementsByTagName('refinement'); if (refinements.length) { var out = '<p>More than one match:</p><ul>' for (ref=0; ref<refinements.length; ref++) { q = GXml.value(refinements[ref].getElementsByTagName('query')[0]) d = GXml.value(refinements[ref].getElementsByTagName('description')[0]) out += '<li><a href="#needsJS" onclick=\'window.search("' + q + '"); return false;\'>' + d + '</a>' } out += '</ul>' d = document.getElementById('search_results') d.innerHTML = out d.style.display = 'block' return 1; } error = x.getElementsByTagName('error')[0] if (error) { d = document.getElementById('search_results') d.innerHTML = GXml.value(error) d.style.display = 'block' } } } r.send(null); return false;}; |
var pos = Drupal.absolutePosition(this.input); | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} |
|
top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', | marginTop: this.input.offsetHeight +'px', | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} |
$('body').append(this.popup); | $(this.input).before(this.popup); | Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { $(this.popup).remove(); } var pos = Drupal.absolutePosition(this.input); this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; $(this.popup).css({ top: (pos.y + this.input.offsetHeight) +'px', left: pos.x +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); $('body').append(this.popup); // Do search this.db.owner = this; this.db.search(this.input.value);} |
var value = prop.style.getPropertyValue(name); | function populateStyleListItem(li, prop, name){ var value = prop.style.getPropertyValue(name); var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} |
|
var value = prop.style.getPropertyValue(name); if (!value) return; | function populateStyleListItem(li, prop, name){ var value = prop.style.getPropertyValue(name); var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} |
|
span.textContent = name; | span.textContent = name + ": "; | function populateStyleListItem(li, prop, name){ var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); var value = prop.style.getPropertyValue(name); if (!value) return; span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; span.title = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} |
span.textContent = textValue; | span.textContent = textValue + ";"; | function populateStyleListItem(li, prop, name){ var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); var value = prop.style.getPropertyValue(name); if (!value) return; span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; span.title = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} |
span.title = textValue; | function populateStyleListItem(li, prop, name){ var span = document.createElement("span"); span.className = "property"; span.textContent = name; li.appendChild(span); var value = prop.style.getPropertyValue(name); if (!value) return; span = document.createElement("span"); span.className = "value"; var textValue = valueNickname[value] ? valueNickname[value] : value; var priority = prop.style.getPropertyPriority(name); if (priority.length) textValue += " !" + priority; span.textContent = textValue; li.appendChild(span); var colors = value.match(/(rgb\([0-9]+, [0-9]+, [0-9]+\))|(rgba\([0-9]+, [0-9]+, [0-9]+, [0-9]+\))/g); if (colors) { for (var k = 0; k < colors.length; k++) { var swatch = document.createElement("span"); swatch.className = "colorSwatch"; swatch.style.backgroundColor = colors[k]; li.appendChild(swatch); } }} |
|
this.setHide2ndClick = function() { this.hide_2nd_click = true; }; this.setHideDelay = function(hide_delay) { this.hide_delay = hide_delay; }; this.setParentRightOffset = function(pox) { this.pox = pox; }; this.setParentBottomOffset = function(poy) { this.poy = poy; }; | this.setHide2ndClick = function() { this.hide_2nd_click = true; return this;}; this.setHideDelay = function(hide_delay) { this.hide_delay = hide_delay; return this;}; this.setParentRightOffset = function(pox) { this.pox = pox; return this;}; this.setParentBottomOffset = function(poy) { this.poy = poy; return this;}; | function PopupProperties(ox, oy){ this.hide_delay = 300; this.ox = ox; this.oy = oy; this.pox = false; this.poy = false; this.hide_2nd_click = false; this.LayerPosition = LayerPosition; this.setHide2ndClick = function() { this.hide_2nd_click = true; }; this.setHideDelay = function(hide_delay) { this.hide_delay = hide_delay; }; this.setParentRightOffset = function(pox) { this.pox = pox; }; this.setParentBottomOffset = function(poy) { this.poy = poy; }; // Modify the offsets if(isNav5) { this.ox += 8; this.oy += 8; } if(isMac) { this.ox += 10; this.oy += 15; }} |
function PopupProperties(hide_delay, ox, oy, pox, poy) | function PopupProperties(ox, oy) | function PopupProperties(hide_delay, ox, oy, pox, poy){ this.hide_delay = hide_delay; this.ox = ox; this.oy = oy; this.pox = pox; this.poy = poy; this.hide_2nd_click = 0; this.LayerPosition = LayerPosition; // Modify the offsets if(isNav5) { this.ox += 8; this.oy += 8; } if(isMac) { this.ox += 10; this.oy += 15; }} |
this.hide_delay = hide_delay; | this.hide_delay = 300; | function PopupProperties(hide_delay, ox, oy, pox, poy){ this.hide_delay = hide_delay; this.ox = ox; this.oy = oy; this.pox = pox; this.poy = poy; this.hide_2nd_click = 0; this.LayerPosition = LayerPosition; // Modify the offsets if(isNav5) { this.ox += 8; this.oy += 8; } if(isMac) { this.ox += 10; this.oy += 15; }} |
this.pox = pox; this.poy = poy; this.hide_2nd_click = 0; | this.pox = false; this.poy = false; this.hide_2nd_click = false; | function PopupProperties(hide_delay, ox, oy, pox, poy){ this.hide_delay = hide_delay; this.ox = ox; this.oy = oy; this.pox = pox; this.poy = poy; this.hide_2nd_click = 0; this.LayerPosition = LayerPosition; // Modify the offsets if(isNav5) { this.ox += 8; this.oy += 8; } if(isMac) { this.ox += 10; this.oy += 15; }} |
this.setHide2ndClick = function() { this.hide_2nd_click = true; }; this.setHideDelay = function(hide_delay) { this.hide_delay = hide_delay; }; this.setParentRightOffset = function(pox) { this.pox = pox; }; this.setParentBottomOffset = function(poy) { this.poy = poy; }; | function PopupProperties(hide_delay, ox, oy, pox, poy){ this.hide_delay = hide_delay; this.ox = ox; this.oy = oy; this.pox = pox; this.poy = poy; this.hide_2nd_click = 0; this.LayerPosition = LayerPosition; // Modify the offsets if(isNav5) { this.ox += 8; this.oy += 8; } if(isMac) { this.ox += 10; this.oy += 15; }} |
|
p = Element.getStyle(element, 'position'); | if(element.tagName=='BODY') break; var p = Element.getStyle(element, 'position'); | positionedOffset: function(element) { var valueT = 0, valueL = 0; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; element = element.offsetParent; if (element) { p = Element.getStyle(element, 'position'); if (p == 'relative' || p == 'absolute') break; } } while (element); return [valueL, valueT]; }, |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.