rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
jQuery(function() { jQuery('textarea').addProofreader(); if (AtD.ignoreStrings != undefined) AtD.setIgnoreStrings(AtD.ignoreStrings); if (AtD.ignoreTypes != undefined) AtD.showTypes(AtD.ignoreTypes); }); | $this.parents('form').submit(function(e) { AtD.restoreTextArea(id); if (AtD.autoproofread != undefined && AtD.autoproofread == 1 && AtD.proofread_click_count <= 0 && $this.val() != ""){ e.preventDefault(); AtD_check( id, node ); } }); | jQuery(function() { jQuery('textarea').addProofreader(); if (AtD.ignoreStrings != undefined) AtD.setIgnoreStrings(AtD.ignoreStrings); if (AtD.ignoreTypes != undefined) AtD.showTypes(AtD.ignoreTypes);}); |
return this.map(function(value, index) { return { value: value, criteria: iterator.call(context, value, index) }; }).sort(function(left, right) { | 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])*?\*\ | return this.map(function(value, index) { return { value: value, criteria: iterator.call(context, value, index) }; }).sort(function(left, right) { |
dactyl.assert(editor.isTextEdit); editor.executeCommand("cmd_cut"); modes.push(modes.INSERT); | modes.push(modes.VISUAL, modes.LINE); editor.executeCommand("cmd_beginLine", 1); editor.executeCommand("cmd_selectLineNext", 1); | function (count) { dactyl.assert(editor.isTextEdit); editor.executeCommand("cmd_cut"); modes.push(modes.INSERT); }); |
context.generate = function () option.values.map(function (o) [o, ""]); | ].forEach(function (params) { commands.add(params.names, params.description, function (args, modifiers) { setAction(args, update(modifiers, params.modifiers)); }, update({ bang: true, completer: function (context, args) { return setCompleter(context, args); }, domains: function (args) array.flatten(args.map(function (spec) { try { let opt = options.parseOpt(spec); if (opt.option && opt.option.domains) return opt.option.domains(opt.values); } catch (e) { dactyl.reportError(e); } return []; })), keepQuotes: true, privateData: function (args) args.some(function (spec) { let opt = options.parseOpt(spec); return opt.option && opt.option.privateData && (!callable(opt.option.privateData) || opt.option.privateData(opt.values)); }) }, params.extra || {})); }); | context.generate = function () option.values.map(function (o) [o, ""]); |
return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") return "<"; let res = tokens[token]; if (res === undefined) res = "<" + token + ">"; if (res === null) res = ""; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; }); | ArgType("list", function (arg) arg && arg.split(/\s*,\s*/)) | return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") // Don't quote, as in Vim (but, why so in Vim? You'd think people wouldn't say <q-lt> if they didn't want it) return "<"; let res = tokens[token]; if (res === undefined) // Ignore anything undefined res = "<" + token + ">"; if (res === null) res = ""; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; }); |
this.completions = items; | if (items != null) this.completions = items; | util.callAsync(thread, this, function () { if (this.cache.backgroundLock != lock) return; let items = this.generate(); if (this.cache.backgroundLock != lock) return; this.incomplete = false; this.completions = items; }); |
context.process = [function (item, text) <> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> { process.call(this, item, text) } </>]; | tabs.allTabs.forEach(function (tab, i) { let group = (tab.tabItem || defItem).parent || defItem.parent; if (!set.has(tabGroups, group.id)) tabGroups[group.id] = [group.getTitle(), []]; group = tabGroups[group.id]; group[1].push([i, tab.linkedBrowser]); }); | context.process = [function (item, text) <> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> { process.call(this, item, text) } </>]; |
function () { hints.show("o"); }); | translitTable: Class.memoize(function () { const table = {}; [ [0x00c0, 0x00c6, ["A"]], [0x00c7, 0x00c7, ["C"]], [0x00c8, 0x00cb, ["E"]], [0x00cc, 0x00cf, ["I"]], [0x00d1, 0x00d1, ["N"]], [0x00d2, 0x00d6, ["O"]], [0x00d8, 0x00d8, ["O"]], [0x00d9, 0x00dc, ["U"]], [0x00dd, 0x00dd, ["Y"]], [0x00e0, 0x00e6, ["a"]], [0x00e7, 0x00e7, ["c"]], [0x00e8, 0x00eb, ["e"]], [0x00ec, 0x00ef, ["i"]], [0x00f1, 0x00f1, ["n"]], [0x00f2, 0x00f6, ["o"]], [0x00f8, 0x00f8, ["o"]], [0x00f9, 0x00fc, ["u"]], [0x00fd, 0x00fd, ["y"]], [0x00ff, 0x00ff, ["y"]], [0x0100, 0x0105, ["A", "a"]], [0x0106, 0x010d, ["C", "c"]], [0x010e, 0x0111, ["D", "d"]], [0x0112, 0x011b, ["E", "e"]], [0x011c, 0x0123, ["G", "g"]], [0x0124, 0x0127, ["H", "h"]], [0x0128, 0x0130, ["I", "i"]], [0x0132, 0x0133, ["IJ", "ij"]], [0x0134, 0x0135, ["J", "j"]], [0x0136, 0x0136, ["K", "k"]], [0x0139, 0x0142, ["L", "l"]], [0x0143, 0x0148, ["N", "n"]], [0x0149, 0x0149, ["n"]], [0x014c, 0x0151, ["O", "o"]], [0x0152, 0x0153, ["OE", "oe"]], [0x0154, 0x0159, ["R", "r"]], [0x015a, 0x0161, ["S", "s"]], [0x0162, 0x0167, ["T", "t"]], [0x0168, 0x0173, ["U", "u"]], [0x0174, 0x0175, ["W", "w"]], [0x0176, 0x0178, ["Y", "y", "Y"]], [0x0179, 0x017e, ["Z", "z"]], [0x0180, 0x0183, ["b", "B", "B", "b"]], [0x0187, 0x0188, ["C", "c"]], [0x0189, 0x0189, ["D"]], [0x018a, 0x0192, ["D", "D", "d", "F", "f"]], [0x0193, 0x0194, ["G"]], [0x0197, 0x019b, ["I", "K", "k", "l", "l"]], [0x019d, 0x01a1, ["N", "n", "O", "O", "o"]], [0x01a4, 0x01a5, ["P", "p"]], [0x01ab, 0x01ab, ["t"]], [0x01ac, 0x01b0, ["T", "t", "T", "U", "u"]], [0x01b2, 0x01d2, ["V", "Y", "y", "Z", "z", "D", "L", "N", "A", "a", "I", "i", "O", "o"]], [0x01d3, 0x01dc, ["U", "u"]], [0x01de, 0x01e1, ["A", "a"]], [0x01e2, 0x01e3, ["AE", "ae"]], [0x01e4, 0x01ed, ["G", "g", "G", "g", "K", "k", "O", "o", "O", "o"]], [0x01f0, 0x01f5, ["j", "D", "G", "g"]], [0x01fa, 0x01fb, ["A", "a"]], [0x01fc, 0x01fd, ["AE", "ae"]], [0x01fe, 0x0217, ["O", "o", "A", "a", "A", "a", "E", "e", "E", "e", "I", "i", "I", "i", "O", "o", "O", "o", "R", "r", "R", "r", "U", "u", "U", "u"]], [0x0253, 0x0257, ["b", "c", "d", "d"]], [0x0260, 0x0269, ["g", "h", "h", "i", "i"]], [0x026b, 0x0273, ["l", "l", "l", "l", "m", "n", "n"]], [0x027c, 0x028b, ["r", "r", "r", "r", "s", "t", "u", "u", "v"]], [0x0290, 0x0291, ["z"]], [0x029d, 0x02a0, ["j", "q"]], [0x1e00, 0x1e09, ["A", "a", "B", "b", "B", "b", "B", "b", "C", "c"]], [0x1e0a, 0x1e13, ["D", "d"]], [0x1e14, 0x1e1d, ["E", "e"]], [0x1e1e, 0x1e21, ["F", "f", "G", "g"]], [0x1e22, 0x1e2b, ["H", "h"]], [0x1e2c, 0x1e8f, ["I", "i", "I", "i", "K", "k", "K", "k", "K", "k", "L", "l", "L", "l", "L", "l", "L", "l", "M", "m", "M", "m", "M", "m", "N", "n", "N", "n", "N", "n", "N", "n", "O", "o", "O", "o", "O", "o", "O", "o", "P", "p", "P", "p", "R", "r", "R", "r", "R", "r", "R", "r", "S", "s", "S", "s", "S", "s", "S", "s", "S", "s", "T", "t", "T", "t", "T", "t", "T", "t", "U", "u", "U", "u", "U", "u", "U", "u", "U", "u", "V", "v", "V", "v", "W", "w", "W", "w", "W", "w", "W", "w", "W", "w", "X", "x", "X", "x", "Y", "y"]], [0x1e90, 0x1e9a, ["Z", "z", "Z", "z", "Z", "z", "h", "t", "w", "y", "a"]], [0x1ea0, 0x1eb7, ["A", "a"]], [0x1eb8, 0x1ec7, ["E", "e"]], [0x1ec8, 0x1ecb, ["I", "i"]], [0x1ecc, 0x1ee3, ["O", "o"]], [0x1ee4, 0x1ef1, ["U", "u"]], [0x1ef2, 0x1ef9, ["Y", "y"]], [0x2071, 0x2071, ["i"]], [0x207f, 0x207f, ["n"]], [0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"], [0x24d0, 0x24e9, "a"], [0xfb00, 0xfb06, ["ff", "fi", "fl", "ffi", "ffl", "st", "st"]], [0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"] ].forEach(function (start, stop, val) { if (typeof val != "string") for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = val[(i - start) % val.length]; else { let n = val.charCodeAt(0); for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = String.fromCharCode(n + i - start); } }); return table; }), | function () { hints.show("o"); }); |
function (count) { tabs.select("-" + (count || 1), true); }, | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function (count) { tabs.select("-" + (count || 1), true); }, |
$$(".dcc_checkbox").each(function(el2) { if (el2.checked) dccChecked++; }); | element.observe("change", function(el) { var totalChecked = 0; $$(".ddu_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); if (totalChecked) { $$(".ddu_button").each( function(e) { e.disabled = false; }); } else { $$(".ddu_button").each( function(e) { e.disabled = true; }); } }); | $$(".dcc_checkbox").each(function(el2) { if (el2.checked) dccChecked++; }); |
function (args) { try { let cmd = dactyl.eval(args.string); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }); | dactyl.assert(items.some(function (i) i.fullMenuPath == arg), | function (args) { try { let cmd = dactyl.eval(args.string); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }); |
function (args) { let arg = args[0]; let level; if (!arg) level = 100; else if (/^\d+$/.test(arg)) level = parseInt(arg, 10); else if (/^[+-]\d+$/.test(arg)) { if (args.bang) level = buffer.fullZoom + parseInt(arg, 10); else level = buffer.textZoom + parseInt(arg, 10); level = util.Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else liberator.assert(false, "E488: Trailing characters"); if (args.bang) buffer.fullZoom = level; else buffer.textZoom = level; }, | function (args) { buffer.viewSource(args[0], args.bang); }, | function (args) { let arg = args[0]; let level; if (!arg) level = 100; else if (/^\d+$/.test(arg)) level = parseInt(arg, 10); else if (/^[+-]\d+$/.test(arg)) { if (args.bang) level = buffer.fullZoom + parseInt(arg, 10); else level = buffer.textZoom + parseInt(arg, 10); // relative args shouldn't take us out of range level = util.Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else liberator.assert(false, "E488: Trailing characters"); if (args.bang) buffer.fullZoom = level; else buffer.textZoom = level; }, |
"optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { | "optionsURL", "releaseNotesURI", "updateDate", "version"].forEach(function (item) { | "optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); |
function () { if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } }, | function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { | function () { // TODO: are all messages single line? Some display an aggregation // of single line messages at least. E.g. :source if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } }, |
setTimeout(function(){ this.tags.selectionStart = this.tags.selectionEnd = index; }, 0); | this.candidates.forEach(function(cand){ var score = this.scoreFor(cand.reading, hint); if(score > this.score) cands.push({ score: score, cand : cand }); }, this); | setTimeout(function(){ this.tags.selectionStart = this.tags.selectionEnd = index; }, 0); |
if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_cut"); modes.set(modes.TEXTAREA); } else dactyl.beep(); | dactyl.assert(modes.extended & modes.TEXTAREA); editor.executeCommand("cmd_cut"); modes.set(modes.INSERT, modes.TEXTAREA); | function (count) { if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_cut"); modes.set(modes.TEXTAREA); } else dactyl.beep(); }); |
if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host))) | context.filters.push(function (item) arg.indexOf(item.text) === -1); | if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host))) |
function (count) { tabs.select("+" + (count || 1), true); }, | function (count) { tabs.select("$"); }); | function (count) { tabs.select("+" + (count || 1), true); }, |
res.__defineSetter__(k, function (val) Class.replaceProperty(this, k, val)); | get generate() !this._generate ? null : function () { if (this.offset != this.cache.offset || this.lastActivated != this.top.runCount) { this.itemCache = {}; this.cache.offset = this.offset; this.lastActivated = this.top.runCount; } if (!this.itemCache[this.key]) { try { let res = this._generate.call(this); if (res != null) this.itemCache[this.key] = res; } catch (e) { dactyl.reportError(e); this.message = "Error: " + e; } } return this.itemCache[this.key]; }, | res.__defineSetter__(k, function (val) Class.replaceProperty(this, k, val)); |
commandline.open(":", "buffer! ", modes.EX); | commandline.open("", "buffer! ", modes.EX); | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, |
function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { | function () { if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } }, | function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { |
let cmd = dactyl.userEval(args[0]); | let cmd = dactyl.userEval(args[0] || ""); | function (args) { try { let cmd = dactyl.userEval(args[0]); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }, { |
host && (!item.domains || !item.domains.some(function (d) util.isSubdomain(d, host)))); | commandline._messageHistory.filter(function (item) !timespan.contains(item.timestamp * 1000) || host && (!item.domains || !item.domains.some(function (d) util.isSubdomain(d, host)))); | host && (!item.domains || !item.domains.some(function (d) util.isSubdomain(d, host)))); |
function (args) { try { let cmd = dactyl.userEval(args[0] || ""); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }, { | "optionsURL", "releaseNotesURI", "updateDate", "version"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); | function (args) { try { let cmd = dactyl.userEval(args[0] || ""); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }, { |
liberator.assert(items.some(function (i) i.fullMenuPath == arg), | function (args) { try { let cmd = liberator.eval(args.string); liberator.execute(cmd, null, true); } catch (e) { liberator.echoerr(e); } }); | liberator.assert(items.some(function (i) i.fullMenuPath == arg), |
function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function (count) { tabs.select("-" + (count || 1), true); }, | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, |
function (args) { args = args.string; if (args) liberator.open(args, liberator.NEW_WINDOW); else liberator.open("about:blank", liberator.NEW_WINDOW); }, | function () { window.close(); }, | function (args) { args = args.string; if (args) liberator.open(args, liberator.NEW_WINDOW); else liberator.open("about:blank", liberator.NEW_WINDOW); }, |
}).sort(function(left, right) { var a = left.criteria, b = right.criteria; return a < b ? -1 : a > b ? 1 : 0; }).pluck('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])*?\*\ | }).sort(function(left, right) { var a = left.criteria, b = right.criteria; return a < b ? -1 : a > b ? 1 : 0; }).pluck('value'); |
if (editor.isTextEdit) { editor.executeCommand("cmd_cut"); modes.pop(); } else dactyl.beep(); | dactyl.assert(editor.isTextEdit); editor.executeCommand("cmd_cut"); modes.push(modes.INSERT); | function (count) { if (editor.isTextEdit) { editor.executeCommand("cmd_cut"); modes.pop(); } else dactyl.beep(); }); |
function (file) { | function (args) { let doc = window.content.document; let chosenData = null; let filename = args[0]; let command = commandline.command; if (filename) { if (filename[0] == "!") return buffer.viewSourceExternally(buffer.focusedFrame.document, function (file) { | function (file) { let output = io.system(filename.substr(1), file); commandline.command = command; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); }); |
if (/^>>/.test(filename)) { let file = io.File(filename.replace(/^>>\s*/, "")); dactyl.assert(args.bang || file.exists() && file.isWritable(), file.path.quote() + ": E212: Can't open file for writing"); return buffer.viewSourceExternally(buffer.focusedFrame.document, function (tmpFile) { try { file.write(tmpFile, ">>"); } catch (e) { dactyl.echoerr(file.path.quote() + ": E212: Can't open file for writing"); } }); } let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E13: File exists (add ! to override)"); chosenData = { file: file, uri: window.makeURI(doc.location.href, doc.characterSet) }; } prefs.set("browser.download.lastDir", io.cwd); try { var contentDisposition = window.content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils) .getDocumentMetadata("content-disposition"); } catch (e) {} window.internalSave(doc.location.href, doc, null, contentDisposition, doc.contentType, false, null, chosenData, doc.referrer ? window.makeURI(doc.referrer) : null, true); }, | function (file) { let output = io.system(filename.substr(1), file); commandline.command = command; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); }); |
|
context.completions = util.map(tabs.browsers, function ([i, browser]) { let indicator = " "; if (i == tabs.index()) indicator = "%" else if (i == tabs.index(tabs.alternate)) indicator = "#"; let tab = tabs.getTab(i); let url = browser.contentDocument.location.href; i = i + 1; return { text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], url: template.highlightURL(url), indicator: indicator, icon: tab.image || DEFAULT_FAVICON }; }); | context.process = [function (item, text) <> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> { process.call(this, item, text) } </>]; | context.completions = util.map(tabs.browsers, function ([i, browser]) { let indicator = " "; if (i == tabs.index()) indicator = "%" else if (i == tabs.index(tabs.alternate)) indicator = "#"; let tab = tabs.getTab(i); let url = browser.contentDocument.location.href; i = i + 1; return { text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], url: template.highlightURL(url), indicator: indicator, icon: tab.image || DEFAULT_FAVICON }; }); |
function () { hints.show(options.getPref("browser.tabs.loadInBackground") ? "b" : "t"); }); | ].forEach(function (start, stop, val) { if (typeof val != "string") for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = val[(i - start) % val.length]; else { let n = val.charCodeAt(0); for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = String.fromCharCode(n + i - start); } }); | function () { hints.show(options.getPref("browser.tabs.loadInBackground") ? "b" : "t"); }); |
function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function () { tabs.list(false); }); | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, |
$$(".dcc_button").each( function(e) { e.disabled = false; }); | $$(".ddu_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); | $$(".dcc_button").each( function(e) { e.disabled = false; }); |
addon.__defineGetter__("userDisabled", function () getRdfProperty("userDisabled") == "true"); | addon.__defineGetter__("userDisabled", function () getRdfProperty(addon, "userDisabled") == "true"); | addon.__defineGetter__("userDisabled", function () getRdfProperty("userDisabled") == "true"); |
function (args) { let file = io.File(args[0]); if (file.exists() && file.isReadable() && file.isFile()) services.get("extensionManager").installItemFromFile(file, "app-profile"); else { if (file.exists() && file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); liberator.echoerr("E484: Can't open file " + file.path); } }, { | "optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); | function (args) { let file = io.File(args[0]); if (file.exists() && file.isReadable() && file.isFile()) services.get("extensionManager").installItemFromFile(file, "app-profile"); else { if (file.exists() && file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); liberator.echoerr("E484: Can't open file " + file.path); } }, { |
"optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); | function (args) { try { let cmd = dactyl.eval(args.string); dactyl.execute(cmd, null, true); } catch (e) { dactyl.echoerr(e); } }); | "optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); |
collection.filter(function (str) { if (str.toLowerCase().indexOf(query.toLowerCase()) === 0) { matched.push(str); return false; } return true; }); | return function (currentText, text) { let collections = []; let cc = { origin : 0, query : null, collection : null }; for (let [, cmpltr] in Iterator(completers)) { let tmpCc = cmpltr(currentText, text) || {collection : null}; let collection = tmpCc.collection; if (collection) { cc.origin = tmpCc.origin; cc.query = tmpCc.query; collections.push(collection); } } let max = -1; for (let [, c] in Iterator(collections)) { let first = c[0]; if (typeof first === "string") { if (max < 1) max = 1; } else if (typeof first[0] === "string" && first[0].length > max) { max = first[0].length; } } if (max < 0) return null; if (max === 1) { collections = collections.reduce(function (a, c) a.concat(c), []); } else { collections = collections.reduce( function (a, c) { let normalized = c; if (normalized[0].length < max) { let lacks = max - normalized[0].length; let cushion = Array.apply(null, Array(lacks)).map(function () ""); normalized = normalized.map(function (r) r.concat(cushion)); } return a.concat(normalized); }, []); } cc.collection = collections; return cc; }; | collection.filter(function (str) { if (str.toLowerCase().indexOf(query.toLowerCase()) === 0) { matched.push(str); return false; } return true; }); |
buffer.alternateStyleSheets.forEach(function (style) { if (!(style.title in styles)) styles[style.title] = []; | function (args) { let arg = args[0]; let level; | buffer.alternateStyleSheets.forEach(function (style) { if (!(style.title in styles)) styles[style.title] = []; styles[style.title].push(style.href || "inline"); }); |
styles[style.title].push(style.href || "inline"); }); | if (!arg) level = 100; else if (/^\d+$/.test(arg)) level = parseInt(arg, 10); else if (/^[+-]\d+$/.test(arg)) { if (args.bang) level = buffer.fullZoom + parseInt(arg, 10); else level = buffer.textZoom + parseInt(arg, 10); level = util.Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else liberator.assert(false, "E488: Trailing characters"); if (args.bang) buffer.fullZoom = level; else buffer.textZoom = level; }, | buffer.alternateStyleSheets.forEach(function (style) { if (!(style.title in styles)) styles[style.title] = []; styles[style.title].push(style.href || "inline"); }); |
addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); | addon.__defineGetter__("userDisabled", function() getRdfProperty("userDisabled") == "true"); | addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); |
this.candidates.forEach(function(cand){ var score = this.scoreFor(cand.reading, hint); if(score > this.score) cands.push({ score: score, cand : cand }); }, this); | return cands.sort(function(a, b){ return b.score - a.score; }).reduce(function(memo, pair){ | this.candidates.forEach(function(cand){ var score = this.scoreFor(cand.reading, hint); if(score > this.score) cands.push({ score: score, cand : cand }); }, this); |
if (args.bang) level = buffer.fullZoom + parseInt(arg, 10); else level = buffer.textZoom + parseInt(arg, 10); | level = this.zoomLevel + parseInt(arg, 10); | function (args) { let arg = args[0]; let level; if (!arg) level = 100; else if (/^\d+$/.test(arg)) level = parseInt(arg, 10); else if (/^[+-]\d+$/.test(arg)) { if (args.bang) level = buffer.fullZoom + parseInt(arg, 10); else level = buffer.textZoom + parseInt(arg, 10); // relative args shouldn't take us out of range level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else dactyl.assert(false, "E488: Trailing characters"); Buffer.setZoom(level, args.bang); }, |
editor.executeCommand("cmd_copy"); | editor.executeCommand("cmd_cut"); | function (count) { if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_copy"); modes.set(modes.TEXTAREA); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); }); |
dactyl.clipboardWrite(buffer.getCurrentWord(), true); | dactyl.beep(); | function (count) { if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_copy"); modes.set(modes.TEXTAREA); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); }); |
function (count) { tabs.select("-" + (count || 1), true); }, | function (count) { if (count != null) tabs.select(count - 1, false); else tabs.select("+1", true); }, | function (count) { tabs.select("-" + (count || 1), true); }, |
get generate() !this._generate ? null : function () { if (this.offset != this.cache.offset || this.lastActivated != this.top.runCount) { this.itemCache = {}; this.cache.offset = this.offset; this.lastActivated = this.top.runCount; } if (!this.itemCache[this.key]) { try { let res = this._generate.call(this); if (res != null) this.itemCache[this.key] = res; } catch (e) { dactyl.reportError(e); this.message = "Error: " + e; } } return this.itemCache[this.key]; }, | function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) == 0 : | get generate() !this._generate ? null : function () { if (this.offset != this.cache.offset || this.lastActivated != this.top.runCount) { this.itemCache = {}; this.cache.offset = this.offset; this.lastActivated = this.top.runCount; } if (!this.itemCache[this.key]) { try { let res = this._generate.call(this); if (res != null) this.itemCache[this.key] = res; } catch (e) { dactyl.reportError(e); this.message = "Error: " + e; } } return this.itemCache[this.key]; }, |
function () { if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) | template.map(commandline._messageHistory.messages, function (message) | function () { // TODO: are all messages single line? Some display an aggregation // of single line messages at least. E.g. :source if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } }, |
} }, | function () { // TODO: are all messages single line? Some display an aggregation // of single line messages at least. E.g. :source if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } }, |
|
this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0); | host && (!item.domains || !item.domains.some(function (d) util.isSubdomain(d, host)))); | this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0); |
"optionsURL", "releaseNotesURI", "updateDate", "version"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); | addon.__defineGetter__("userDisabled", function () getRdfProperty(addon, "userDisabled") == "true"); | "optionsURL", "releaseNotesURI", "updateDate", "version"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); |
try { let cmd = liberator.eval(args.string); liberator.execute(cmd, null, true); | let file = io.File(args[0]); if (file.exists() && file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, function (a) a.install()); else { if (file.exists() && file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); liberator.echoerr("E484: Can't open file " + file.path); | function (args) { try { let cmd = liberator.eval(args.string); liberator.execute(cmd, null, true); } catch (e) { liberator.echoerr(e); } }); |
catch (e) { liberator.echoerr(e); } }); | }, { | function (args) { try { let cmd = liberator.eval(args.string); liberator.execute(cmd, null, true); } catch (e) { liberator.echoerr(e); } }); |
}).addCallback(function(res){ var doc = createHTML(res.responseText); var elmForm = doc.getElementById('saveitem'); if(!elmForm) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); | return new DeferredHash(ds).addCallback(function(ress){ values(ress).forEach(function(pair){ var success = pair[0], res = pair[1]; if(!success) throw res; }); | }).addCallback(function(res){ var doc = createHTML(res.responseText); var elmForm = doc.getElementById('saveitem'); if(!elmForm) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); return request('http://delicious.com' + $X('id("saveitem")/@action', doc)[0], { //denyRedirection: true, sendContent : update(formContents(elmForm), { description : ps.item, jump : 'no', notes : joinText([ps.body, ps.description], ' ', true), tags : ps.tags? ps.tags.join(' ') : '', share : ps.private? 'no' : '' }) }); }); |
return request('http: sendContent : update(formContents(elmForm), { description : ps.item, jump : 'no', notes : joinText([ps.body, ps.description], ' ', true), tags : ps.tags? ps.tags.join(' ') : '', share : ps.private? 'no' : '' }) }); | var res = ress.suggestions[1]; res.tags = ress.tags[1]; return res; | }).addCallback(function(res){ var doc = createHTML(res.responseText); var elmForm = doc.getElementById('saveitem'); if(!elmForm) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); return request('http://delicious.com' + $X('id("saveitem")/@action', doc)[0], { //denyRedirection: true, sendContent : update(formContents(elmForm), { description : ps.item, jump : 'no', notes : joinText([ps.body, ps.description], ' ', true), tags : ps.tags? ps.tags.join(' ') : '', share : ps.private? 'no' : '' }) }); }); |
function () { tabs.list(false); }); | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function () { tabs.list(false); }); |
let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); | function (args) { args = args.string; if (args) liberator.open(args, liberator.NEW_WINDOW); else liberator.open("about:blank", liberator.NEW_WINDOW); }, | let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); |
return this.map(function(value, index) { return iterator(collections.pluck(index)); }); | 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])*?\*\ | return this.map(function(value, index) { return iterator(collections.pluck(index)); }); |
editor.executeCommand("cmd_copy"); | editor.executeCommand("cmd_cut"); | function (count) { if (editor.isTextEdit) { editor.executeCommand("cmd_copy"); modes.pop(); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); }); |
dactyl.clipboardWrite(buffer.getCurrentWord(), true); | dactyl.beep(); | function (count) { if (editor.isTextEdit) { editor.executeCommand("cmd_copy"); modes.pop(); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); }); |
function (tmpFile) { try { file.write(tmpFile, ">>"); } catch (e) { dactyl.echoerr(file.path.quote() + ": E212: Can't open file for writing"); } | function (file) { let output = io.system(filename.substr(1), file); commandline.command = command; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); | function (tmpFile) { try { file.write(tmpFile, ">>"); } catch (e) { dactyl.echoerr(file.path.quote() + ": E212: Can't open file for writing"); } }); |
template.map(dactyl.globalVariables, function ([i, value]) { return <tr> <td style="width: 200px;">{i}</td> <td>{fmt(value)}</td> </tr>; }) | domains: function (args) array.flatten(args.map(function (spec) { try { let opt = options.parseOpt(spec); if (opt.option && opt.option.domains) return opt.option.domains(opt.values); } catch (e) { dactyl.reportError(e); } return []; })), | template.map(dactyl.globalVariables, function ([i, value]) { return <tr> <td style="width: 200px;">{i}</td> <td>{fmt(value)}</td> </tr>; }) |
function (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); } }, | context.completions = util.map(util.Array.itervalues(browsers), function ([i, browser]) { let indicator = " "; if (i == tabs.index()) indicator = "%" else if (i == tabs.index(tabs.alternate)) indicator = "#"; let tab = tabs.getTab(i); let url = browser.contentDocument.location.href; i = i + 1; return { text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], url: template.highlightURL(url), indicator: indicator, icon: tab.image || DEFAULT_FAVICON }; }); | function (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); } }, |
].forEach(function (command) { commands.add([command.name], command.description, function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { completer: function (context) completion.javascript(context), literal: 0 }); }); | this.timeout(function () { dactyl.focus(this.widgets.multilineInput.inputField); }, 0); | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { completer: function (context) completion.javascript(context), literal: 0 }); }); |
function () { tabs.list(false); }); | function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, | function () { tabs.list(false); }); |
$$(".dcc_button").each( function(e) { e.disabled = true; }); | $$(".ddu_button").each( function(e) { e.disabled = false; }); | $$(".dcc_button").each( function(e) { e.disabled = true; }); |
function (count) { this._extendedhintCount = count; commandline.input(";", null, { promptHighlight: "Normal", completer: function (context) { context.compare = function () 0; context.completions = [[k, v.prompt] for ([k, v] in Iterator(hints._hintModes))]; }, onChange: function () { modes.pop(); }, onCancel: function (arg) { arg && util.timeout(function () hints.show(arg), 0); } }); }, { count: true }); | translitTable: Class.memoize(function () { const table = {}; [ [0x00c0, 0x00c6, ["A"]], [0x00c7, 0x00c7, ["C"]], [0x00c8, 0x00cb, ["E"]], [0x00cc, 0x00cf, ["I"]], [0x00d1, 0x00d1, ["N"]], [0x00d2, 0x00d6, ["O"]], [0x00d8, 0x00d8, ["O"]], [0x00d9, 0x00dc, ["U"]], [0x00dd, 0x00dd, ["Y"]], [0x00e0, 0x00e6, ["a"]], [0x00e7, 0x00e7, ["c"]], [0x00e8, 0x00eb, ["e"]], [0x00ec, 0x00ef, ["i"]], [0x00f1, 0x00f1, ["n"]], [0x00f2, 0x00f6, ["o"]], [0x00f8, 0x00f8, ["o"]], [0x00f9, 0x00fc, ["u"]], [0x00fd, 0x00fd, ["y"]], [0x00ff, 0x00ff, ["y"]], [0x0100, 0x0105, ["A", "a"]], [0x0106, 0x010d, ["C", "c"]], [0x010e, 0x0111, ["D", "d"]], [0x0112, 0x011b, ["E", "e"]], [0x011c, 0x0123, ["G", "g"]], [0x0124, 0x0127, ["H", "h"]], [0x0128, 0x0130, ["I", "i"]], [0x0132, 0x0133, ["IJ", "ij"]], [0x0134, 0x0135, ["J", "j"]], [0x0136, 0x0136, ["K", "k"]], [0x0139, 0x0142, ["L", "l"]], [0x0143, 0x0148, ["N", "n"]], [0x0149, 0x0149, ["n"]], [0x014c, 0x0151, ["O", "o"]], [0x0152, 0x0153, ["OE", "oe"]], [0x0154, 0x0159, ["R", "r"]], [0x015a, 0x0161, ["S", "s"]], [0x0162, 0x0167, ["T", "t"]], [0x0168, 0x0173, ["U", "u"]], [0x0174, 0x0175, ["W", "w"]], [0x0176, 0x0178, ["Y", "y", "Y"]], [0x0179, 0x017e, ["Z", "z"]], [0x0180, 0x0183, ["b", "B", "B", "b"]], [0x0187, 0x0188, ["C", "c"]], [0x0189, 0x0189, ["D"]], [0x018a, 0x0192, ["D", "D", "d", "F", "f"]], [0x0193, 0x0194, ["G"]], [0x0197, 0x019b, ["I", "K", "k", "l", "l"]], [0x019d, 0x01a1, ["N", "n", "O", "O", "o"]], [0x01a4, 0x01a5, ["P", "p"]], [0x01ab, 0x01ab, ["t"]], [0x01ac, 0x01b0, ["T", "t", "T", "U", "u"]], [0x01b2, 0x01d2, ["V", "Y", "y", "Z", "z", "D", "L", "N", "A", "a", "I", "i", "O", "o"]], [0x01d3, 0x01dc, ["U", "u"]], [0x01de, 0x01e1, ["A", "a"]], [0x01e2, 0x01e3, ["AE", "ae"]], [0x01e4, 0x01ed, ["G", "g", "G", "g", "K", "k", "O", "o", "O", "o"]], [0x01f0, 0x01f5, ["j", "D", "G", "g"]], [0x01fa, 0x01fb, ["A", "a"]], [0x01fc, 0x01fd, ["AE", "ae"]], [0x01fe, 0x0217, ["O", "o", "A", "a", "A", "a", "E", "e", "E", "e", "I", "i", "I", "i", "O", "o", "O", "o", "R", "r", "R", "r", "U", "u", "U", "u"]], [0x0253, 0x0257, ["b", "c", "d", "d"]], [0x0260, 0x0269, ["g", "h", "h", "i", "i"]], [0x026b, 0x0273, ["l", "l", "l", "l", "m", "n", "n"]], [0x027c, 0x028b, ["r", "r", "r", "r", "s", "t", "u", "u", "v"]], [0x0290, 0x0291, ["z"]], [0x029d, 0x02a0, ["j", "q"]], [0x1e00, 0x1e09, ["A", "a", "B", "b", "B", "b", "B", "b", "C", "c"]], [0x1e0a, 0x1e13, ["D", "d"]], [0x1e14, 0x1e1d, ["E", "e"]], [0x1e1e, 0x1e21, ["F", "f", "G", "g"]], [0x1e22, 0x1e2b, ["H", "h"]], [0x1e2c, 0x1e8f, ["I", "i", "I", "i", "K", "k", "K", "k", "K", "k", "L", "l", "L", "l", "L", "l", "L", "l", "M", "m", "M", "m", "M", "m", "N", "n", "N", "n", "N", "n", "N", "n", "O", "o", "O", "o", "O", "o", "O", "o", "P", "p", "P", "p", "R", "r", "R", "r", "R", "r", "R", "r", "S", "s", "S", "s", "S", "s", "S", "s", "S", "s", "T", "t", "T", "t", "T", "t", "T", "t", "U", "u", "U", "u", "U", "u", "U", "u", "U", "u", "V", "v", "V", "v", "W", "w", "W", "w", "W", "w", "W", "w", "W", "w", "X", "x", "X", "x", "Y", "y"]], [0x1e90, 0x1e9a, ["Z", "z", "Z", "z", "Z", "z", "h", "t", "w", "y", "a"]], [0x1ea0, 0x1eb7, ["A", "a"]], [0x1eb8, 0x1ec7, ["E", "e"]], [0x1ec8, 0x1ecb, ["I", "i"]], [0x1ecc, 0x1ee3, ["O", "o"]], [0x1ee4, 0x1ef1, ["U", "u"]], [0x1ef2, 0x1ef9, ["Y", "y"]], [0x2071, 0x2071, ["i"]], [0x207f, 0x207f, ["n"]], [0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"], [0x24d0, 0x24e9, "a"], [0xfb00, 0xfb06, ["ff", "fi", "fl", "ffi", "ffl", "st", "st"]], [0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"] ].forEach(function (start, stop, val) { if (typeof val != "string") for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = val[(i - start) % val.length]; else { let n = val.charCodeAt(0); for (let i = start; i <= stop; i++) table[String.fromCharCode(i)] = String.fromCharCode(n + i - start); } }); return table; }), | function (count) { this._extendedhintCount = count; commandline.input(";", null, { promptHighlight: "Normal", completer: function (context) { context.compare = function () 0; context.completions = [[k, v.prompt] for ([k, v] in Iterator(hints._hintModes))]; }, onChange: function () { modes.pop(); }, onCancel: function (arg) { arg && util.timeout(function () hints.show(arg), 0); } }); }, { count: true }); |
function (args) { commandline.open("/", "", modes.SEARCH_VIEW_FORWARD); }); | function (args) { commandline.open("Find track", "", modes.SEARCH_VIEW_FORWARD); }); | function (args) { commandline.open("/", "", modes.SEARCH_VIEW_FORWARD); }); |
context.filters.push(function ({ item: f }) f.isDirectory() || /\.xpi$/.test(f.leafName)); | addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); | context.filters.push(function ({ item: f }) f.isDirectory() || /\.xpi$/.test(f.leafName)); |
values(ress).forEach(function(pair){ var success = pair[0], res = pair[1]; if(!success) throw res; }); | tags : $X(' return { name : tag, frequency : -1 }; }) | values(ress).forEach(function(pair){ var success = pair[0], res = pair[1]; if(!success) throw res; }); |
addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); | "optionsURL", "releaseNotesURI", "updateDate"].forEach(function (item) { addon[item] = getRdfProperty(addon, item); }); | addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); |
context.process = [function (item, text) <> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> { process.call(this, item, text) } </>]; | buffer.alternateStyleSheets.forEach(function (style) { if (!(style.title in styles)) styles[style.title] = []; styles[style.title].push(style.href || "inline"); }); | context.process = [function (item, text) <> <span highlight="Indicator" style="display: inline-block; width: 1.5em; text-align: center">{item.item.indicator}</span> { process.call(this, item, text) } </>]; |
if(!~values.indexOf(pair.cand.value)){ | if(pair && !~values.indexOf(pair.cand.value)){ | }).reduce(function(memo, pair){ if(!~values.indexOf(pair.cand.value)){ memo.push(pair.cand); } return memo; }, []); |
delete self['token']; | return LivedoorClip.getToken().addCallback(function(token){ var content = { rate : ps.rate? ps.rate : '', title : ps.item, postKey : token, link : ps.itemUrl, tags : ps.tags? ps.tags.join(' ') : '', notes : joinText([ps.body, ps.description], ' ', true), public : ps.private? 'off' : 'on' }; return request(LivedoorClip.POST_URL, { //denyRedirection: true, sendContent : content, queryString : { cache: Date.now() } }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } }); }); |
|
let arg = args.literalArg; | function (args) { let arg = args.literalArg; function compare(a, b) util.compareIgnoreCase(a, b) == 0 // focus if the requested sidebar is already open if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; } let menu = document.getElementById("viewSidebarMenu"); for (let [, panel] in Iterator(menu.childNodes)) { if (compare(panel.label, arg)) { panel.doCommand(); return; } } dactyl.echoerr("No sidebar " + arg + " found"); }, |
|
if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; } | if (compare(document.getElementById("sidebar-title").value, args[0])) return dactyl.focus(document.getElementById("sidebar-box")); | function (args) { let arg = args.literalArg; function compare(a, b) util.compareIgnoreCase(a, b) == 0 // focus if the requested sidebar is already open if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; } let menu = document.getElementById("viewSidebarMenu"); for (let [, panel] in Iterator(menu.childNodes)) { if (compare(panel.label, arg)) { panel.doCommand(); return; } } dactyl.echoerr("No sidebar " + arg + " found"); }, |
for (let [, panel] in Iterator(menu.childNodes)) { if (compare(panel.label, arg)) { panel.doCommand(); return; } } | for (let [, panel] in Iterator(menu.childNodes)) if (compare(panel.label, args[0])) return panel.doCommand(); | function (args) { let arg = args.literalArg; function compare(a, b) util.compareIgnoreCase(a, b) == 0 // focus if the requested sidebar is already open if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; } let menu = document.getElementById("viewSidebarMenu"); for (let [, panel] in Iterator(menu.childNodes)) { if (compare(panel.label, arg)) { panel.doCommand(); return; } } dactyl.echoerr("No sidebar " + arg + " found"); }, |
dactyl.echoerr("No sidebar " + arg + " found"); | return dactyl.echoerr("No sidebar " + args[0] + " found"); | function (args) { let arg = args.literalArg; function compare(a, b) util.compareIgnoreCase(a, b) == 0 // focus if the requested sidebar is already open if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; } let menu = document.getElementById("viewSidebarMenu"); for (let [, panel] in Iterator(menu.childNodes)) { if (compare(panel.label, arg)) { panel.doCommand(); return; } } dactyl.echoerr("No sidebar " + arg + " found"); }, |
return cands.sort(function(a, b){ return b.score - a.score; }).reduce(function(memo, pair){ | }).reduce(function(memo, pair){ if(!~values.indexOf(pair.cand.value)){ memo.push(pair.cand); } return memo; }, []); | return cands.sort(function(a, b){ return b.score - a.score; }).reduce(function(memo, pair){ |
dactyl.assert(!(modes.extended & modes.CARET)); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); dactyl.mode = modes.TEXTAREA; | if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_copy"); modes.set(modes.TEXTAREA); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); | function (count) { dactyl.assert(!(modes.extended & modes.CARET)); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); dactyl.mode = modes.TEXTAREA; }); |
function () { commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); }, | function (args) { let cmd = args[0]; dactyl.assert(!/\W/.test(cmd || ''), "E182: Invalid command name"); if (args.literalArg) { let completeOpt = args["-complete"]; let completeFunc = null; if (completeOpt) { if (/^custom,/.test(completeOpt)) { completeOpt = completeOpt.substr(7); completeFunc = function () { try { var completer = dactyl.userEval(completeOpt); if (!callable(completer)) throw new TypeError("User-defined custom completer " + completeOpt.quote() + " is not a function"); } catch (e) { dactyl.echo(":" + this.name + " ..."); dactyl.echoerr("E117: Unknown function: " + completeOpt); dactyl.log(e); return undefined; } return completer.apply(this, Array.slice(arguments)); }; } else completeFunc = completion.closure[completeOptionMap[completeOpt]]; } let added = commands.addUserCommand([cmd], args["-description"], Command.bindMacro(args, "-ex", function makeParams(args, modifiers) ({ args: this.argCount && args.string, bang: this.bang && args.bang ? "!" : "", count: this.count && args.count })), { argCount: args["-nargs"], bang: args["-bang"], count: args["-count"], completer: completeFunc, persist: !args["-nopersist"], replacementText: args.literalArg, sourcing: io.sourcing && update({}, io.sourcing) }, args.bang); if (!added) dactyl.echoerr("E174: Command already exists: add ! to replace it"); } else { function completerToString(completer) { if (completer) return [k for ([k, v] in Iterator(completeOptionMap)) if (completer == completion[v])][0] || "custom"; return ""; } let cmds = commands._exCommands.filter(function (c) c.user && (!cmd || c.name.match("^" + cmd))); if (cmds.length > 0) commandline.commandOutput( template.tabular(["", "Name", "Args", "Range", "Complete", "Definition"], ["padding-right: 2em;"], ([cmd.bang ? "!" : " ", cmd.name, cmd.argCount, cmd.count ? "0c" : "", completerToString(cmd.completer), cmd.replacementText || "function () { ... }"] for ([, cmd] in Iterator(cmds))))); else dactyl.echomsg("No user-defined commands found"); } }, { | function () { commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); }, |
function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); | function () { hints.show("o"); }); | function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); |
function () { hints.show("o"); }); | function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); | function () { hints.show("o"); }); |
function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function (count) { tabs.select("+" + (count || 1), true); }, | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, |
util.callAsync(thread, this, function () { if (this.cache.backgroundLock != lock) return; let items = this.generate(); if (this.cache.backgroundLock != lock) return; this.incomplete = false; if (items != null) this.completions = items; }); | function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) >= 0; | util.callAsync(thread, this, function () { if (this.cache.backgroundLock != lock) return; let items = this.generate(); if (this.cache.backgroundLock != lock) return; this.incomplete = false; if (items != null) this.completions = items; }); |
template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; | function () { commandline._messageHistory.clear(); }, | template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; |
template.map(util.range(0, options["maxitems"] * 2), function (i) <span highlight="CompItem"> <li highlight="NonText">~</li> </span>) | this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0); | template.map(util.range(0, options["maxitems"] * 2), function (i) <span highlight="CompItem"> <li highlight="NonText">~</li> </span>) |
b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b|| | !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b|| |
addon.__defineGetter__("userDisabled", function () getRdfProperty(addon, "userDisabled") == "true"); | addon.__defineSetter__("userDisabled", function (val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); | addon.__defineGetter__("userDisabled", function () getRdfProperty(addon, "userDisabled") == "true"); |
function (args) { let file = io.File(args[0]); if (file.exists() && file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, function (a) a.install()); else { if (file.exists() && file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); liberator.echoerr("E484: Can't open file " + file.path); } }, { | AddonManager.getInstallForFile(file, function (a) a.install()); | function (args) { let file = io.File(args[0]); if (file.exists() && file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, function (a) a.install()); else { if (file.exists() && file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); liberator.echoerr("E484: Can't open file " + file.path); } }, { |
return LivedoorClip.getToken().addCallback(function(token){ var content = { rate : ps.rate? ps.rate : '', title : ps.item, postKey : token, link : ps.itemUrl, tags : ps.tags? ps.tags.join(' ') : '', notes : joinText([ps.body, ps.description], ' ', true), public : ps.private? 'off' : 'on' }; return request(LivedoorClip.POST_URL, { sendContent : content, queryString : { cache: Date.now() } }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ delete self['token']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } | values(ress).forEach(function(pair){ var success = pair[0], res = pair[1]; if(!success) throw res; | return LivedoorClip.getToken().addCallback(function(token){ var content = { rate : ps.rate? ps.rate : '', title : ps.item, postKey : token, link : ps.itemUrl, tags : ps.tags? ps.tags.join(' ') : '', notes : joinText([ps.body, ps.description], ' ', true), public : ps.private? 'off' : 'on' }; return request(LivedoorClip.POST_URL, { //denyRedirection: true, sendContent : content, queryString : { cache: Date.now() } }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ delete self['token']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } }); }); |
}); | return LivedoorClip.getToken().addCallback(function(token){ var content = { rate : ps.rate? ps.rate : '', title : ps.item, postKey : token, link : ps.itemUrl, tags : ps.tags? ps.tags.join(' ') : '', notes : joinText([ps.body, ps.description], ' ', true), public : ps.private? 'off' : 'on' }; return request(LivedoorClip.POST_URL, { //denyRedirection: true, sendContent : content, queryString : { cache: Date.now() } }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ delete self['token']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } }); }); |
|
function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, | function () { tabs.list(false); }); | function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, |
collection = collection.filter(function (s) (s[0] !== ".")); | collections = collections.reduce(function (a, c) a.concat(c), []); | collection = collection.filter(function (s) (s[0] !== ".")); |
id: i - 1, | context.fork(id, 0, this, function (context, [name, browsers]) { context.title = [name || "Buffers"]; context.generate = function () util.map(array.iterValues(browsers), function ([i, browser]) { let indicator = " "; if (i == tabs.index()) indicator = "%" else if (i == tabs.index(tabs.alternate)) indicator = "#"; let tab = tabs.getTab(i); let url = browser.contentDocument.location.href; i = i + 1; return { text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], url: url, indicator: indicator, icon: tab.image || DEFAULT_FAVICON }; }); }, vals); |
|
context.completions = Array.map(menu.childNodes, function (n) [n.label, ""]); | let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); | context.completions = Array.map(menu.childNodes, function (n) [n.label, ""]); |
return this.select(function(value) { return value != null; }); | 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])*?\*\ | return this.select(function(value) { return value != null; }); |
dactyl.assert(!editor.isCaret); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); modes.pop(modes.TEXT_EDIT); | if (editor.isTextEdit) { editor.executeCommand("cmd_copy"); modes.pop(); } else dactyl.clipboardWrite(buffer.getCurrentWord(), true); | function (count) { dactyl.assert(!editor.isCaret); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); modes.pop(modes.TEXT_EDIT); }); |
function () { tabs.stop(config.browser.mCurrentTab); }, | function (tmpFile) { try { file.write(tmpFile, ">>"); } catch (e) { dactyl.echoerr(file.path.quote() + ": E212: Can't open file for writing"); } }); | function () { tabs.stop(config.browser.mCurrentTab); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.