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 i... | 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) { ... | |
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 v... |
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 v... |
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... |
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... |
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 = ":" + o... |
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 = ":" + o... | |
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,'po... | |
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 ... |
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 ... |
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 ... |
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 ... | |
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 ... | |
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 ... | |
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.... |
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.... | |
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 ... |
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 = ... | |
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 = ... |
} 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 = ... | |
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.btnEd... |
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.btnEd... |
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); exc... |
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); exc... |
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 command... |
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 command... |
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 command... |
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 command... |
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... | |
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( ... |
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( ... |
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" ); ... |
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; ... |
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; ... |
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; ... |
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; ... |
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( 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; ... |
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; ... |
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" ); ... |
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 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.charA... |
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... |
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."); ... | |
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... | |
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(... | 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 ) se... | 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( ... |
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_pla... |
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.ge... |
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 he... |
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 he... |
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 '=' ... | |
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 '=' ... | |
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 == ... |
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 == ... | |
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(com... | 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[pro... |
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[prop... | |
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")) { ... | |
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.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[strategyClass... |
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 =... |
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 = ... | |
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... |
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... | |
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... |
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).toUpperC... |
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).toUpperC... |
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).toUpperC... |
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).toUpperC... |
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).toUpperC... |
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).toUpperC... | |
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")... | |
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.... | 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.ge... |
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 ... |
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:... | |
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:... |
$('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:... |
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 = v... | |
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 = v... | |
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 =... |
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 =... |
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 =... | |
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_del... |
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.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.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.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; ... | |
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; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.