rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if (elem.collapsed) | if (!elem.collapsed) | onChange: function (elem) { if (elem.inputField != dactyl.focus) { try { elem.selectionStart = elem.value.length; elem.selectionEnd = elem.value.length; } catch (e) {} } if (elem.collapsed) elem.focus(); }, |
onClick: function(item, node) { if (item.url) { alert(item.url); } }, | onClick: function(item, node) { if (item.url) { p = item.url[0].replace(/\.([^:]+):/, '.$1.html#'); window.location = virtroot + sep + tree + '/' + p; } }, | onClick: function(item, node) { if (item.url) { alert(item.url); } }, |
location.hash = ''; | location.hash = '#doctest-testall'; | reloader.onclick = function () { location.hash = ''; location.reload(); }; |
onComplete: function() { Ajax.activeRequestCount-- } | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | onComplete: function() { Ajax.activeRequestCount-- } |
onCreate: function() { Ajax.activeRequestCount++ }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | onCreate: function() { Ajax.activeRequestCount++ }, |
onElementEvent: function() { var value = this.getValue(); if (this.lastValue != value) { this.callback(this.element, value); this.lastValue = value; } }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | onElementEvent: function() { var value = this.getValue(); if (this.lastValue != value) { this.callback(this.element, value); this.lastValue = value; } }, |
this.throwIfDisposed_(); | activity.TimelineView.prototype.onEndTimeChanged = function(endTimeUsec) { this.throwIfDisposed_(); // Convert from usec to number of resolutions. var endTimeInResolutions = Math.ceil(endTimeUsec / this.resolutionUsec_); var startTimeInResolutions = Math.floor(this.startTimeUsec_ / this.resolutionUsec_); // Clamp the start time, if necessary. var numResolutions = endTimeInResolutions - startTimeInResolutions; if (numResolutions > this.maxDisplayableResolutions_) { startTimeInResolutions = endTimeInResolutions - this.maxDisplayableResolutions_; this.startTimeUsec_ = startTimeInResolutions * this.resolutionUsec_; } // Update each row's start and end time. this.clampRowStartAndEndTimes_(startTimeInResolutions, endTimeInResolutions); // Show only those rows that have visible events. this.updateRowVisibility_(); // Make sure every other visible row has a gray background. this.updateRowCss_(); // Update the UI's start and end time indicators. this.updateTimeIndicators_(this.startTimeUsec_, endTimeUsec);}; |
|
case modes.OUTPUT_MULTILINE: | onEscape: function () { switch (dactyl.mode) { case modes.COMMAND_LINE: case modes.INSERT: case modes.PASS_THROUGH: case modes.QUOTE: case modes.TEXT_EDIT: case modes.VISUAL: modes.pop(); break; default: modes.reset(); break; } }, |
|
this.throwIfDisposed_(); | activity.TimelineView.Row_.prototype.onEvent = function(event) { this.throwIfDisposed_(); // Ordinals are one-indexed, but our array is zero-indexed, so we // need to subtract one from the ordinal value. var index = activity.TimelineEventType.getOrdinalForEventType(event.getType()) - 1; var chart = this.barCharts_[index]; var eventEndTimeUsec = event.getStartTimeUsec() + event.getDurationUsec(); var eventEndTimeInResolutions = Math.ceil(eventEndTimeUsec / this.resolutionUsec_); // The chart's new end time will be the max of its current end time // and the end time of the new event. var chartEndTime = Math.max(chart.getEndTime(), eventEndTimeInResolutions); var chartStartTime = chartEndTime - this.maxDisplayableResolutions_; // Clamp the event's start and end times to the chart's start and // end times. var clampedStartTimeUsec = Math.max( event.getStartTimeUsec(), chartStartTime * this.resolutionUsec_); var clampedEndTimeUsec = Math.min( eventEndTimeUsec, chartEndTime * this.resolutionUsec_); if (clampedEndTimeUsec <= clampedStartTimeUsec) { return; } var eventStartInResolutions = Math.floor(clampedStartTimeUsec / this.resolutionUsec_); if (chart.getEndTime() > eventStartInResolutions) { // The chart's start time exceeds the start time for this // event. This happens because we have different event sources // that may arrive out of order relative to each other. We need to // temporarily remove the data up to the event's start time, then // restore that data after adding the new event. chart.unwindToEndTime(eventStartInResolutions); } chart.padToEndTime(eventStartInResolutions); if (Math.floor(clampedStartTimeUsec / this.resolutionUsec_) == Math.floor(clampedEndTimeUsec / this.resolutionUsec_)) { // The entire event fits in a single entry. var intensity = clampedEndTimeUsec - clampedStartTimeUsec; intensity *= event.getIntensity(); chart.addEntry( activity.TimelineView.Row_.sanitizeIntensity_( intensity / this.resolutionUsec_), 1); } else { // Generate up to three events, one for the partial resolution at // the beginning, another with the full resolutions in the middle, // and a final with the partial resolution at the end. Note that // all three events are optional. this.maybeAddStartEvent_( chart, clampedStartTimeUsec, clampedEndTimeUsec, event.getIntensity()); this.maybeAddMiddleEvent_( chart, clampedStartTimeUsec, clampedEndTimeUsec, event.getIntensity()); this.maybeAddEndEvent_( chart, clampedStartTimeUsec, clampedEndTimeUsec, event.getIntensity()); } if (chartEndTime > chart.getEndTime()) { // Restore the previous end time. chart.padToEndTime(chartEndTime); }}; |
|
if ((elem instanceof HTMLInputElement && /^(text|password)$/.test(elem.type)) || | if ((elem instanceof HTMLInputElement && /^(search|text|password)$/.test(elem.type)) || | onFocusChange: function (event) { // command line has it's own focus change handler if (liberator.mode == modes.COMMAND_LINE) return; function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument let win = window.document.commandDispatcher.focusedWindow; let elem = window.document.commandDispatcher.focusedElement; if (win && win.top == content && liberator.has("tabs")) tabs.localStore.focusedFrame = win; try { if (elem && elem.readOnly) return; if ((elem instanceof HTMLInputElement && /^(text|password)$/.test(elem.type)) || (elem instanceof HTMLSelectElement)) { liberator.mode = modes.INSERT; if (hasHTMLDocument(win)) buffer.lastInputField = elem; return; } if (elem instanceof HTMLEmbedElement || elem instanceof HTMLObjectElement) { liberator.mode = modes.EMBED; return; } if (elem instanceof HTMLTextAreaElement || (elem && elem.contentEditable == "true")) { if (options["insertmode"]) modes.set(modes.INSERT); else if (elem.selectionEnd - elem.selectionStart > 0) modes.set(modes.VISUAL, modes.TEXTAREA); else modes.main = modes.TEXTAREA; if (hasHTMLDocument(win)) buffer.lastInputField = elem; return; } if (config.focusChange) { config.focusChange(win); return; } let urlbar = document.getElementById("urlbar"); if (elem == null && urlbar && urlbar.inputField == this._lastFocus) liberator.threadYield(true); if (liberator.mode & (modes.EMBED | modes.INSERT | modes.TEXTAREA | modes.VISUAL)) modes.reset(); } finally { this._lastFocus = elem; } }, |
PAGESPEED.PageLoadTimer.prototype.onLinkIconAvailable = function() {return 0;}; | PAGESPEED.PageLoadTimer.prototype.onLinkIconAvailable = function() {return;}; | PAGESPEED.PageLoadTimer.prototype.onLinkIconAvailable = function() {return 0;}; |
oDiv2.innerHTML = "<strong>Warning:</strong><br />This is document needs some updates."; | oDiv2.innerHTML = "<strong>Warning:</strong><br />This document needs some updates."; | window.onload = function() { var oDiv = document.getElementById("version"); oDiv.innerHTML = "Version 0.37-dev<br />(other <a href='faq.html#versions'>versions</a>)"; var oDiv2 = document.getElementById("warnDoc"); if (oDiv2 != null) { oDiv2.innerHTML = "<strong>Warning:</strong><br />This is document needs some updates."; }} |
array_each(onpuchan_topics(html), function(t) { tag.parentNode.removeChild(tag); insertNext(placepoint, t[1]); | arrayEach(onpuchanTopics(html), function(t) { insertNext(topic, t); | xmlHttpRequest({method: "GET", url: href, onload: function(http) { var html = document.createElement("div"); html.innerHTML = http.responseText; array_each(onpuchan_topics(html), function(t) { tag.parentNode.removeChild(tag); insertNext(placepoint, t[1]); }); }}); |
topic.parentNode.removeChild(topic); | xmlHttpRequest({method: "GET", url: href, onload: function(http) { var html = document.createElement("div"); html.innerHTML = http.responseText; array_each(onpuchan_topics(html), function(t) { tag.parentNode.removeChild(tag); insertNext(placepoint, t[1]); }); }}); |
|
highlight.set("Logo", String(<> | highlight.loadCSS(<>{"!Logo {"} | img.onload = function () { highlight.set("Logo", String(<> display: inline-block; background: url({img.src}); width: {img.width}px; height: {img.height}px; </>)); img = null; }; |
</>)); | {"}"}</>); | img.onload = function () { highlight.set("Logo", String(<> display: inline-block; background: url({img.src}); width: {img.width}px; height: {img.height}px; </>)); img = null; }; |
aProgress, aRequest, aURI) {return 0;}; | aProgress, aRequest, aURI) {return;}; | PAGESPEED.PageLoadTimer.prototype.onLocationChange = function( aProgress, aRequest, aURI) {return 0;}; |
PAGESPEED.PageLoadTimer.prototype.onProgressChange = function() {return 0;}; | PAGESPEED.PageLoadTimer.prototype.onProgressChange = function() {return;}; | PAGESPEED.PageLoadTimer.prototype.onProgressChange = function() {return 0;}; |
if(action == "LOAD") { loadAirport(self.xmlHttpReq.responseText.split("\n")[1]); document.getElementById("miniresultbox").innerHTML = ""; } | self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { if(strURL == URL_APSEARCH) { if(action == "SEARCH") { searchResult(self.xmlHttpReq.responseText); } if(action == "RECORD") { recordResult(self.xmlHttpReq.responseText); } } } } |
|
C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type", | false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", | C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type", |
PAGESPEED.PageLoadTimer.prototype.onSecurityChange = function() {return 0;}; | PAGESPEED.PageLoadTimer.prototype.onSecurityChange = function() {return;}; | PAGESPEED.PageLoadTimer.prototype.onSecurityChange = function() {return 0;}; |
this.startTime_ = new Date().getTime(); | this.startTime_ = (new Date()).getTime(); | PAGESPEED.PageLoadTimer.prototype.onStateChange = function( aProgress, aRequest, aFlag, aStatus) { // Do not try to time requests to non-http or https URLs. // Note that a dummy request to "about:document-onload-blocker" is // fired by the DOM inspector extension. This test filters it. // Docs say aRequest may be null, and has a note saying the meaning // aRequest===null needs to be documented. if (aRequest && (!aRequest.name || !/^https?:/.test(aRequest.name))) return; // Only time the top level window. Ignore sub-windows, such as frames. if (aProgress.DOMWindow !== aProgress.DOMWindow.top) return; if ((aFlag & START_FILTER) == START_FILTER) { // Only record the window and start the timer if there is not already // a timer running. Stop the timer when we see a stop event on the // window that we record here on a start event. This works because // the top level window will have the first start event, and the last // stop event. this.window_ = aProgress.DOMWindow; this.startTime_ = new Date().getTime(); delete this.loadTime_; } if ((aFlag & STOP_FILTER) == STOP_FILTER) { if (this.window_ == aProgress.DOMWindow) { this.window_ = null; this.loadTime_ = new Date().getTime() - this.startTime_; } } return 0;}; |
this.loadTime_ = new Date().getTime() - this.startTime_; | this.loadTime_ = (new Date()).getTime() - startTime; this.couldHaveMissedStart_ = false; | PAGESPEED.PageLoadTimer.prototype.onStateChange = function( aProgress, aRequest, aFlag, aStatus) { // Do not try to time requests to non-http or https URLs. // Note that a dummy request to "about:document-onload-blocker" is // fired by the DOM inspector extension. This test filters it. // Docs say aRequest may be null, and has a note saying the meaning // aRequest===null needs to be documented. if (aRequest && (!aRequest.name || !/^https?:/.test(aRequest.name))) return; // Only time the top level window. Ignore sub-windows, such as frames. if (aProgress.DOMWindow !== aProgress.DOMWindow.top) return; if ((aFlag & START_FILTER) == START_FILTER) { // Only record the window and start the timer if there is not already // a timer running. Stop the timer when we see a stop event on the // window that we record here on a start event. This works because // the top level window will have the first start event, and the last // stop event. this.window_ = aProgress.DOMWindow; this.startTime_ = new Date().getTime(); delete this.loadTime_; } if ((aFlag & STOP_FILTER) == STOP_FILTER) { if (this.window_ == aProgress.DOMWindow) { this.window_ = null; this.loadTime_ = new Date().getTime() - this.startTime_; } } return 0;}; |
return 0; | return; | PAGESPEED.PageLoadTimer.prototype.onStateChange = function( aProgress, aRequest, aFlag, aStatus) { // Do not try to time requests to non-http or https URLs. // Note that a dummy request to "about:document-onload-blocker" is // fired by the DOM inspector extension. This test filters it. // Docs say aRequest may be null, and has a note saying the meaning // aRequest===null needs to be documented. if (aRequest && (!aRequest.name || !/^https?:/.test(aRequest.name))) return; // Only time the top level window. Ignore sub-windows, such as frames. if (aProgress.DOMWindow !== aProgress.DOMWindow.top) return; if ((aFlag & START_FILTER) == START_FILTER) { // Only record the window and start the timer if there is not already // a timer running. Stop the timer when we see a stop event on the // window that we record here on a start event. This works because // the top level window will have the first start event, and the last // stop event. this.window_ = aProgress.DOMWindow; this.startTime_ = new Date().getTime(); delete this.loadTime_; } if ((aFlag & STOP_FILTER) == STOP_FILTER) { if (this.window_ == aProgress.DOMWindow) { this.window_ = null; this.loadTime_ = new Date().getTime() - this.startTime_; } } return 0;}; |
onStateChange: function() { var readyState = this.transport.readyState; if (readyState > 1 && !((readyState == 4) && this._complete)) this.respondToReadyState(this.transport.readyState); }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | onStateChange: function() { var readyState = this.transport.readyState; if (readyState > 1 && !((readyState == 4) && this._complete)) this.respondToReadyState(this.transport.readyState); }, |
PAGESPEED.PageLoadTimer.prototype.onStatusChange = function() {return 0;}; | PAGESPEED.PageLoadTimer.prototype.onStatusChange = function() {return;}; | PAGESPEED.PageLoadTimer.prototype.onStatusChange = function() {return 0;}; |
this.lastSearchPattern = command; | onSubmit: function (command) { if (!options["incsearch"] || !this.rangeFind || !this.rangeFind.found) { this.clear(); this.find(command || this.lastSearchPattern, modes.extended & modes.FIND_BACKWARD); } this.lastSearchPattern = command; if (options["hlsearch"]) this.highlight(); this.rangeFind.focus(); modes.reset(); }, |
|
var ajax = new Ajax.Request(url,{method: 'get', parameters:formdata, onSuccess: function(response) {refreshIt(response.responseText);} | var ajax = new Ajax.Updater({success: 'error'},url,{method: 'get', parameters:formdata, onSuccess: function(response) {refreshIt(response.responseText);} | var ajax = new Ajax.Request(url,{method: 'get', parameters:formdata, onSuccess: function(response) {refreshIt(response.responseText);} |
this.throwIfDisposed_(); | activity.TimelineView.prototype.onTimelineCreated = function(timeline) { this.throwIfDisposed_(); var rowElement = this.xulElementFactory_.createElement('row'); var row = new activity.TimelineView.Row_(timeline, this.xulElementFactory_, rowElement, this.resolutionUsec_, this.maxDisplayableResolutions_); var startTimeInResolutions = Math.floor(this.startTimeUsec_ / this.resolutionUsec_); row.clampToStartTime(startTimeInResolutions); if (timeline.getIdentifier().lastIndexOf('http', 0) == 0) { this.xulRowsElement_.insertBefore(rowElement, this.nonHttpResourcesLabel_); this.rows_.splice(this.firstNonHttpResourceIndex_++, 0, row); } else { if (!this.nonHttpResourcesLabel_) { this.firstNonHttpResourceIndex_ = this.rows_.length; this.nonHttpResourcesLabel_ = this.xulElementFactory_.createElement('label'); this.nonHttpResourcesLabel_.setAttribute('value', 'Non-HTTP resources:'); this.nonHttpResourcesLabel_.setAttribute( 'class', 'nonHttpResourcesLabel'); this.xulRowsElement_.appendChild(this.nonHttpResourcesLabel_); } this.xulRowsElement_.appendChild(rowElement); this.rows_.push(row); }}; |
|
onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; this.execute(); } finally { this.currentlyExecuting = false; } } } | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | onTimerEvent: function() { if (!this.currentlyExecuting) { try { this.currentlyExecuting = true; this.execute(); } finally { this.currentlyExecuting = false; } } } |
}, | } | onUnload: function (event) { this.purgeListeners(); if (this.highlighted) this.highlight(false); this.stale = true; }, |
onVisibility: function (elem, visible) { visible && dactyl.focus(elem)} | onVisibility: function (elem, visible) { visible && dactyl.focus(elem); } | onVisibility: function (elem, visible) { visible && dactyl.focus(elem)} |
onVisibility: function (elem, visible) { visible && elem.focus(); } | onVisibility: function (elem, visible) { visible && dactyl.focus(elem)} | onVisibility: function (elem, visible) { visible && elem.focus(); } |
onVisibility: function (elem, visible) visible && elem.focus() }); | onVisibility: function (elem, visible) { visible && elem.focus() } | onVisibility: function (elem, visible) visible && elem.focus() }); |
var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();req.overrideMimeType("text/xml");}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}} | var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}} | var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();req.overrideMimeType("text/xml");}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}}return req;};this.post=function(){var req=getHttpRequest();req.open("POST",posturl,true);req.setRequestHeader("X-Requested-With","XMLHttpRequest");req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var data="";for(var i=0;i<this.form.elements.length;i++){data+="&"+this.form.elements[i].name+"="+this.form.elements[i].value;}data=data.length>1?data.substring(1):"";req.onreadystatechange=function(e){if(req.readyState==4&&req.status==200){t.timeline.innerHTML=req.responseText+t.timeline.innerHTML;}}req.send(data);}var loadfunc=function(event){t.form=document.getElementById(id+"_form");t.body=document.getElementById(id+"_activity_data_body");t.timeline=document.getElementById(id+"_timeline");t.body.onkeyup=function(){var count=this.value.length;document.getElementById(id+"_count").innerHTML=140-count;};t.body.onkeyup();addEventListener(t.form,"submit",function(event){if(t.body.value&&t.body.value.length>0&&t.body.value.length<=140){t.post();t.body.value="";t.body.onkeyup();}if(event.preventDefault){event.preventDefault();}else{return false;}},false);}addEventListener(window,"load",loadfunc,false);} |
return req;};this.post=function(){var req=getHttpRequest();req.open("POST",posturl,true);req.setRequestHeader("X-Requested-With","XMLHttpRequest");req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var data="";for(var i=0;i<this.form.elements.length;i++){data+="&"+this.form.elements[i].name+"="+this.form.elements[i].value;} | return req;};this.post=function(){var req=getHttpRequest();req.open("POST",posturl,true);req.setRequestHeader("X-Requested-With","XMLHttpRequest");req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var data="";for(var i=0;i<this.form.elements.length;i++){data+="&"+encodeURIComponent(this.form.elements[i].name)+"="+encodeURIComponent(this.form.elements[i].value);} | var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}}return req;};this.post=function(){var req=getHttpRequest();req.open("POST",posturl,true);req.setRequestHeader("X-Requested-With","XMLHttpRequest");req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var data="";for(var i=0;i<this.form.elements.length;i++){data+="&"+this.form.elements[i].name+"="+this.form.elements[i].value;}data=data.length>1?data.substring(1):"";req.onreadystatechange=function(e){if(req.readyState==4&&req.status==200){t.timeline.innerHTML=req.responseText+t.timeline.innerHTML;}}req.send(data);}var loadfunc=function(event){t.form=document.getElementById(id+"_form");t.body=document.getElementById(id+"_activity_data_body");t.timeline=document.getElementById(id+"_timeline");t.body.onkeyup=function(){var count=this.value.length;document.getElementById(id+"_count").innerHTML=140-count;};t.body.onkeyup();addEventListener(t.form,"submit",function(event){if(t.body.value&&t.body.value.length>0&&t.body.value.length<=140){t.post();t.body.value="";t.body.onkeyup();}if(event.preventDefault){event.preventDefault();}else{return false;}},false);}addEventListener(window,"load",loadfunc,false);} |
var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select location of JSON encoded output:', Components.interfaces.nsIFilePicker.modeSave); var result = fp.show(); if (result != Components.interfaces.nsIFilePicker.returnOK && result != Components.interfaces.nsIFilePicker.returnReplace) { | var fileToSave = PAGESPEED.Utils.openSaveAsDialogBox( 'Select location of JSON encoded output:', 'pagespeed_results.json'); if (!fileToSave) { | PAGESPEED.ResultsWriter.openJsonExportDialog = function(resultsContainer) { // Open a save as dialog box: var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select location of JSON encoded output:', Components.interfaces.nsIFilePicker.modeSave); var result = fp.show(); if (result != Components.interfaces.nsIFilePicker.returnOK && result != Components.interfaces.nsIFilePicker.returnReplace) { // User canceled. Nothing to do. return; } // Save the selected file. PAGESPEED.ResultsWriter.writeToFile(fp.file.path, resultsContainer);}; |
PAGESPEED.ResultsWriter.writeToFile(fp.file.path, resultsContainer); | PAGESPEED.ResultsWriter.writeToFile(fileToSave.path, resultsContainer); | PAGESPEED.ResultsWriter.openJsonExportDialog = function(resultsContainer) { // Open a save as dialog box: var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select location of JSON encoded output:', Components.interfaces.nsIFilePicker.modeSave); var result = fp.show(); if (result != Components.interfaces.nsIFilePicker.returnOK && result != Components.interfaces.nsIFilePicker.returnReplace) { // User canceled. Nothing to do. return; } // Save the selected file. PAGESPEED.ResultsWriter.writeToFile(fp.file.path, resultsContainer);}; |
Ci.nsIFilePicker.modeSave); | Components.interfaces.nsIFilePicker.modeSave); | PAGESPEED.ResultsWriter.openJsonExportDialog = function(resultsContainer) { // Open a save as dialog box: var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select location of JSON encoded output:', Ci.nsIFilePicker.modeSave); var result = fp.show(); if (result != Ci.nsIFilePicker.returnOK && result != Ci.nsIFilePicker.returnReplace) { // User canceled. Nothing to do. return; } // Save the selected file. PAGESPEED.ResultsWriter.writeToFile(fp.file.path, resultsContainer);}; |
if (result != Ci.nsIFilePicker.returnOK && result != Ci.nsIFilePicker.returnReplace) { | if (result != Components.interfaces.nsIFilePicker.returnOK && result != Components.interfaces.nsIFilePicker.returnReplace) { | PAGESPEED.ResultsWriter.openJsonExportDialog = function(resultsContainer) { // Open a save as dialog box: var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select location of JSON encoded output:', Ci.nsIFilePicker.modeSave); var result = fp.show(); if (result != Ci.nsIFilePicker.returnOK && result != Ci.nsIFilePicker.returnReplace) { // User canceled. Nothing to do. return; } // Save the selected file. PAGESPEED.ResultsWriter.writeToFile(fp.file.path, resultsContainer);}; |
event.stopPropagation(); | openLink: function(event) { event.preventDefault(); PAGESPEED.Utils.openLink(event.target); }, |
|
this.rangeFind = null; | openPrompt: function (mode) { let backwards = mode == modes.FIND_BACKWARD; commandline.open(backwards ? "?" : "/", "", mode); this.find("", backwards); }, |
|
if (this.rangeFind) | if (this.rangeFind && this.rangeFind.window.get() == window) | openPrompt: function (mode) { let backwards = mode == modes.FIND_BACKWARD; commandline.open(backwards ? "?" : "/", "", mode); if (this.rangeFind) this.rangeFind.reset(); this.find("", backwards); }, |
var FLAG_compilation_level = flags.Flag.value(jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS); FLAG_compilation_level.get().setOptionsForCompilationLevel(options); var FLAG_warning_level = flags.Flag.value(jscomp.WarningLevel.DEFAULT); FLAG_warning_level.get().setOptionsForWarningLevel(options); | var FLAG_compilation_level = jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS; FLAG_compilation_level.setOptionsForCompilationLevel(options); var FLAG_warning_level = jscomp.WarningLevel.DEFAULT; FLAG_warning_level.setOptionsForWarningLevel(options); | buildUtil.optimizeJs = function(/*String fileName*/fileName, /*String*/fileContents, /*String*/copyright, /*String*/optimizeType, /*String*/stripConsole){ //summary: either strips comments from string or compresses it. copyright = copyright || ""; // understand stripConsole from dojo 1.3 and before if (stripConsole == "none") { stripConsole = undefined; } else if (stripConsole == "normal,warn") { //logger.info("Converting stripConsole "normal,warn" to \"warn\" logger.warn("stripConsole value \"normal,warn\" replaced with \"warn\". Please update your build scripts."); stripConsole = "warn"; } else if (stripConsole == "normal,error") { logger.warn("stripConsole value \"normal,error\" replaced with \"all\". Please update your build scripts."); stripConsole = "all"; } // sanity check stripConsole if (stripConsole != undefined && !stripConsole.match(/normal|warn|all/)) { throw "Invalid stripConsole provided (" + stripConsole + ")"; } if (stripConsole == undefined) { // java will receive undefined as "undefined" but null as null. stripConsole = null; } //Use rhino to help do minifying/compressing. var context = Packages.org.mozilla.javascript.Context.enter(); try{ // Use the interpreter for interactive input (copied this from Main rhino class). context.setOptimizationLevel(-1); if(optimizeType.indexOf("shrinksafe") == 0 || optimizeType == "packer"){ //Apply compression using custom compression call in Dojo-modified rhino. fileContents = new String(Packages.org.dojotoolkit.shrinksafe.Compressor.compressScript(fileContents, 0, 1, stripConsole)); if(optimizeType.indexOf(".keepLines") == -1){ fileContents = fileContents.replace(/[\r\n]/g, ""); } }else if(optimizeType.indexOf("closure") == 0){ var jscomp = com.google.javascript.jscomp; var flags = com.google.common.flags; //Fake extern var externSourceFile = buildUtil.closurefromCode("fakeextern.js", " "); //Set up source input var jsSourceFile = buildUtil.closurefromCode(String(fileName), String(fileContents)); //Set up options var options = new jscomp.CompilerOptions(); options.prettyPrint = optimizeType.indexOf(".keepLines") !== -1; var FLAG_compilation_level = flags.Flag.value(jscomp.CompilationLevel.SIMPLE_OPTIMIZATIONS); FLAG_compilation_level.get().setOptionsForCompilationLevel(options); var FLAG_warning_level = flags.Flag.value(jscomp.WarningLevel.DEFAULT); FLAG_warning_level.get().setOptionsForWarningLevel(options); //Run the compiler var compiler = new Packages.com.google.javascript.jscomp.Compiler(Packages.java.lang.System.err); result = compiler.compile(externSourceFile, jsSourceFile, options); fileContents = compiler.toSource(); }else if(optimizeType == "comments"){ //Strip comments var script = context.compileString(fileContents, fileName, 1, null); fileContents = new String(context.decompileScript(script, 0)); //Replace the spaces with tabs. //Ideally do this in the pretty printer rhino code. fileContents = fileContents.replace(/ /g, "\t"); //If this is an nls bundle, make sure it does not end in a ; //Otherwise, bad things happen. if(fileName.match(/\/nls\//)){ fileContents = fileContents.replace(/;\s*$/, ""); } } }finally{ Packages.org.mozilla.javascript.Context.exit(); } return copyright + fileContents;} |
if (value) services.get("debugger").on(); | if (value) { if (!services.get("debugger").isOn) services.get("debugger").asyncOn(null); } | options: function () { options.add(["jsdebugger", "jsd"], "Switch on/off jsdebugger", "boolean", false, { setter: function (value) { if (value) services.get("debugger").on(); else services.get("debugger").off(); }, getter: function () services.get("debugger").isOn }); } |
completer: function (context) [[k, v[1]] for ([k, v] in Iterator(this.pageInfo))] | completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] | options: function () { options.add(["nextpattern"], // \u00BB is » (>> in a single char) "Patterns to use when guessing the 'next' page in a document sequence", "stringlist", "\\bnext\\b,^>$,^(>>|\u00BB)$,^(>|\u00BB),(>|\u00BB)$,\\bmore\\b"); options.add(["previouspattern"], // \u00AB is « (<< in a single char) "Patterns to use when guessing the 'previous' page in a document sequence", "stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$"); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(this.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "number", 1, { completer: function (context) [ ["0", "Don't show link destination"], ["1", "Show the link in the status line"], ["2", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
options.add(["strictfocus", "sf"], "Prevent scripts from focusing input elements without user intervention", "boolean", true); | options: function () { options.add(["eventignore", "ei"], "List of autocommand event names which should be ignored", "stringlist", "", { completer: function () Iterator(update({ all: "All Events" }, config.autocommands)) }); options.add(["strictfocus", "sf"], "Prevent scripts from focusing input elements without user intervention", "boolean", true); } |
|
completer: function (context) array(values(completion.urlCompleters)) | completer: function (context) values(completion.urlCompleters) | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexlist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", typeof(config.defaults["complete"]) == "string" ? config.defaults["complete"] : "slf", { completer: function (context) array(values(completion.urlCompleters)) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the begining of the result", "regexlist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexlist", ".*"); } |
"Replace occurences of ! with the previous command when executing external commands", | "Replace occurrences of ! with the previous command when executing external commands", | options: function () { var shell, shellcmdflag; if (dactyl.has("WINNT")) { shell = "cmd.exe"; // TODO: setting 'shell' to "something containing sh" updates // 'shellcmdflag' appropriately at startup on Windows in Vim shellcmdflag = "/c"; } else { shell = services.get("environment").get("SHELL") || "sh"; shellcmdflag = "-c"; } options.add(["banghist", "bh"], "Replace occurences of ! with the previous command when executing external commands", "boolean", true); options.add(["fileencoding", "fenc"], "Sets the character encoding of read and written files", "string", "UTF-8", { completer: function (context) completion.charset(context), getter: function () File.defaultEncoding, setter: function (value) (File.defaultEncoding = value) }); options.add(["cdpath", "cd"], "List of directories searched when executing :cd", "stringlist", ["."].concat(services.get("environment").get("CDPATH").split(/[:;]/).filter(util.identity)).join(","), { setter: function (value) File.expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", "stringlist", IO.runtimePath, { setter: function (value) File.expandPathList(value) }); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", "string", shell, { setter: function (value) File.expandPath(value) }); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands", "string", shellcmdflag); options.add(["wildignore", "wig"], "List of file patterns to ignore when completing files", "regexlist", ""); } |
"Sets the current buffer's character encoding", | "The current buffer's character encoding", | options: function () { options.add(["encoding", "enc"], "Sets the current buffer's character encoding", "string", "UTF-8", { scope: Option.SCOPE_LOCAL, getter: function () config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset, setter: function (val) { if (options["encoding"] == val) return val; // Stolen from browser.jar/content/browser/browser.js, more or less. try { config.browser.docShell.QueryInterface(Ci.nsIDocCharset).charset = val; PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val); getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE); } catch (e) { dactyl.reportError(e); } return null; }, completer: function (context) completion.charset(context) }); }, |
"stringlist", "," + (services.get("environment").get("CDPATH").replace(/[:;]/g, ",") || ","), | "stringlist", ["."].concat(services.get("environment").get("CDPATH").split(/[:;]/).filter(util.identity)).join(","), | options: function () { var shell, shellcmdflag; if (dactyl.has("WINNT")) { shell = "cmd.exe"; // TODO: setting 'shell' to "something containing sh" updates // 'shellcmdflag' appropriately at startup on Windows in Vim shellcmdflag = "/c"; } else { shell = services.get("environment").get("SHELL") || "sh"; shellcmdflag = "-c"; } options.add(["banghist", "bh"], "Replace occurences of ! with the previous command when executing external commands", "banghist", true); options.add(["fileencoding", "fenc"], "Sets the character encoding of read and written files", "string", "UTF-8", { completer: function (context) completion.charset(context), getter: function () File.defaultEncoding, setter: function (value) (File.defaultEncoding = value) }); options.add(["cdpath", "cd"], "List of directories searched when executing :cd", "stringlist", "," + (services.get("environment").get("CDPATH").replace(/[:;]/g, ",") || ","), { setter: function (value) File.expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", "stringlist", IO.runtimePath, { setter: function (value) File.expandPathList(value) }); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", "string", shell, { setter: function (value) File.expandPath(value) }); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands", "string", shellcmdflag); options.add(["wildignore", "wig"], "List of file patterns to ignore when completing files", "regexlist", ""); } |
completer: function completer(context) { completion.search(context, true); | completer: function completer(context, args) { completion.search(context, args, true); | options: function () { options.add(["defsearch", "ds"], "Set the default search engine", "string", "google", { completer: function completer(context) { completion.search(context, true); context.completions = [["", "Don't perform searches by default"]].concat(context.completions); } }); options.add(["suggestengines"], "Engine Alias which has a feature of suggest", "stringlist", "google", { completer: function completer(context) completion.searchEngine(context, true), }); }, |
completer: function completer(context) completion.searchEngine(context, true), | completer: function completer(context, args) completion.searchEngine(context, args, true), | options: function () { options.add(["defsearch", "ds"], "Set the default search engine", "string", "google", { completer: function completer(context) { completion.search(context, true); context.completions = [["", "Don't perform searches by default"]].concat(context.completions); } }); options.add(["suggestengines"], "Engine Alias which has a feature of suggest", "stringlist", "google", { completer: function completer(context) completion.searchEngine(context, true), }); }, |
"Replace occurances of ! with the previous command when executing external commands", | "Replace occurences of ! with the previous command when executing external commands", | options: function () { var shell, shellcmdflag; if (dactyl.has("Win32")) { shell = "cmd.exe"; // TODO: setting 'shell' to "something containing sh" updates // 'shellcmdflag' appropriately at startup on Windows in Vim shellcmdflag = "/c"; } else { shell = services.get("environment").get("SHELL") || "sh"; shellcmdflag = "-c"; } options.add(["banghist", "bh"], "Replace occurances of ! with the previous command when executing external commands", "banghist", true); options.add(["fileencoding", "fenc"], "Sets the character encoding of read and written files", "string", "UTF-8", { completer: function (context) completion.charset(context), getter: function () File.defaultEncoding, setter: function (value) (File.defaultEncoding = value) }); options.add(["cdpath", "cd"], "List of directories searched when executing :cd", "stringlist", "," + (services.get("environment").get("CDPATH").replace(/[:;]/g, ",") || ","), { setter: function (value) File.expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", "stringlist", IO.runtimePath, { setter: function (value) File.expandPathList(value) }); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", "string", shell, { setter: function (value) File.expandPath(value) }); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands", "string", shellcmdflag); options.add(["wildignore", "wig"], "List of file patterns to ignore when completing files", "regexlist", ""); } |
return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0) | return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0); | options: function () { options.add(["editor"], "The external text editor", "string", "gvim -f +<line> <file>", { format: function (obj, value) { let args = commands.parseArgs(value || this.value, { argCount: "*", allowUnknownOptions: true }) .map(util.compileMacro).filter(function (fmt) fmt.valid(obj)) .map(function (fmt) fmt(obj)); if (obj["file"] && !this.has("file")) args.push(obj["file"]); return args; }, has: function (key) set.has(util.compileMacro(this.value).seen, key), validator: function (value) { this.format({}, value); return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0) } }); options.add(["insertmode", "im"], "Enter Insert mode rather than Text Edit mode when focusing text areas", "boolean", true); } |
"Patterns to use when guessing the 'next' page in a document sequence", | "Patterns to use when guessing the next page in a document sequence", | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"Patterns to use when guessing the 'previous' page in a document sequence", | "Patterns to use when guessing the previous page in a document sequence", | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"Desired info in the :pageinfo output", | "Define which sections are shown by the :pageinfo command", | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"Show the destination of the link under the cursor in the status bar", | "Where to show the destination of the link under the cursor", | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] | ["", "Don't show link destinations"], ["status", "Show link destinations in the status line"], ["command", "Show link destinations in the command line"] | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"Show current website with a minimal style sheet to make it easily accessible", | "Show current website without styling defined by the author", | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), { regexpFlags: "i" }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), { regexpFlags: "i" }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "string", "status", { completer: function (context) [ ["", "Don't show link destination"], ["status", "Show the link in the status line"], ["command", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
options.safeSetPref("accessibility.typeaheadfind.autostart", false); options.safeSetPref("accessibility.typeaheadfind", false); | options: function () { options.add(["hlsearch", "hls"], "Highlight previous search pattern matches", "boolean", "false", { setter: function (value) { try { if (value) rangefinder.highlight(); else rangefinder.clear(); } catch (e) {} return value; } }); options.add(["ignorecase", "ic"], "Ignore case in search patterns", "boolean", true); options.add(["incsearch", "is"], "Show where the search pattern matches as it is typed", "boolean", true); options.add(["linksearch", "lks"], "Limit the search to hyperlink text", "boolean", false); options.add(["smartcase", "scs"], "Override the 'ignorecase' option if the pattern contains uppercase characters", "boolean", true); } |
|
if (dactyl.has("Win32")) { | if (dactyl.has("WINNT")) { | options: function () { var shell, shellcmdflag; if (dactyl.has("Win32")) { shell = "cmd.exe"; // TODO: setting 'shell' to "something containing sh" updates // 'shellcmdflag' appropriately at startup on Windows in Vim shellcmdflag = "/c"; } else { shell = services.get("environment").get("SHELL") || "sh"; shellcmdflag = "-c"; } options.add(["banghist", "bh"], "Replace occurences of ! with the previous command when executing external commands", "banghist", true); options.add(["fileencoding", "fenc"], "Sets the character encoding of read and written files", "string", "UTF-8", { completer: function (context) completion.charset(context), getter: function () File.defaultEncoding, setter: function (value) (File.defaultEncoding = value) }); options.add(["cdpath", "cd"], "List of directories searched when executing :cd", "stringlist", "," + (services.get("environment").get("CDPATH").replace(/[:;]/g, ",") || ","), { setter: function (value) File.expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", "stringlist", IO.runtimePath, { setter: function (value) File.expandPathList(value) }); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", "string", shell, { setter: function (value) File.expandPath(value) }); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands", "string", shellcmdflag); options.add(["wildignore", "wig"], "List of file patterns to ignore when completing files", "regexlist", ""); } |
"Set the external text editor", | "The external text editor", | options: function () { options.add(["editor"], "Set the external text editor", "string", "gvim -f +%l %f", { format: function (obj, value) { let args = commands.parseArgs(value || this.value, { argCount: "*", allowUnknownOptions: true }) .map(util.compileFormat).filter(function (fmt) fmt.valid(obj)) .map(function (fmt) fmt(obj)); if (obj["f"] && !this.has("f")) args.push(obj["f"]); return args; }, has: function (key) set.has(util.compileFormat(this.value).seen, key), validator: function (value) { this.format({}, value); return Object.keys(util.compileFormat(value).seen).every(function (k) "cfl".indexOf(k) >= 0) } }); options.add(["insertmode", "im"], "Use Insert mode as the default for text areas", "boolean", true); } |
"Use Insert mode as the default for text areas", | "Enter Insert mode rather than Text Edit mode when focusing text areas", | options: function () { options.add(["editor"], "Set the external text editor", "string", "gvim -f +%l %f", { format: function (obj, value) { let args = commands.parseArgs(value || this.value, { argCount: "*", allowUnknownOptions: true }) .map(util.compileFormat).filter(function (fmt) fmt.valid(obj)) .map(function (fmt) fmt(obj)); if (obj["f"] && !this.has("f")) args.push(obj["f"]); return args; }, has: function (key) set.has(util.compileFormat(this.value).seen, key), validator: function (value) { this.format({}, value); return Object.keys(util.compileFormat(value).seen).every(function (k) "cfl".indexOf(k) >= 0) } }); options.add(["insertmode", "im"], "Use Insert mode as the default for text areas", "boolean", true); } |
"Maximum number of items to display at once", | "Maximum number of completion items to display at once", | options: function () { options.add(["history", "hi"], "Number of Ex commands and search patterns to store in the command-line history", "number", 500, { validator: function (value) value >= 0 }); options.add(["maxitems"], "Maximum number of items to display at once", "number", 20, { validator: function (value) value >= 1 }); options.add(["messages", "msgs"], "Number of messages to store in the message history", "number", 100, { validator: function (value) value >= 0 }); options.add(["more"], "Pause the message list window when more than one screen of listings is displayed", "boolean", true); options.add(["showmode", "smd"], "Show the current mode in the command line", "boolean", true); }, |
"Number of messages to store in the message history", | "Number of messages to store in the :message history", | options: function () { options.add(["history", "hi"], "Number of Ex commands and search patterns to store in the command-line history", "number", 500, { validator: function (value) value >= 0 }); options.add(["maxitems"], "Maximum number of items to display at once", "number", 20, { validator: function (value) value >= 1 }); options.add(["messages", "msgs"], "Number of messages to store in the message history", "number", 100, { validator: function (value) value >= 0 }); options.add(["more"], "Pause the message list window when more than one screen of listings is displayed", "boolean", true); options.add(["showmode", "smd"], "Show the current mode in the command line", "boolean", true); }, |
"Pause the message list window when more than one screen of listings is displayed", | "Pause the message list window when the full output will not fit on one page", | options: function () { options.add(["history", "hi"], "Number of Ex commands and search patterns to store in the command-line history", "number", 500, { validator: function (value) value >= 0 }); options.add(["maxitems"], "Maximum number of items to display at once", "number", 20, { validator: function (value) value >= 1 }); options.add(["messages", "msgs"], "Number of messages to store in the message history", "number", 100, { validator: function (value) value >= 0 }); options.add(["more"], "Pause the message list window when more than one screen of listings is displayed", "boolean", true); options.add(["showmode", "smd"], "Show the current mode in the command line", "boolean", true); }, |
["longest", "Complete to longest common string"], | ["longest", "Complete the longest common string"], | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
["list:longest", "List all and complete common string"] | ["list:longest", "List all and complete the longest common string"] | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
"Define how command-line completion works when the Alt key is pressed", | "Define the behavior of the <A-Tab> key in command-line completion", | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
"Regexp list defining which contexts require matches anchored to the beginning of the result", | "Define which completion groups only match at the beginning of their text", | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
"Define how command-line completion works", | "Define the behavior of the <Tab> key in command-line completion", | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
"Regexp list of which contexts to sort", | "Define which completion groups are sorted", | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command-line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexplist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the beginning of the result", "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexpmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command-line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexplist", ".*"); } |
"Highlight previous search pattern matches", | "Highlight all /search pattern matches on the current page after a search", | options: function () { // prefs.safeSet("accessibility.typeaheadfind.autostart", false); // The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187 prefs.safeSet("accessibility.typeaheadfind", false); options.add(["hlsearch", "hls"], "Highlight previous search pattern matches", "boolean", false, { setter: function (value) { try { if (value) rangefinder.highlight(); else rangefinder.clear(); } catch (e) {} return value; } }); options.add(["searchcase", "sc"], "Search case matching mode", "string", "smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["incsearch", "is"], "Show where the search pattern matches as it is typed", "boolean", true); options.add(["linksearch", "lks"], "Limit the search to hyperlink text", "boolean", false); } |
"Show where the search pattern matches as it is typed", | "Search for a pattern incrementally as it is typed rather than awaiting <Return>", | options: function () { // prefs.safeSet("accessibility.typeaheadfind.autostart", false); // The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187 prefs.safeSet("accessibility.typeaheadfind", false); options.add(["hlsearch", "hls"], "Highlight previous search pattern matches", "boolean", false, { setter: function (value) { try { if (value) rangefinder.highlight(); else rangefinder.clear(); } catch (e) {} return value; } }); options.add(["searchcase", "sc"], "Search case matching mode", "string", "smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["incsearch", "is"], "Show where the search pattern matches as it is typed", "boolean", true); options.add(["linksearch", "lks"], "Limit the search to hyperlink text", "boolean", false); } |
options.add(["linksearch", "lks"], "Limit the search to hyperlink text", "boolean", false); | options: function () { // prefs.safeSet("accessibility.typeaheadfind.autostart", false); // The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187 prefs.safeSet("accessibility.typeaheadfind", false); options.add(["hlsearch", "hls"], "Highlight previous search pattern matches", "boolean", false, { setter: function (value) { try { if (value) rangefinder.highlight(); else rangefinder.clear(); } catch (e) {} return value; } }); options.add(["searchcase", "sc"], "Search case matching mode", "string", "smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["incsearch", "is"], "Show where the search pattern matches as it is typed", "boolean", true); options.add(["linksearch", "lks"], "Limit the search to hyperlink text", "boolean", false); } |
|
completer: function () config.autocommands.concat([["all", "All events"]]) | completer: function () Iterator(update({ all: "All Events" }, config.autocommands)) | options: function () { options.add(["eventignore", "ei"], "List of autocommand event names which should be ignored", "stringlist", "", { completer: function () config.autocommands.concat([["all", "All events"]]) }); options.add(["strictfocus", "sf"], "Prevent scripts from focusing input elements without user intervention", "boolean", true); } |
options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); | if (!config.isComposeWindow) { options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } | options: function () { options.add(["nextpattern"], // \u00BB is » (>> in a single char) "Patterns to use when guessing the 'next' page in a document sequence", "stringlist", "\\bnext\\b,^>$,^(>>|\u00BB)$,^(>|\u00BB),(>|\u00BB)$,\\bmore\\b"); options.add(["previouspattern"], // \u00AB is « (<< in a single char) "Patterns to use when guessing the 'previous' page in a document sequence", "stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$"); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "number", 1, { completer: function (context) [ ["0", "Don't show link destination"], ["1", "Show the link in the status line"], ["2", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"Set the default search engine", | "The default search engine", | options: function () { options.add(["defsearch", "ds"], "Set the default search engine", "string", "google", { completer: function completer(context) { completion.search(context, true); context.completions = [{ keyword: "", title: "Don't perform searches by default" }].concat(context.completions); } }); options.add(["suggestengines"], "Engine alias which provide search suggestions", "stringlist", "google", { completer: function completer(context) completion.searchEngine(context, true), }); }, |
"Engine alias which provide search suggestions", | "Search engines used for search suggestions", | options: function () { options.add(["defsearch", "ds"], "Set the default search engine", "string", "google", { completer: function completer(context) { completion.search(context, true); context.completions = [{ keyword: "", title: "Don't perform searches by default" }].concat(context.completions); } }); options.add(["suggestengines"], "Engine alias which provide search suggestions", "stringlist", "google", { completer: function completer(context) completion.searchEngine(context, true), }); }, |
"Use the JavaScript debugger service for JavaScript completion", | "Enable the JavaScript debugger service for use in JavaScript completion", | options: function () { options.add(["jsdebugger", "jsd"], "Use the JavaScript debugger service for JavaScript completion", "boolean", false, { setter: function (value) { if (services.debugger.isOn != value) if (value) (services.debugger.asyncOn || services.debugger.on)(null); else services.debugger.off(); }, getter: function () services.debugger.isOn }); } |
"Defines the replacement keys for the <Leader> pseudo-key", | "Define the replacement keys for the <Leader> pseudo-key", | options: function () { options.add(["mapleader", "ml"], "Defines the replacement keys for the <Leader> pseudo-key", "string", "\\"); } |
"banghist", true); | "boolean", true); | options: function () { var shell, shellcmdflag; if (dactyl.has("WINNT")) { shell = "cmd.exe"; // TODO: setting 'shell' to "something containing sh" updates // 'shellcmdflag' appropriately at startup on Windows in Vim shellcmdflag = "/c"; } else { shell = services.get("environment").get("SHELL") || "sh"; shellcmdflag = "-c"; } options.add(["banghist", "bh"], "Replace occurences of ! with the previous command when executing external commands", "banghist", true); options.add(["fileencoding", "fenc"], "Sets the character encoding of read and written files", "string", "UTF-8", { completer: function (context) completion.charset(context), getter: function () File.defaultEncoding, setter: function (value) (File.defaultEncoding = value) }); options.add(["cdpath", "cd"], "List of directories searched when executing :cd", "stringlist", ["."].concat(services.get("environment").get("CDPATH").split(/[:;]/).filter(util.identity)).join(","), { setter: function (value) File.expandPathList(value) }); options.add(["runtimepath", "rtp"], "List of directories searched for runtime files", "stringlist", IO.runtimePath, { setter: function (value) File.expandPathList(value) }); options.add(["shell", "sh"], "Shell to use for executing :! and :run commands", "string", shell, { setter: function (value) File.expandPath(value) }); options.add(["shellcmdflag", "shcf"], "Flag passed to shell when executing :! and :run commands", "string", shellcmdflag); options.add(["wildignore", "wig"], "List of file patterns to ignore when completing files", "regexlist", ""); } |
"regexlist", "!/ex/(back|buffer|ext|forward|help|undo),.*"); | "regexlist", "!/ex/(back|buffer|ext|forward|help|undo)"); | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.values.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexlist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", typeof(config.defaults["complete"]) == "string" ? config.defaults["complete"] : "slf", { completer: function (context) array(values(completion.urlCompleters)) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the begining of the result", "regexlist", "!/ex/(back|buffer|ext|forward|help|undo),.*"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexmap", "smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexlist", ".*"); } |
"Regexp list defining which contexts require matches anchored to the begining of the result", | "Regexp list defining which contexts require matches anchored to the beginning of the result", | options: function () { let wildmode = { completer: function (context) [ // Why do we need ""? // Because its description is useful during completion. --Kris ["", "Complete only the first match"], ["full", "Complete the next full match"], ["longest", "Complete to longest common string"], ["list", "If more than one match, list all matches"], ["list:full", "List all and complete first match"], ["list:longest", "List all and complete common string"] ], checkHas: function (value, val) { let [first, second] = value.split(":", 2); return first == val || second == val; }, has: function () { test = function (val) this.value.some(function (value) this.checkHas(value, val), this); return Array.some(arguments, test, this); } }; options.add(["altwildmode", "awim"], "Define how command line completion works when the Alt key is pressed", "stringlist", "list:full", wildmode); options.add(["autocomplete", "au"], "Automatically update the completion list on any key press", "regexlist", ".*"); options.add(["complete", "cpt"], "Items which are completed at the :open prompts", "charlist", typeof(config.defaults["complete"]) == "string" ? config.defaults["complete"] : "slf", { completer: function (context) values(completion.urlCompleters) }); options.add(["wildanchor", "wia"], "Regexp list defining which contexts require matches anchored to the begining of the result", "regexlist", "!/ex/(back|buffer|ext|forward|help|undo)"); options.add(["wildcase", "wic"], "Completion case matching mode", "regexmap", ".?:smart", { completer: function () [ ["smart", "Case is significant when capital letters are typed"], ["match", "Case is always significant"], ["ignore", "Case is never significant"] ] }); options.add(["wildmode", "wim"], "Define how command line completion works", "stringlist", "list:full", wildmode); options.add(["wildsort", "wis"], "Regexp list of which contexts to sort", "regexlist", ".*"); } |
"stringlist", UTF8("\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"), { validator: Option.validateXPath }); | "stringlist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'")); | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "stringlist", UTF8("\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"), { validator: Option.validateXPath }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "stringlist", UTF8("\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"), { validator: Option.validateXPath }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "number", 1, { completer: function (context) [ ["0", "Don't show link destination"], ["1", "Show the link in the status line"], ["2", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
"stringlist", UTF8("\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"), { validator: Option.validateXPath }); | "stringlist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$")); | options: function () { options.add(["nextpattern"], "Patterns to use when guessing the 'next' page in a document sequence", "stringlist", UTF8("\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"), { validator: Option.validateXPath }); options.add(["previouspattern"], "Patterns to use when guessing the 'previous' page in a document sequence", "stringlist", UTF8("\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"), { validator: Option.validateXPath }); options.add(["pageinfo", "pa"], "Desired info in the :pageinfo output", "charlist", "gfm", { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] }); options.add(["scroll", "scr"], "Number of lines to scroll with <C-u> and <C-d> commands", "number", 0, { validator: function (value) value >= 0 }); options.add(["showstatuslinks", "ssli"], "Show the destination of the link under the cursor in the status bar", "number", 1, { completer: function (context) [ ["0", "Don't show link destination"], ["1", "Show the link in the status line"], ["2", "Show the link in the command line"] ] }); options.add(["usermode", "um"], "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, getter: function () config.browser.markupDocumentViewer.authorStyleDisabled }); } |
var target = newValues.pop() || ""; | completion.optionValue = function (context, name, op, curValue, completer) { let opt = options.get(name); completer = completer || opt.completer; if (!completer) return; try { var curValues = curValue != null ? opt.parseValues(curValue) : opt.values; var newValues = opt.parseValues(context.filter); } catch (e) { context.message = "Error: " + e; context.completions = []; return; } switch (opt.type) { case "boolean": if (!completer) completer = function () [["true", ""], ["false", ""]]; break; case "regexlist": newValues = Option.splitList(context.filter); // Fallthrough case "stringlist": var target = newValues.pop() || ""; break; case "stringmap": case "regexmap": let vals = Option.splitList(context.filter); target = vals.pop() || ""; Option._splitAt += target.indexOf(":") ? target.indexOf(":") + 1 : 0; break; } // TODO: Highlight when invalid context.advance(Option._splitAt); context.filter = target != null ? target : Option.dequote(context.filter); context.title = ["Option Value"]; context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] // Not Vim compatible, but is a significant enough improvement // that it's worth breaking compatibility. if (isArray(newValues)) { context.filters.push(function (i) newValues.indexOf(i.text) == -1); if (op == "+") context.filters.push(function (i) curValues.indexOf(i.text) == -1); if (op == "-") context.filters.push(function (i) curValues.indexOf(i.text) > -1); } let res = completer.call(opt, context); if (res) context.completions = res; }; |
|
context.filter = target != null ? target : Option.dequote(context.filter); | context.filter = Option.dequote(context.filter); | completion.optionValue = function (context, name, op, curValue, completer) { let opt = options.get(name); completer = completer || opt.completer; if (!completer) return; try { var curValues = curValue != null ? opt.parseValues(curValue) : opt.values; var newValues = opt.parseValues(context.filter); } catch (e) { context.message = "Error: " + e; context.completions = []; return; } switch (opt.type) { case "boolean": if (!completer) completer = function () [["true", ""], ["false", ""]]; break; case "regexlist": newValues = Option.splitList(context.filter); // Fallthrough case "stringlist": var target = newValues.pop() || ""; break; case "stringmap": case "regexmap": let vals = Option.splitList(context.filter); target = vals.pop() || ""; Option._splitAt += target.indexOf(":") ? target.indexOf(":") + 1 : 0; break; } // TODO: Highlight when invalid context.advance(Option._splitAt); context.filter = target != null ? target : Option.dequote(context.filter); context.title = ["Option Value"]; context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] // Not Vim compatible, but is a significant enough improvement // that it's worth breaking compatibility. if (isArray(newValues)) { context.filters.push(function (i) newValues.indexOf(i.text) == -1); if (op == "+") context.filters.push(function (i) curValues.indexOf(i.text) == -1); if (op == "-") context.filters.push(function (i) curValues.indexOf(i.text) > -1); } let res = completer.call(opt, context); if (res) context.completions = res; }; |
optionValue: function(opt) { return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; } | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | optionValue: function(opt) { // extend element because hasAttribute may not be native return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; } |
target = vals.pop() || ""; Option._splitAt += target.indexOf(":") ? target.indexOf(":") + 1 : 0; | let target = vals.pop() || ""; let [count, key, quote] = Commands.parseArg(target, /:/, true); let split = Option._splitAt; extra.key = Option.dequote(key); extra.value = count < target.length ? Option.dequote(target.substr(count + 1)) : null; extra.values = opt.parseValues(vals.join(",")); Option._splitAt = split + (extra.value == null ? 0 : count + 1); | completion.optionValue = function (context, name, op, curValue, completer) { let opt = options.get(name); completer = completer || opt.completer; if (!completer) return; try { var curValues = curValue != null ? opt.parseValues(curValue) : opt.values; var newValues = opt.parseValues(context.filter); } catch (e) { context.message = "Error: " + e; context.completions = []; return; } switch (opt.type) { case "boolean": if (!completer) completer = function () [["true", ""], ["false", ""]]; break; case "regexlist": newValues = Option.splitList(context.filter); // Fallthrough case "stringlist": break; case "stringmap": case "regexmap": let vals = Option.splitList(context.filter); target = vals.pop() || ""; Option._splitAt += target.indexOf(":") ? target.indexOf(":") + 1 : 0; break; } // TODO: Highlight when invalid context.advance(Option._splitAt); context.filter = Option.dequote(context.filter); context.title = ["Option Value"]; context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] // Not Vim compatible, but is a significant enough improvement // that it's worth breaking compatibility. if (isArray(newValues)) { context.filters.push(function (i) newValues.indexOf(i.text) == -1); if (op == "+") context.filters.push(function (i) curValues.indexOf(i.text) == -1); if (op == "-") context.filters.push(function (i) curValues.indexOf(i.text) > -1); } let res = completer.call(opt, context); if (res) context.completions = res; }; |
let res = completer.call(opt, context); | let res = completer.call(opt, context, extra); | completion.optionValue = function (context, name, op, curValue, completer) { let opt = options.get(name); completer = completer || opt.completer; if (!completer) return; try { var curValues = curValue != null ? opt.parseValues(curValue) : opt.values; var newValues = opt.parseValues(context.filter); } catch (e) { context.message = "Error: " + e; context.completions = []; return; } switch (opt.type) { case "boolean": if (!completer) completer = function () [["true", ""], ["false", ""]]; break; case "regexlist": newValues = Option.splitList(context.filter); // Fallthrough case "stringlist": break; case "stringmap": case "regexmap": let vals = Option.splitList(context.filter); target = vals.pop() || ""; Option._splitAt += target.indexOf(":") ? target.indexOf(":") + 1 : 0; break; } // TODO: Highlight when invalid context.advance(Option._splitAt); context.filter = Option.dequote(context.filter); context.title = ["Option Value"]; context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] // Not Vim compatible, but is a significant enough improvement // that it's worth breaking compatibility. if (isArray(newValues)) { context.filters.push(function (i) newValues.indexOf(i.text) == -1); if (op == "+") context.filters.push(function (i) curValues.indexOf(i.text) == -1); if (op == "-") context.filters.push(function (i) curValues.indexOf(i.text) > -1); } let res = completer.call(opt, context); if (res) context.completions = res; }; |
if( document.getElementById(select_id).value == "Other"){ document.getElementById(select_id).style.visibility = "hidden"; document.getElementById(back_id).type = "button"; document.getElementById(text_id).type = "text"; | var select = document.getElementById(select_id); if( select.value == "Other"){ select.style.visibility = "hidden"; document.getElementById(back_id).style.visibility = "visible"; document.getElementById(text_id).style.visibility="visible"; | function otherOption(select_id, back_id, text_id){ if( document.getElementById(select_id).value == "Other"){ document.getElementById(select_id).style.visibility = "hidden"; document.getElementById(back_id).type = "button"; document.getElementById(text_id).type = "text"; } } |
overlap: function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | overlap: function(mode, element) { if (!mode) return 0; if (mode == 'vertical') return ((this.offset[1] + element.offsetHeight) - this.ycomp) / element.offsetHeight; if (mode == 'horizontal') return ((this.offset[0] + element.offsetWidth) - this.xcomp) / element.offsetWidth; }, |
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget); | j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g, "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= | e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget); |
this.throwIfDisposed_(); | activity.TimelineView.BarChart_.prototype.padToEndTime = function(endTime) { this.throwIfDisposed_(); var duration = endTime - this.endTime_; if (duration < 0) { throw new Error(['Current BarChart end time', this.endTime_, 'exceeds requested end time', endTime].join(' ')); } if (duration == 0) { // We're already padded to the specified end time, so return. return; } this.appendSpacer_(duration, null); this.endTime_ = endTime;}; |
|
if (!c || c.length < (c.currentPage + 1) * this.PAGE_SIZE) { | if (!c || (c.currentPage + 1) * this.PAGE_SIZE >= c.length) { | pageDown: function () { var c = this._candidateList; if (!c || c.length < (c.currentPage + 1) * this.PAGE_SIZE) { return false; } ++c.currentPage; this._current = c[c.currentPage * this.PAGE_SIZE]; this._updateUI(); return true; }, |
PAGESPEED.PageLoadTimer = function() { | PAGESPEED.PageLoadTimer = function(couldHaveMissedStart) { | PAGESPEED.PageLoadTimer = function() { /** * The window whose timing we are measuring. null when no measurement * is in progress. * @type {nsIDOMWindow} * @private */ this.window_ = null;}; |
this.couldHaveMissedStart_ = couldHaveMissedStart; | PAGESPEED.PageLoadTimer = function() { /** * The window whose timing we are measuring. null when no measurement * is in progress. * @type {nsIDOMWindow} * @private */ this.window_ = null;}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.