rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
].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) { | privateData: function (args) args.some(function (spec) { | ].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 || {})); }); |
}, params.extra || {})); }); | ].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 || {})); }); |
|
function () { options.setPref("accessibility.browsewithcaret", true); }); | function (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); } }, | function () { // setting this option notifies an observer which takes care of the // mode setting options.setPref("accessibility.browsewithcaret", true); }); |
function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { | return dactyl.withSavedValues(["forceNewTab"], function () { dactyl.forceNewTab = event.ctrlKey || event.shiftKey || event.button == 1; dactyl.commands[command](event); }); | function (args) { let str = CommandLine.echoArgumentToString(args[0] || "", true); if (str != null) command.action(str); }, { |
function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, | function (count) { tabs.remove(tabs.getTab(), count, true, 0); }, | function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, |
$$(".dcc_checkbox").each(function(element) { element.observe("change", function(el) { var totalChecked = 0; $$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); if (totalChecked) { $$(".dcc_button").each( function(e) { e.disabled = false; }); } else { $$(".dcc_button").each( function(e) { e.disabled = true; }); } }); }); | $$(".ddu_button").each( function(e) { e.disabled = true; }); | $$(".dcc_checkbox").each(function(element) { element.observe("change", function(el) { // Count the number of checked ddus and make the ddu section appear if there are any var totalChecked = 0; $$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); if (totalChecked) { $$(".dcc_button").each( function(e) { e.disabled = false; }); } else { $$(".dcc_button").each( function(e) { e.disabled = true; }); } }); }); |
onCancel: function (arg) { arg && util.timeout(function () hints.show(arg), 0); } | ].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); } }); | onCancel: function (arg) { arg && util.timeout(function () hints.show(arg), 0); } |
].forEach(function (command) { commands.add([command.name], command.description, function (args) { let name = args[0]; function action(e) { services.get("extensionManager")[command.action](e.id); }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { argCount: "?", bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); | addon.__defineSetter__("userDisabled", function(val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { let name = args[0]; function action(e) { services.get("extensionManager")[command.action](e.id); }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); // XXX let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { argCount: "?", // FIXME: should be "1" bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); |
addon.__defineSetter__("userDisabled", function(val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); | addon.__defineGetter("userDisabled", function() getRdfProperty("userDisabled") == "true"); | addon.__defineSetter__("userDisabled", function(val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); |
function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { | function () { commandline._messageHistory.clear(); }, | function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { |
memo[i.toLowerCase()] = i; | if(i) memo[i.toLowerCase()] = i; | var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); |
commandline.runSilently(function () dactyl.execute(args[0], null, true)); | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | function (args) { commandline.runSilently(function () dactyl.execute(args[0], null, true)); }, { |
}); | }, | function (count) { dactyl.assert(!editor.isCaret); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); modes.pop(modes.TEXT_EDIT); }); |
delete self['token']; | }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } }); |
|
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 && setTimeout(function () hints.show(arg), 0); } }); }, { count: true }); | function () { hints.show(options.getPref("browser.tabs.loadInBackground") ? "b" : "t"); }); | 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 && setTimeout(function () hints.show(arg), 0); } }); }, { count: true }); |
}).reduce(function(memo, pair){ if(!~values.indexOf(pair.cand.value)){ memo.push(pair.cand); } | var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; | }).reduce(function(memo, pair){ if(!~values.indexOf(pair.cand.value)){ memo.push(pair.cand); } return memo; }, []); |
}, []); | }, {}); | }).reduce(function(memo, pair){ if(!~values.indexOf(pair.cand.value)){ memo.push(pair.cand); } return memo; }, []); |
function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL); }, | function (count) { dactyl.assert(!(modes.extended & modes.CARET)); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); dactyl.mode = modes.TEXTAREA; }); | function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL); }, |
commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); | let cmds = commands._exCommands.filter(function (c) c.user && (!cmd || c.name.match("^" + cmd))); | commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); |
onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, | function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); | onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, |
function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); | onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, | function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); |
function () { tabs.list(false); }); | function (count) { tabs.select("-" + (count || 1), true); }, | function () { tabs.list(false); }); |
function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) == 0 : | function (filter, str) String.indexOf(str, filter) == 0 : | function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) == 0 : |
function () { commandline._messageHistory.clear(); }, | function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { | function () { commandline._messageHistory.clear(); }, |
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|| | 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)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, | 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.__defineSetter__("userDisabled", function (val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); | return function (result) { result[method].apply(result, args); }; | addon.__defineSetter__("userDisabled", function (val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); |
AddonManager.getInstallForFile(file, function (a) a.install()); | context.filters.push(function ({ item: f }) f.isDirectory() || /\.xpi$/.test(f.leafName)); | AddonManager.getInstallForFile(file, function (a) a.install()); |
}).addCallback(function(res){ | return request("http: | }).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)); } }); |
if($X('id("loginFormbox")', doc)[0]){ delete self['token']; | var match = res.responseText.match(/Delicious\.Config\.set\('LoggedInUsername', '([^']+)'\);/); if(match){ var user = match[1]; self.currentUser = user; return user; } else { | }).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, true, 0); }, | function (count) { tabs.remove(tabs.getTab(), count, false, 0); }, | function (count) { tabs.remove(tabs.getTab(), count, true, 0); }, |
collection = collection.filter(function (s) (!s.indexOf(query)) ? (matched.push(s), false) : true); | 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); }, []); | collection = collection.filter(function (s) (!s.indexOf(query)) ? (matched.push(s), false) : true); |
id: i - 1, | 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 }; }); |
|
return this.inject([], function(array, value) { return array.concat(Object.isArray(value) ? value.flatten() : [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])*?\*\ | return this.inject([], function(array, value) { return array.concat(Object.isArray(value) ? value.flatten() : [value]); }); |
function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL); }, | function (count) { dactyl.assert(!editor.isCaret); if (!count) count = 1; while (count--) editor.executeCommand("cmd_paste"); modes.pop(modes.TEXT_EDIT); }); | function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL); }, |
function (args, modifiers) { setAction(args, update(modifiers, params.modifiers)); }, | function (args) { for (let [, name] in args) { name = name.replace(/^g:/, ""); if (!dactyl.globalVariables.hasOwnProperty(name)) { if (!args.bang) dactyl.echoerr("E108: No such variable: " + name); return; } delete dactyl.globalVariables[name]; } }, | function (args, modifiers) { setAction(args, update(modifiers, params.modifiers)); }, |
function () { tabs.stop(config.browser.mCurrentTab); }); | function () { options.setPref("accessibility.browsewithcaret", true); }); | function () { tabs.stop(config.browser.mCurrentTab); }); |
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>));; } }, | this.timeout(function () this.widgets.mowContainer.height = Math.min(doc.height, availableHeight) + "px", | 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 (count) { tabs.remove(tabs.getTab(), count, true, 0); }, | function (count) { tabs.switchTo(null, null, count, false); }, | function (count) { tabs.remove(tabs.getTab(), count, true, 0); }, |
element.observe("change", function(el) { var totalChecked = 0; $$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); if (totalChecked) { $$(".dcc_button").each( function(e) { e.disabled = false; }); } else { $$(".dcc_button").each( function(e) { e.disabled = true; }); } }); | $$(".dcc_checkbox").each(function(el2) { if (el2.checked) dccChecked++; }); | element.observe("change", function(el) { // Count the number of checked ddus and make the ddu section appear if there are any var totalChecked = 0; $$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); if (totalChecked) { $$(".dcc_button").each( function(e) { e.disabled = false; }); } else { $$(".dcc_button").each( function(e) { e.disabled = true; }); } }); |
level = this.zoomLevel + parseInt(arg, 10); | level = buffer.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)) { level = this.zoomLevel + 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); }, |
function (args) { let name = args[0]; function action(e) { services.get("extensionManager")[command.action](e.id); }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { | return function (result) { result[method].apply(result, args) }; | function (args) { let name = args[0]; function action(e) { services.get("extensionManager")[command.action](e.id); }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); // XXX let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { |
return function (result) { result[method].apply(result, args) }; | addon.__defineSetter__("userDisabled", function(val) { services.get("extensionManager")[val ? "enableItem" : "disableItem"](this.id); }); | return function (result) { result[method].apply(result, args) }; |
function (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); } }, | 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 (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); } }, |
commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); |
commandline.runSilently(function () dactyl.execute(args[0], null, true)); | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | commandline.runSilently(function () dactyl.execute(args[0], null, true)); |
return function (currentText, text) { [query, origin] = completer.utils.getQuery(currentText, [" "]); let cc = { origin : origin, query : query }; if (query) { let collection = engines.reduce( function (accum, engine) { let suggestions = util.suggest.getSuggestions(engine, query); let description = engine.description; return accum.concat(aWithDescription ? suggestions.map(function (s) [s, description]) : suggestions); }, []); cc.collection = collection; } return cc; }; | let cushion = Array.apply(null, Array(lacks)).map(function () ""); | return function (currentText, text) { [query, origin] = completer.utils.getQuery(currentText, [" "]); let cc = { origin : origin, query : query }; if (query) { let collection = engines.reduce( function (accum, engine) { let suggestions = util.suggest.getSuggestions(engine, query); let description = engine.description; return accum.concat(aWithDescription ? suggestions.map(function (s) [s, description]) : suggestions); }, []); cc.collection = collection; } return cc; }; |
} | }; | }).addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("loginFormbox")', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } else { return { duplicated : !!$X('//form[@name="delete_form"]', doc)[0], tags : $X('//div[@class="TagBox"]/span/text()', doc).map(function(tag){ return { name : tag, frequency : -1 }; }) } } }); |
onCancel: function (arg) { arg && setTimeout(function () hints.show(arg), 0); } | 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 && setTimeout(function () hints.show(arg), 0); } }); }, { count: true }); | onCancel: function (arg) { arg && setTimeout(function () hints.show(arg), 0); } |
var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); | var tags = (res.tags || []).sort(function(a, b){ return (b.frequency != a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); | var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); |
let pos = editor.findCharBackward(arg, count); | let pos = editor.findCharForward(arg, count); | function (count, arg) { let pos = editor.findCharBackward(arg, count); if (pos >= 0) editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL); }, |
editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL); | editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL); | function (count, arg) { let pos = editor.findCharBackward(arg, count); if (pos >= 0) editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL); }, |
function (args) { let name = args[0]; if (commands.get(name)) commands.removeUserCommand(name); else dactyl.echoerr("E184: No such user-defined command: " + name); }, { | function () { commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); }, | function (args) { let name = args[0]; if (commands.get(name)) commands.removeUserCommand(name); else dactyl.echoerr("E184: No such user-defined command: " + name); }, { |
else { let sel = window.content.document.getSelection(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); } | else dactyl.clipboardWrite(buffer.getCurrentWord(), true); | function (count) { if (modes.extended & modes.TEXTAREA) { editor.executeCommand("cmd_copy"); modes.set(modes.TEXTAREA); } else { let sel = window.content.document.getSelection(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); } }); |
onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } | onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, | onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } |
onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, | onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } | onAccept: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); }, |
function (count) { tabs.remove(tabs.getTab(), count, false); }, | function (count) { if (count != null) tabs.switchTo(String(count)); else commandline.open(":", "buffer! ", modes.EX); }, | function (count) { tabs.remove(tabs.getTab(), count, false); }, |
function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) >= 0; | function (filter, str) String.indexOf(str, filter) >= 0; | function (filter, str) String.toLowerCase(str).indexOf(filter.toLowerCase()) >= 0; |
function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | function (args) { commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); }, { |
a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d? this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache=== | 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)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector, u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), | a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache=== |
return function (result) { result[method].apply(result, args); }; | function (args) { let url = args[0]; let file = io.File(url); function install(addonInstall) { addonInstall.addListener(addonListener); addonInstall.install(); } if (!file.exists()) AddonManager.getInstallForURL(url, install, "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, install, "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { | return function (result) { result[method].apply(result, args); }; |
context.filters.push(function ({ item: f }) f.isDirectory() || /\.xpi$/.test(f.leafName)); | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { let name = args[0]; function action(e) { if (command.action == "uninstallItem") e.original.uninstall(); else e.original.userDisabled = command.action == "disableItem"; }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { argCount: "?", bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); | context.filters.push(function ({ item: f }) f.isDirectory() || /\.xpi$/.test(f.leafName)); |
if($X('id("loginFormbox")', doc)[0]){ delete self['token']; | var elmForm = doc.getElementById('saveitem'); if(!elmForm) | }).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)); } else { return { duplicated : !!$X('//form[@name="delete_form"]', doc)[0], tags : $X('//div[@class="TagBox"]/span/text()', doc).map(function(tag){ return { name : tag, frequency : -1 }; }) }; } }); |
} else { return { duplicated : !!$X(' tags : $X(' return { name : tag, frequency : -1 }; }) }; } | 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' : '' }) }); | }).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)); } else { return { duplicated : !!$X('//form[@name="delete_form"]', doc)[0], tags : $X('//div[@class="TagBox"]/span/text()', doc).map(function(tag){ return { name : tag, frequency : -1 }; }) }; } }); |
function (count) { tabs.switchTo(null, null, count, false); }, | function (count) { tabs.remove(tabs.getTab(), count, true, 0); }, | function (count) { tabs.switchTo(null, null, count, false); }, |
return this.select(function(value) { return !values.include(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])*?\*\ | return this.select(function(value) { return !values.include(value); }); |
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)) { level = buffer.zoomLevel + parseInt(arg, 10); level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else dactyl.assert(false, "E488: Trailing characters"); Buffer.setZoom(level, args.bang); }, | 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)) { level = buffer.zoomLevel + 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); }, |
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 []; })), | opt.type == "boolean" || isArray(opt.values) ? opt.names.map(function (n) "inv" + n) | 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 []; })), |
function (count) { buffer.scrollLines(Math.max(count, 1)); }, | function () { tabs.stop(config.browser.mCurrentTab); }); | function (count) { buffer.scrollLines(Math.max(count, 1)); }, |
template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; | this.store.mutate("filter", function (line) (line.value || line) != str); | template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; |
dactyl.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); | dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); | function (args) { let url = args[0]; let file = io.File(url); if (!file.exists()) AddonManager.getInstallForURL(url, callResult("install"), "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { |
function (count) { tabs.switchTo(null, null, count, false); }, | function (count) { tabs.switchTo(null, null, count, true); }, | function (count) { tabs.switchTo(null, null, count, false); }, |
$$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); | $$(".dcc_button").each( function(e) { e.disabled = false; }); | $$(".dcc_checkbox").each(function(el2) { if (el2.checked) totalChecked++; }); |
liberator.extensions.forEach(function (e) { action(e); }); | function (args) { let url = args[0]; let file = io.File(url); if (!file.exists()) AddonManager.getInstallForURL(url, callResult("install"), "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); else if (file.isDirectory()) liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); else liberator.echoerr("E484: Can't open file " + file.path); }, { | liberator.extensions.forEach(function (e) { action(e); }); |
function (args) { let url = args[0]; let file = io.File(url); if (!file.exists()) AddonManager.getInstallForURL(url, callResult("install"), "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { | return function (result) { result[method].apply(result, args) }; | function (args) { let url = args[0]; let file = io.File(url); if (!file.exists()) AddonManager.getInstallForURL(url, callResult("install"), "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { |
return (b.frequency != a.frequency)? | return (b.frequency !== a.frequency)? | var tags = (res.tags || []).sort(function(a, b){ return (b.frequency != a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); |
function () { if (Editor.windowIsEditable()) { if (options["insertmode"]) modes.set(modes.INSERT); else if (win.getSelection().toString() != "") modes.set(modes.VISUAL, modes.TEXTAREA); else modes.main = modes.TEXTAREA; } else { options.setPref("accessibility.browsewithcaret", true); | function (count) { if (mappings.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) mappings.repeat(); | function () { if (Editor.windowIsEditable()) { if (options["insertmode"]) modes.set(modes.INSERT); else if (win.getSelection().toString() != "") modes.set(modes.VISUAL, modes.TEXTAREA); else modes.main = modes.TEXTAREA; } else { // setting this option notifies an observer which takes care of the // mode setting options.setPref("accessibility.browsewithcaret", true); } }); |
}); | }, | function () { if (Editor.windowIsEditable()) { if (options["insertmode"]) modes.set(modes.INSERT); else if (win.getSelection().toString() != "") modes.set(modes.VISUAL, modes.TEXTAREA); else modes.main = modes.TEXTAREA; } else { // setting this option notifies an observer which takes care of the // mode setting options.setPref("accessibility.browsewithcaret", true); } }); |
function () { events.onEscape(); }); | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | function () { events.onEscape(); }); |
memo[i.toLowerCase()] = i; | if(i) memo[i.toLowerCase()] = i; | var tagsTable = tags.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); |
function (accum, engine) { let suggestions = util.suggest.getSuggestions(engine, query); let description = engine.description; return accum.concat(aWithDescription ? suggestions.map(function (s) [s, description]) : suggestions); }, []); | normalized = normalized.map(function (r) r.concat(cushion)); | function (accum, engine) { let suggestions = util.suggest.getSuggestions(engine, query); let description = engine.description; return accum.concat(aWithDescription ? suggestions.map(function (s) [s, description]) : suggestions); }, []); |
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)); } }); }); | tags : $X(' return { name : tag, frequency : -1 }; }) | 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)); } }); }); |
var tags = (res.tags || []).sort(function(a, b){ return (b.frequency != a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); | var tagsTable = tags.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); | var tags = (res.tags || []).sort(function(a, b){ return (b.frequency != a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); |
let pos = editor.findCharForward(arg, count); | let pos = editor.findCharBackward(arg, count); | function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos - 1, true, dactyl.mode == modes.VISUAL); }, |
editor.moveToPosition(pos - 1, true, dactyl.mode == modes.VISUAL); | editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL); | function (count, arg) { let pos = editor.findCharForward(arg, count); if (pos >= 0) editor.moveToPosition(pos - 1, true, dactyl.mode == modes.VISUAL); }, |
function (args) { io.sourcing.noExecute = !dactyl.userEval(args[0]); }, | commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); | function (args) { io.sourcing.noExecute = !dactyl.userEval(args[0]); }, |
function (count) { hints.open(";", { count: count }); }, | function () { hints.show(options.get("activate").has("links") ? "t" : "b"); }); | function (count) { hints.open(";", { count: count }); }, |
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)); } }); | }).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)); } else { var form = $X(' var content = formContents(form); return request(LivedoorClip.POST_URL, { sendContent : update(content, { rate : ps.rate? ps.rate : '', title : ps.item, tags : ps.tags? ps.tags.join(' ') : '', notes : joinText([ps.body, ps.description], ' ', true), public : ps.private? 'off' : 'on' }), 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) { this._extendedhintCount = count; commandline.input(";", null, inputOpts()); }, { count: true }); | onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } | function (count) { this._extendedhintCount = count; commandline.input(";", null, inputOpts()); }, { count: true }); |
onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } | function (count) { this._extendedhintCount = count; commandline.input(";", null, inputOpts()); }, { count: true }); | onCancel: function (arg) { arg && util.timeout(function () hints.show(arg, opts), 0); } |
function (count) { tabs.remove(tabs.getTab(), count, true); }, | function () { tabs.list(false); }); | function (count) { tabs.remove(tabs.getTab(), count, true); }, |
function (filter, str) String.indexOf(str, filter) == 0 : | this.processor[0] = function (item, text) self.process[0].call(self, item, template.highlightFilter(item.text, self.filter)); | function (filter, str) String.indexOf(str, filter) == 0 : |
commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); | function () { events.onEscape(); }); | commandline.runSilently(function () dactyl.execute(args[0] || "", null, true)); |
function (file) { | function (args) { let doc = 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.replace(RegExp(File.PATH_SEP + "*$"), "")); if (filename.substr(-1) === File.PATH_SEP || file.exists() && file.isDirectory()) file.append(buffer.getDefaultNames(doc)[0][0]); dactyl.assert(args.bang || !file.exists(), "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 = 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>); }); |
|
function (args) { let url = args[0]; let file = io.File(url); function install(addonInstall) { addonInstall.addListener(addonListener); addonInstall.install(); } if (!file.exists()) AddonManager.getInstallForURL(url, install, "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, install, "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { | context.filters.push(function ({ item }) item.isDirectory() || /\.xpi$/.test(item.leafName)); | function (args) { let url = args[0]; let file = io.File(url); function install(addonInstall) { addonInstall.addListener(addonListener); addonInstall.install(); } if (!file.exists()) AddonManager.getInstallForURL(url, install, "application/x-xpinstall"); else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, install, "application/x-xpinstall"); else if (file.isDirectory()) dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0); else dactyl.echoerr("E484: Can't open file " + file.path); }, { |
].forEach(function (command) { commands.add([command.name], command.description, function (args) { | function (args) { | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { let name = args[0]; function action(e) { if (command.action == "uninstallItem") e.original.uninstall(); else e.original.userDisabled = command.action == "disableItem"; }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); // XXX let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { argCount: "?", // FIXME: should be "1" bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); |
argCount: "?", bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { let name = args[0]; function action(e) { if (command.action == "uninstallItem") e.original.uninstall(); else e.original.userDisabled = command.action == "disableItem"; }; if (args.bang) liberator.extensions.forEach(function (e) { action(e); }); else { liberator.assert(name, "E471: Argument required"); // XXX let extension = liberator.getExtension(name); if (extension) action(extension); else liberator.echoerr("E474: Invalid argument"); } }, { argCount: "?", // FIXME: should be "1" bang: true, completer: function (context) { completion.extension(context); if (command.filter) context.filters.push(command.filter); }, literal: 0 }); }); |
|
function (count) { tabs.switchTo(null, null, count, true); }, | function (count) { tabs.switchTo(null, null, count, false); }, | function (count) { tabs.switchTo(null, null, count, true); }, |
return this.inject([], function(array, value, index) { if (0 == index || (sorted ? array.last() != value : !array.include(value))) array.push(value); return array; }); | 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.inject([], function(array, value, index) { if (0 == index || (sorted ? array.last() != value : !array.include(value))) array.push(value); return array; }); |
buffer.alternateStyleSheets.forEach(function (style) { styles[style.title].push(style.href || "inline"); }); | 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)) { level = buffer.zoomLevel + parseInt(arg, 10); level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else dactyl.assert(false, "E488: Trailing characters"); Buffer.setZoom(level, args.bang); }, | buffer.alternateStyleSheets.forEach(function (style) { styles[style.title].push(style.href || "inline"); }); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.