rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
l++; | m=line[l].text.match(/^(.{1,79}\s+)([^\s].*?)$/); if(m==null) { m=line[l].text.match(/^(.{1,79})(.*?)$/); line[l].kludged=true; } if(m!=null) { if(line[l+1]==undefined) line.push(new Line); line[l+1].text=m[2]+line[l+1].text; line[l+1].attr=line[l].attr.substr(m[1].length)+line[l+1].attr; line[l].text=m[1]; line[l].at... | function wrap_line(l){ var ret=0; var nline; while(line[l].text.length>79) { if(line[l+1]==undefined || line[l].hardcr) add_new_line_below(l); nline=line[l].text.replace(/^(.*)\s+(.*?)$/,function (str, start, end, pos, s) { line[l+1].text=end+" "+line[l+1].text; /* Copy attributes */ line[l+1].attr.splice(0,0... |
redraw_line(l); | function wrap_line(l){ var ret=0; var nline; while(line[l].text.length>79) { if(line[l+1]==undefined || line[l].hardcr) add_new_line_below(l); nline=line[l].text.replace(/^(.*)\s+(.*?)$/,function (str, start, end, pos, s) { line[l+1].text=end+" "+line[l+1].text; /* Copy attributes */ line[l+1].attr.splice(0,0... | |
log(format("rsp: %s",str)); | log("rsp: " + str); | function write(str){ if(0 && debug) log(format("rsp: %s",str)); client.socket.send(str);} |
if(0 && debug) | if(debug) | function write(str){ if(0 && debug) log("rsp: " + str); client.socket.send(str);} |
if(debug) log(format("rsp: %s",str)); | function write(str){ if(debug) log(format("rsp: %s",str)); client.socket.send(str);} | |
user_file.rewind(); | function write_user_list(user_list, user_file){ user_file.length = 0; for(var u in user_list) { user_file.writeln("[" + user_list[u].name + "]"); for(var p in user_list[u]) user_file.writeln(p + " = " + user_list[u][p]); }} | |
return null; | function writeBufferLabel(parentNode, n) { if (! parentNode) return null; // parentNode is a table body var rowNode = document.createElement('tr'); var cellNode = document.createElement('td'); // set the text contents to label the new cell cellNode.appendChild(getLabel(n)); rowNode.appendChi... | |
function writeBufferLabel(n) { var theTable = document.getElementById(g_cq_bufferlist_id); if (theTable.childNodes.length < 1) { theTable.appendChild(document.createElement('tbody')); } if (theTable) { var theTableBody = theTable.firstChild; var theRow = theTable.rows[n]; if (! theRow) { theRow = document.createEle... | function writeBufferLabel(parentNode, n) { if (! parentNode) return null; var rowNode = document.createElement('tr'); var cellNode = document.createElement('td'); cellNode.appendChild(getLabel(n)); rowNode.appendChild(cellNode); parentNode.appendChild(rowNode); | function writeBufferLabel(n) { // labels are stored in a table, one per row var theTable = document.getElementById(g_cq_bufferlist_id); // make sure the table has a tbody if (theTable.childNodes.length < 1) { // create an explicit tbody for the DOM (Mozilla needs this) theTable.appendChild(doc... |
write(str + "\r\n"); | if(str) write(str + "\r\n"); else write("\r\n"); | function writeln(str) { write(str + "\r\n"); } |
if(debug) log(format("rsp: %s",str)); | function writeln(str){ write(str + "\r\n");} | |
log(format("rsp: %s",str)); | log("rsp: " + str); | function writeln(str){ if(debug) log(format("rsp: %s",str)); write(str + "\r\n");} |
printf("cmd: %s",str); | printf("cmd: %s\r\n",str); | function writeln(str){ if(debug) printf("cmd: %s",str); write(str + "\r\n");} |
log(format("rsp: %s",str)); | printf("cmd: %s",str); | function writeln(str){ if(debug) log(format("rsp: %s",str)); write(str + "\r\n");} |
var a = this.val; if (a.length === 0) | if (this.length === 0) | sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");}; |
writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { | writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) { | sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");}; |
writeOrDisplay(p, a[i]); | writeOrDisplay(p, this[i]); | sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");}; |
if (this.length === 0) | if (this.length === 0) { | sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { if (this.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) { p.appendJSString(" "); writeOrDisplay(p, this[i]); } p.appendJSString(")");}; |
return; } | sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { if (this.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) { p.appendJSString(" "); writeOrDisplay(p, this[i]); } p.appendJSString(")");}; | |
if(last_cwd != '') { | var old_cwd=cwd; if(cwd != '') { | function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_fi... |
filename=last_cwd+'/'+filename; | filename=cwd+filename; | function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_fi... |
var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); | cwd=filename; cwd=backslash(cwd.replace(/[^\\\/]*$/,'')); | function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_fi... |
last_cwd=cwd; | function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_fi... | |
cwd=old_cwd; | function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_fi... | |
var start = 0; var list = []; for (var i = 0; i < value.length; i++) { if (value.charAt(i) == ',') { list.push(value.substring(start, i).replace(/\\(.)/, "$1")); start = i + 1; } else if (value.charAt(i) == '\\') { i++; } } list.push(value.substring(start, value.length).replace(/\\(.)/, "$1")); return array(list); | return array(parseArray(value)); | function xlateValue(type, value) { if (type == 'String[]') { var start = 0; var list = []; for (var i = 0; i < value.length; i++) { if (value.charAt(i) == ',') { list.push(value.substring(start, i).replace(/\\(.)/, "$1")); start = i + 1; } else if (value.charAt(i) == '\\') { i++; } } list.push(value... |
var i, l, e, o = '', c; | var cl = this; | xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '')... |
for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; | return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) { b = cl.entities[c.charCodeAt(0)]; | xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '')... |
if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o; | return b ? '&' + b + ';' : c; }); | xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '')... |
for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o; | return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) { return b ? '&#' + c.charCodeAt(0) + ';' : c; }); | xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '')... |
throw new Error("No XML component installed!") | throw new Error("No XML component installed!"); | XMLHttpRequest = function () { var msxmls = ['MSXML3', 'MSXML2', 'Microsoft'] for (var i=0; i < msxmls.length; i++) { try { return new ActiveXObject(msxmls[i]+'.XMLHTTP') } catch (e) { } } throw new Error("No XML component installed!") } |
function xref(msgbase, hdr) | function xref(hdr) | function xref(msgbase, hdr){ return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number));} |
return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number)); | return(format("%s %s:%u" ,system.local_host_name ,selected.newsgroup ,hdr.number)); | function xref(msgbase, hdr){ return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number));} |
this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b"; | this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P'); | function Xtrnsec(sec){ var hotkeys="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*():;<>"; this.items=new Array(); var j=0; xtrnsecprogwidth=0; this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b"; // Figure out the correct width for(j=0; j<xtrn_area.sec_list[sec].prog_list.length; j++) { if(xtrn_area.sec_list[sec].prog_list[j]... |
this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; | this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P'); | function Xtrnsecs(){ var hotkeys="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*():;<>"; this.items=new Array(); this.xpos=40; this.ypos=2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; var xtrnsecwidth=0; var j; for(j=0; j<xtrn_area.sec_list.length && j<console.screen_rows-2; ... |
var __cell=document.createElement("TD"); | var __cell=document.createElement("td"); | function y_add_plain_cell_to_row(_row, _name){ var __cell=document.createElement("TD"); __cell.setAttribute("name", _name); _row.appendChild(__cell); return __cell;} |
var __row=document.createElement("TR"); | var __row=document.createElement("tr"); | function y_add_row_to_table(_table, _class){ var __row=document.createElement("TR"); var __class = document.createAttribute("class"); __class.nodeValue = _class; __row.setAttributeNode(__class); _table.appendChild(__row); return __row;} |
value.replace('\\s*$',''); | value.replace(new RegExp('\\s*$',''),''); | function yaml_parse_implicit (value) { value.replace('\\s*$',''); if (value == '') return ''; if (value.match('^-?\\d+$')) return 0 + value; if (value.match('^[+-]?(\\d*)(\\.\\d*|)?([Ee][+-]?\\d+)?$')) return 1 * value; if (value.match('^\\d{4}\-\\d{2}\-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d*[1-9])?(Z|[-+]\\d{2}(:\\d... |
this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); | this.inline = this.inline.replace('^\\s+','').replace(new RegExp('\\s+$',''),''); | function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; ... |
m[1].replace(new RegExp('"','g'),'"'); | m[1] = m[1].replace(new RegExp('\\\\"','g'),'"'); | function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; ... |
m[1].replace(new RegExp("''",'g'),"'"); | m[1] = m[1].replace(new RegExp("''",'g'),"'"); | function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; ... |
if (this.content.match('^?\\s*')) { | if (this.content.match('^\\?\\s*')) { | function yaml_parse_map (anchor) { var m; var node = new Array (); if (anchor) this.anchors[anchor] = node; while (! this.done && this.indent == this.offset[this.level]) { var key; if (this.content.match('^?\\s*')) { this.preface = this.content; key = '' + this.parse_node(); } else if (m = this... |
} else if (m = this.lines[0].match('^( *)\\S') && m[1].length > offset) { | } else if ((m = this.lines[0].match('^( *)\\S')) && m[1].length > offset) { | function yaml_parse_next_line (type) { var m; var level = this.level; var offset = this.offset[level]; if (offset == undefined) return this.error("Parse error - Bad level " + level); // done with the current line - get the next // remove following commented lines this.lines.shift(); this.line ++; this.eoy = t... |
node = node.replace(new RegExp('^(\\S.*)\n(\n+\\S)','gm'), '$1$2'); | node = node.replace(new RegExp('[ \\t]*\n[ \\t]*','gm'), ' '); | function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]... |
if (! chomp || chomp == '-') node = node.replace('\n+$',''); if (chomp && chomp == '+') node += '\n'; | if (! chomp || chomp == '-') node = node.replace(new RegExp('\n$',''),''); | function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]... |
node = node.replace(new RegExp('[ \\t]*\n[ \\t]*','gm'), ' '); | node = node.replace(new RegExp('[ \\t]*\n[ \\t]*(\\S)','gm'), ' $1'); | function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]... |
} | }, | zip: function() { var iterator = Prototype.K, args = $A(arguments); if (typeof args.last() == 'function') iterator = args.pop(); var collections = [this].concat(args).map($A); return this.map(function(value, index) { iterator(value = collections.pluck(index)); return value; }); } |
iterator(value = collections.pluck(index)); return value; | return iterator(collections.pluck(index)); | zip: function() { var iterator = Prototype.K, args = $A(arguments); if (typeof args.last() == 'function') iterator = args.pop(); var collections = [this].concat(args).map($A); return this.map(function(value, index) { iterator(value = collections.pluck(index)); return value; }); }, |
if (!Event.isLeftClick(evt)) return; | zoomBarDown:function(evt) { this.map.events.register("mousemove", this, this.passEventToSlider); this.map.events.register("mouseup", this, this.passEventToSlider); this.mouseDragStart = evt.xy.copyOf(); this.zoomStart = evt.xy.copyOf(); this.div.style.cursor = "move"; Event... | |
if (!Event.isLeftClick(evt)) return; | zoomBarUp:function(evt) { if (this.zoomStart) { this.div.style.cursor="default"; this.map.events.remove("mousemove"); this.map.events.remove("mouseup"); var deltaY = this.zoomStart.y - evt.xy.y this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomS... | |
this.map.viewPortDiv.removeChild(this.zoomBox); this.zoomBox = null; } | this.removeZoomBox(); } | zoomBoxEnd: function(evt) { if (this.mouseDragStart != null) { if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end =... |
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); | this.map.viewPortDiv.removeChild(this.zoomBox); | zoomBoxEnd: function(evt) { if (this.mouseDragStart != null) { if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end =... |
var oldZoom = this.zoom; | zoomExtent: function() { var fullExtent = this.getFullExtent(); this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LatLon( (fullExtent.minlat+fullExtent.maxlat)/2, (fullExtent.minlon+fullExtent.maxlon)/2 ) ); ... | |
this.moveToNewExtent(true); | zoomExtent: function() { var fullExtent = this.getFullExtent(); this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LatLon( (fullExtent.minlat+fullExtent.maxlat)/2, (fullExtent.minlon+fullExtent.maxlon)/2 ) ); ... | |
this.zoom = this.getZoomForExtent( fullExtent ); | zoomExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)... | |
(fullExtent.bottom+fullExtent.top)/2) | (fullExtent.bottom+fullExtent.top)/2), 0 | zoomExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)... |
this.moveToNewExtent(true); this.events.triggerEvent("zoomend", {oldZoom: oldZoom, newZoom: this.zoom}); | this.moveToNewExtent(oldZoom); | zoomTo: function(zoom) { if (zoom >= 0 && zoom <= this.getZoomLevels()) { var oldZoom = this.zoom; this.zoom = zoom; this.moveToNewExtent(true); this.events.triggerEvent("zoomend", {oldZoom: oldZoom, newZoom: this.zoom}); } }, |
var oldZoom = this.zoom; | zoomToFullExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2), 0 ... | |
0 ); | this.getZoomForExtent(fullExtent) ); | zoomToFullExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2), 0 ... |
if ( c == null ) this.className = ''; else | this.className = c == null ? '' : | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.tes... |
for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') | for (var i = 0; i < arguments.length; i++) | function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else ... |
if (document.getElementById) { element = document.getElementById(element); } else if (document.all) | var element = arguments[i]; if (typeof element == 'string') | function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else ... |
if (arguments.length == 1) { return element; } elements.push(element); | return elements; | function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else ... |
return elements; } | function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else ... | |
function $() | $ = function() | function $() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { element = document.all[element]; } if (arguments.length == 1) ... |
return i === null ? this.cur : this.cur[i]; | return typeof i == 'undefined' ? this.cur : this.cur[i]; | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.tes... |
for ( var i in a ) | for ( var i = 0; i < a.length; i++ ) | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.tes... |
this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { | this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.tes... |
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length... | var $ = function(a,c) { return new jQuery(a,c); | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test... |
for ( var i in $.fn ) { if ( self[i] !== null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var k in self ) {(function(j){ try { if ( !$a[j] ) $a[j] = function() { return $.apply(self,self[j],arguments); }; } catch(e)... | function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test... | |
return new Range(start, end, exclusive); | return new ObjectRange(start, end, exclusive); | var $R = function(start, end, exclusive) { return new Range(start, end, exclusive);} |
blocking = true; $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); }); | var runTime = new Date() - startTime; $('body').append('<br/>Tests completed in ' + runTime + ' milliseconds.'); | synchronize(function() { blocking = true; $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) // search for main div .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); }); }); |
return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ | return typeof a[0] == "function" && typeof a[1] == "function" ? this.click(function(e) { | return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }... |
this.last = this.last == a ? b : a; | this.lastToggle = this.lastToggle == 0 ? 1 : 0; | return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }... |
return this.last.apply( this, [e] ) || false; | return a[this.lastToggle].apply( this, [e] ) || false; | return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }... |
function (str, p1, part, s) { return (parseInt(part) + 1) + "."; | function (str, dot, dotNum, noDot, noDotNum, pos, s) { return (parseInt(str) + 1) + (dot ? "." : ""); | function (str, p1, part, s) { return (parseInt(part) + 1) + "."; }); |
"windowing.js" | "window-manager.js" | (function() { var javascriptFiles = [ "platform.js", "debug.js", "xmlhttp.js", "json.js", "dom.js", "graphics.js", "ajax.js", "history.js", "windowing.js" ]; var cssFiles = [ ];... |
alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); | if (!SimileAjax.Debug.silent) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); } | function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); } : |
expect(1); | expect(2); | test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(1); stop(); $('#first').load("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); });}); |
ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); | ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); | test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(1); stop(); $('#first').load("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); });}); |
$.xml(mth, url, $.param(this.vars), function(r) { | $.ajax(mth, url, $.param(this.vars), function(r) { | $.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); }); |
js = js.replace(/</g, "<").replace(/>/g, ">"); | js = js.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); | $.get(files[num],function(js){ js = js.replace(/</g, "<").replace(/>/g, ">"); try { eval(js); } catch(e) { Test.push( [ false, "Died on test #" + Test.length + ": " + e ] ); } var good = 0, bad = 0; var ol = document.createElement("ol"); var li = "", state = "pass"; for ( var i = 0; i < Test.length; ... |
e[ prop[p] ](); | e[ prop[p] ]( prop ); | return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ](); } }); |
return handler.call(obj, elmt2, evt, target); | return obj[handlerName].call(obj, elmt2, evt, target); | SimileAjax.DOM.registerEvent(elmt, eventName, function(elmt2, evt, target) { return handler.call(obj, elmt2, evt, target); }); |
$.apply( self, callback, [res.responseText] ); | callback.apply( self, [res.responseText] ); | $.ajax( type, url, params,function(res){ // Inject the HTML into all the matched elements self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element $.apply( self, callback, [res.... |
$.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); } | $.ajax( type, url, params,function(res){ self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) $.apply( self, callback, [res.responseText] ); }); $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); }); | $.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); } }); |
var handler = function() {return function(){view.onCDReal(event.target)}}; | view.pending = setTimeout(function(){view.showDetail(_e);}, 500); | var handler = function() {return function(){view.onCDReal(event.target)}}; |
var url = SimileAjax.findScript("ajax-api.js"); | var url = SimileAjax.findScript(document, "ajax-api.js"); | (function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if ... |
SimileAjax.includeJavascriptFile(SimileAjax.urlPrefix + "scripts/" + filename); | SimileAjax.includeJavascriptFile(document, SimileAjax.urlPrefix + "scripts/" + filename); | (function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if ... |
SimileAjax.includeCssFile(SimileAjax.urlPrefix + "styles/" + filename); | SimileAjax.includeCssFile(document, SimileAjax.urlPrefix + "styles/" + filename); | (function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if ... |
setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); | return a ? this.each(function(){ new fx.FadeSize(this,o).hide(); }) : this._hide(); | setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); |
return this.each(function(){ if ( !this.$$queue ) { this.$$queue = {}; } if ( !this.$$queue[type] ) { this.$$queue[type] = []; } this.$$queue[type].push( fn ); if ( this.$$queue[type].length == 1 ) { $.apply(this,fn); | return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new fx( this, $.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ](); | return this.each(function(){ if ( !this.$$queue ) { this.$$queue = {}; } if ( !this.$$queue[type] ) { this.$$queue[type] = []; } this.$$queue[type].push( fn ); if ( this.$$queue[type].length == 1 ) { $.apply(this,fn); } }); |
toggleElem.onclick = function() {return false;}; | toggleElems.each(function(toggleElem){ Event.observe(toggleElem, 'click', todoItems.toggleNextActionListing); containerElem = todoItems.findNearestParentByClassName(toggleElem, "container"); collapsedCookie = contextCollapseCookieManager.getCookie(todoItems.buildCookieName(containerElem)); if (c... | |
function(e2) { alert("Caught exception: " + e2.message); | function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); | function(e2) { alert("Caught exception: " + e2.message); } : |
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); }); | test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' ); | test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });}); |
this.mCompositeObservers = this.mCompositeObservers.filter( function (v) { return v != aObserver; } ); | this.compCalendar.mObservers.forEach(function (o) { try { o[method].apply(o, args); } catch (e) { } }); | this.mCompositeObservers = this.mCompositeObservers.filter( function (v) { return v != aObserver; } ); |
setTimeout(function() { drawTableInner(tbodyID, dataArray, textFuncs); }, 0); | setTimeout(function() { DWRUtil.drawTableInner(tbodyID, dataArray, textFuncs); }, 0); | setTimeout(function() { drawTableInner(tbodyID, dataArray, textFuncs); }, 0); |
jQuery.ajax( type, url, params,function(res){ self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) callback.apply( self, [res.responseText] ); }); $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); }); }); | callback = callback || function(){}; | jQuery.ajax( type, url, params,function(res){ // Inject the HTML into all the matched elements self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element callback.apply( self, [re... |
}, batch.metadata.timeout); | }, batch.timeout); | batch.interval = setInterval(function() { clearInterval(batch.interval); DWREngine._abortRequest(batch); }, batch.metadata.timeout); |
$("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ | $("div.more,div.short",this.parentNode.parentNode).toggle('slow').find("div.desc",function(){ | $(document).ready(function(){ $("span.tooltip").each(function(){ if ( types[ this.innerHTML ] ) this.title = types[ this.innerHTML ]; }).ToolTipDemo('#fff'); $("a.name").click(function(){ $("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ $(this).html( $(this).html().replace(/... |
batch.interval = setInterval(function() { DWREngine._abortRequest(batch); }, batch.timeout); | batch.interval = setInterval(function() { dwr.engine._abortRequest(batch); }, batch.timeout); | batch.interval = setInterval(function() { DWREngine._abortRequest(batch); }, batch.timeout); |
var asciiBytes = aBytes.filter(function (n) {return !(0x80 & n);}); | name = name.split("").filter(function (el) { return chars.indexOf(el) != -1; }).join(""); | var asciiBytes = aBytes.filter(function (n) {return !(0x80 & n);}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.