rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
function () { dactyl.quit(false); }); | function () { dactyl.quit(true); }); | function () { dactyl.quit(false); }); |
function () { liberator.quit(false); }); | function () { liberator.quit(true); }); | function () { liberator.quit(false); }); |
var tags = JSON.parse(res.responseText); return Object.keys(tags).reduce(function(memo, tag){ if(tag){ memo.push({ name : tag, frequency : tags[tag] }); } return memo; }, []); }); | try{ var json = JSON.parse(res.responseText); } catch(e) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return json; }); | }).addCallback(function(res){ var tags = JSON.parse(res.responseText); return Object.keys(tags).reduce(function(memo, tag){ if(tag){ memo.push({ name : tag, frequency : tags[tag] }); } return memo; }, []); }); |
["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); | function () { dactyl.quit(true); }, | ["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); |
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { | Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { | ["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this); |
}, this); | ["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this); |
|
liberator.windows.forEach(function (win) { | function () { liberator.windows.forEach(function (win) { | liberator.windows.forEach(function (win) { if (win != window) win.close(); }); |
}, | liberator.windows.forEach(function (win) { if (win != window) win.close(); }); |
|
function (count) { editor.executeCommand("cmd_deleteCharBackward", count); }, | function (count) { editor.executeCommand("cmd_beginLine", 1); modes.push(modes.INSERT); events.feedkeys("<Return>"); editor.executeCommand("cmd_linePrevious", 1); }); | function (count) { editor.executeCommand("cmd_deleteCharBackward", count); }, |
prefs.withContext(function () { | function (args) { let arg = args[0]; dactyl.assert(!arg || arg[0] == ">" && !util.isOS("WINNT"), "E488: Trailing characters"); prefs.withContext(function () { | prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); |
if (arg) dactyl.echomsg("Printed: " + arg.substr(1)); else dactyl.echomsg("Print job sent."); }, | prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); |
|
context.filters.push(function ({ item }) item.type == "boolean" || prefix == "inv" && isArray(item.values)); | context.filters.push(function (i) !set.has(have, i.text)); | context.filters.push(function ({ item }) item.type == "boolean" || prefix == "inv" && isArray(item.values)); |
(function () { Commands.quoteMap = { "\n": "\\n", "\t": "\\t", }; function quote(q, list, map) { map = map || Commands.quoteMap; let re = RegExp("[" + list + "]", "g"); function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; quote.list = list; return quote; }; Commands.quoteArg = { '"': quote('"', '\n\t"\\\\'), "'": quote("'", "'", { "'": "''" }), "": quote("", "|\\\\\\s'\"") }; Commands.complQuote = { '"': ['"', quote("", Commands.quoteArg['"'].list), '"'], "'": ["'", quote("", Commands.quoteArg["'"].list), "'"], "": ["", Commands.quoteArg[""], ""] }; Commands.parseBool = function (arg) { if (/^(true|1|on)$/i.test(arg)) return true; if (/^(false|0|off)$/i.test(arg)) return false; return NaN; }; Commands.argTypes = [ null, ArgType("no arg", function (arg) !arg || null), ArgType("boolean", Commands.parseBool), ArgType("string", function (val) val), ArgType("int", parseInt), ArgType("float", parseFloat), ArgType("list", function (arg) arg && arg.split(/\s*,\s*/)) ]; })(); | function (count) { if (commands.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) dactyl.execute(commands.repeat); } else dactyl.echoerr("E30: No previous command line"); }, | (function () { Commands.quoteMap = { "\n": "\\n", "\t": "\\t", }; function quote(q, list, map) { map = map || Commands.quoteMap; let re = RegExp("[" + list + "]", "g"); function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; quote.list = list; return quote; }; Commands.quoteArg = { '"': quote('"', '\n\t"\\\\'), "'": quote("'", "'", { "'": "''" }), "": quote("", "|\\\\\\s'\"") }; Commands.complQuote = { '"': ['"', quote("", Commands.quoteArg['"'].list), '"'], "'": ["'", quote("", Commands.quoteArg["'"].list), "'"], "": ["", Commands.quoteArg[""], ""] }; Commands.parseBool = function (arg) { if (/^(true|1|on)$/i.test(arg)) return true; if (/^(false|0|off)$/i.test(arg)) return false; return NaN; }; Commands.argTypes = [ null, ArgType("no arg", function (arg) !arg || null), ArgType("boolean", Commands.parseBool), ArgType("string", function (val) val), ArgType("int", parseInt), ArgType("float", parseFloat), ArgType("list", function (arg) arg && arg.split(/\s*,\s*/)) ];})(); |
prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); | return io.withTempFiles(function (temp) { let encoder = services.HtmlEncoder(); encoder.init(doc, "text/unicode", encoder.OutputRaw|encoder.OutputPreformatted); temp.write(encoder.encodeToString(), ">"); this.callback(temp); }, this); | prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); |
pair.value.each(function(dbkey) { | keyMap.each(function(pair) { if (pair.key != keyName) return; pair.value.each(function(dbkey) { | pair.value.each(function(dbkey) { keySelect.insert(new Element("option", {"value": dbkey}).update(dbkey)); }); |
throw $break; }); | pair.value.each(function(dbkey) { keySelect.insert(new Element("option", {"value": dbkey}).update(dbkey)); }); |
|
function (res) { args = res; }); | widgets: Class.memoize(function () CommandWidgets()), | function (res) { args = res; }); |
["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); | function (count) { tabs.select(0); }); | ["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); |
$$(".ddu_checkbox").each(function(element) { 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; }); } | el.observe("click", function(ev) { window.location.href = URL + "/DCCFirmwareManager?crate=" + ev.element().readAttribute("crate"); | $$(".ddu_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; $$(".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; }); } }); }); |
}); | $$(".ddu_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; $$(".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; }); } }); }); |
|
prefs.withContext(function () { | function (args) { let arg = args[0]; dactyl.assert(!arg || arg[0] == ">" && !util.OS.isWindows, "E488: Trailing characters"); prefs.withContext(function () { | prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); |
this.each(function(value, index) { value = iterator.call(context, value, index); if (result == null || value < result) result = value; }); | CQ.grep(elem.className.split(checkforSpaceRegEx), function(className){ return !CQ.className.has( classNames, className ); }).join(" ") : ""; | this.each(function(value, index) { value = iterator.call(context, value, index); if (result == null || value < result) result = value; }); |
function () { dactyl.open("chrome: { from: "addons" }); }, | function () { dactyl.quit(true); }); | function () { dactyl.open("chrome://mozapps/content/extensions/extensions.xul", { from: "addons" }); }, |
let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); | function (args) { let arg = args.literalArg; let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); liberator.assert(!arg || titles.indexOf(arg) >= 0, "E475: Invalid argument: " + arg); if (options["usermode"]) options["usermode"] = false; window.stylesheetSwitchAll(window.content, arg); }, | let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); |
this._hintMode.action(elem, elem.href || "", this._extendedhintCount); | this._hintMode.action(elem, elem.href || "", this._extendedhintCount, top); | this.timeout(function () { if (modes.extended & modes.HINTS) modes.pop(); this._hintMode.action(elem, elem.href || "", this._extendedhintCount); }, timeout); |
item.url = decodeURIComponent(query.replace(/#.*/, "")); return item; | try { item.url = decodeURIComponent(query.replace(/#.*/, "")); return item; } catch (e) {} | return history.get({ uri: window.makeURI(begin), uriIsPrefix: true }).map(function (item) { let rest = item.url.length - end.length; let query = item.url.substring(begin.length, rest); if (item.url.substr(rest) == end && query.indexOf("&") == -1) { item.url = decodeURIComponent(query.replace(/#.*/, "")); return item; } return null; }).filter(util.identity); |
node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); | jConfirm(AtD.getLang('dialog_confirm_post', 'The proofreader has suggestions for your reply. Are you sure you want to post it?\n\nPress OK to post your reply, or Cancel to view the suggestions and edit your reply.'), '', function(r) { if( r == true ){ AtD_update_post(form_id); }else{ AtD.checkTextArea(form_id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); | node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); |
AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; | node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); |
|
let res = function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q; | let res = function (str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; | let res = function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q; |
if ( r == true ) { AtD_update_post(form_id); } else { AtD.checkTextArea(form_id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); | if ( r == true ) { AtD_update_post(id); } else { AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); | jConfirm(message, '', function(r) { if ( r == true ) { AtD_update_post(form_id); } else { /* Do the real checking */ AtD.checkTextArea(form_id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); |
memo.push({ name : tag, frequency : tags[tag] }); | if(tag){ memo.push({ name : tag, frequency : tags[tag] }); } | return Object.keys(tags).reduce(function(memo, tag){ memo.push({ name : tag, frequency : tags[tag] }); return memo; }, []); |
$(contentmediaSearch + " form").submit(function(){ var searchvalue = $(contentmediaSearch + " form input").val(); if(searchvalue.replace(/ /g,'').length > 0){ options.search = searchvalue; doFileSearch(options); }else { if(options.search){ options.search = false; doFileSearch(options); } } return false; }); | $('#contentmedia_dialog_link input[value=OK]').live('click', function (e) { var form = { link_url: $("#link_url").val(), link_name: $("#link_name").val() }; if (!form.link_url || !form.link_name) { alert("Please fill out both fields"); return; } $("#link_url").val(""); $("#link_name").val(""); $('#contentmedia_dialog_link').jqmHide(); }); | $(contentmediaSearch + " form").submit(function(){ // Get the value from the input box var searchvalue = $(contentmediaSearch + " form input").val(); // Check if there is anything in the search box if(searchvalue.replace(/ /g,'').length > 0){ // Set the search option to the value the person entered options.search = searchvalue; // Fetch the list of files doFileSearch(options); }else { // We check if there is a current search keyword or not // if there is one, we remove the search filter, otherwise we do nothing if(options.search){ // Set the search option to false options.search = false; // Fetch the files without the search filter doFileSearch(options); } } return false; }); |
return tokens.every(function (token) indexOf(linkText, token) >= 0); | return function (linkText) { linkText = linkText.toLowerCase(); return tokens.every(function (token) indexOf(linkText, token) >= 0); }; | return tokens.every(function (token) indexOf(linkText, token) >= 0); |
e.setAttribute('style', 'display:none'); | e.removeAttribute('style'); | this.container.forEach(function(e){ e.setAttribute('style', 'display:none'); }); |
function (count) { editor.executeCommand("cmd_deleteCharForward", count); }, | function (count) { editor.executeCommand("cmd_deleteCharBackward", count); }, | function (count) { editor.executeCommand("cmd_deleteCharForward", count); }, |
defaults = array(this.options).map(function (opt) [opt.names[0], opt.default]).toObject(); | this._exMap[name] || !full && array.nth(this._exCommands, function (cmd) cmd.hasName(name), 0) || null, | defaults = array(this.options).map(function (opt) [opt.names[0], opt.default]).toObject(); |
sourcing = sourcing || { file: "[Command Line]", line: 1 }; | sourcing = sourcing || this.sourcing || { file: "[Command Line]", line: 1 }; | io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({}, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } }); |
if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host))) | return this._exCommands.filter(function (cmd) cmd.user && cmd.hasName(name))[0] || null; | if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host))) |
this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); | this.timeout(function () { if ((modes.extended & modes.HINTS) && !this._continue) modes.pop(); commandline._lastEcho = null; dactyl.trapErrors(this._hintMode.action, this._hintMode, elem, elem.href || elem.src || "", this._extendedhintCount, top); }, timeout); | this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); |
this.timeout(function () { if ((modes.extended & modes.HINTS) && !this._continue) modes.pop(); commandline._lastEcho = null; dactyl.trapErrors(this._hintMode.action, this._hintMode, elem, elem.href || elem.src || "", this._extendedhintCount, top); }, timeout); | this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); | this.timeout(function () { if ((modes.extended & modes.HINTS) && !this._continue) modes.pop(); commandline._lastEcho = null; // Hack. dactyl.trapErrors(this._hintMode.action, this._hintMode, elem, elem.href || elem.src || "", this._extendedhintCount, top); }, timeout); |
function () { dactyl.quit(true); }, | function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, { | function () { dactyl.quit(true); }, |
}, function(res){ func({ success: false, content: res }); }); | chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); }); | }, function(res){ func({ success: false, content: res }); }); |
util.callInMainThread(function () { this.onUpdate(); }, this); | yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2] : function () this.text]; | util.callInMainThread(function () { this.onUpdate(); }, this); |
Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { | Array.forEach(this.widgets[nodeSet].commandline.children, function (node) { | Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); |
storage["history-command"].mutate("filter", function (item) !(timespan.contains(item.timestamp) && (!host || commands.hasDomain(item.value, host)))); | storage["history-search"].mutate("filter", function (item) !timespan.contains(item.timestamp)); | storage["history-command"].mutate("filter", function (item) !(timespan.contains(item.timestamp) && (!host || commands.hasDomain(item.value, host)))); |
-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d=== | {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; | -1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d=== |
function () { dactyl.quit(true); }); | function () { dactyl.open("chrome: { from: "addons" }); }, | function () { dactyl.quit(true); }); |
function () { liberator.quit(true); }); | function () { liberator.open("chrome: { from: "addons" }); }, | function () { liberator.quit(true); }); |
return Object.keys(tags).reduce(function(memo, tag){ | return this.getCurrentUser(user).addCallback(function(user){ return succeed().addCallback(function(){ return request('http: }).addCallback(function(res){ var tags = JSON.parse(res.responseText); return Object.keys(tags).reduce(function(memo, tag){ | return Object.keys(tags).reduce(function(memo, tag){ if(tag){ memo.push({ name : tag, frequency : tags[tag] }); } return memo; }, []); |
}); }); | return Object.keys(tags).reduce(function(memo, tag){ if(tag){ memo.push({ name : tag, frequency : tags[tag] }); } return memo; }, []); |
|
if (args.bang) { dactyl.open("about:config", (options["newtab"] && options.get("newtab").has("all", "prefs")) ? dactyl.NEW_TAB : dactyl.CURRENT_TAB); } | if (args.bang) dactyl.open("about:config", { from: "prefs" }); | function (args) { if (args.bang) { // open Firefox settings GUI dialog dactyl.open("about:config", (options["newtab"] && options.get("newtab").has("all", "prefs")) ? dactyl.NEW_TAB : dactyl.CURRENT_TAB); } else window.openPreferences(); }, |
function (count) { tabs.select(0); }); | ["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); | function (count) { tabs.select(0); }); |
function (args) { if (args.bang) { liberator.open("about:config", (options["newtab"] && options.get("newtab").has("all", "prefs")) ? liberator.NEW_TAB : liberator.CURRENT_TAB); } else window.openPreferences(); }, | liberator.windows.forEach(function (win) { if (win != window) win.close(); }); | function (args) { if (args.bang) { // open Firefox settings GUI dialog liberator.open("about:config", (options["newtab"] && options.get("newtab").has("all", "prefs")) ? liberator.NEW_TAB : liberator.CURRENT_TAB); } else window.openPreferences(); }, |
jConfirm(message, '', function(r) { if ( r == true ) { AtD_update_post(id); } else { AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); | function(n) { if (parent.isMarkedNode(n)) { var suggestions = parent.findSuggestion(n); if (suggestions != undefined && suggestions.suggestions != undefined && suggestions.suggestions.length > 0) parent.applySuggestion(n, suggestions.suggestions[0]); } }); | jConfirm(message, '', function(r) { if ( r == true ) { /* User doesn't want the errors to be fixed */ AtD_update_post(id); } else { /* Do the real checking */ AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); |
function (args) { buffer.showPageInfo(true, args[0]); }, | prefs.withContext(function () { if (arg) { prefs.set("print.print_to_file", "true"); prefs.set("print.print_to_filename", io.File(arg.substr(1)).path); dactyl.echomsg("Printing to file: " + arg.substr(1)); } else dactyl.echomsg("Sending to printer..."); prefs.set("print.always_print_silent", args.bang); prefs.set("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); | function (args) { buffer.showPageInfo(true, args[0]); }, |
context.fork("default", 0, this, function (context) { context.title = ["Extra Completions"]; context.completions = [ [option.value, "Current value"], [option.defaultValue, "Default value"] ].filter(function (f) f[0] !== "" && String(f[0]).length < 200); context.quote = ["", util.identity, ""]; }); | function (context) { context.generate = function () option.values.map(function (o) [o, ""]); }); | context.fork("default", 0, this, function (context) { context.title = ["Extra Completions"]; context.completions = [ [option.value, "Current value"], [option.defaultValue, "Default value"] ].filter(function (f) f[0] !== "" && String(f[0]).length < 200); context.quote = ["", util.identity, ""]; }); |
function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; | (function () { Commands.quoteMap = { "\n": "\\n", "\t": "\\t", }; function quote(q, list, map) { map = map || Commands.quoteMap; let re = RegExp("[" + list + "]", "g"); function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; quote.list = list; return quote; }; Commands.quoteArg = { '"': quote('"', '\n\t"\\\\'), "'": quote("'", "'", { "'": "''" }), "": quote("", "|\\\\\\s'\"") }; Commands.complQuote = { '"': ['"', quote("", Commands.quoteArg['"'].list), '"'], "'": ["'", quote("", Commands.quoteArg["'"].list), "'"], "": ["", Commands.quoteArg[""], ""] }; Commands.parseBool = function (arg) { if (/^(true|1|on)$/i.test(arg)) return true; if (/^(false|0|off)$/i.test(arg)) return false; return NaN; }; Commands.argTypes = [ null, ArgType("no arg", function (arg) !arg || null), ArgType("boolean", Commands.parseBool), ArgType("string", function (val) val), ArgType("int", parseInt), ArgType("float", parseFloat), ArgType("list", function (arg) arg && arg.split(/\s*,\s*/)) ]; })(); | function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; |
function (args) { buffer.showPageInfo(true, args[0]); }, | commandline.input("Upload file: ", function (path) { let file = io.File(path); dactyl.assert(file.exists()); elem.value = file.path; }, { | function (args) { buffer.showPageInfo(true, args[0]); }, |
select.append($(document.createElement("option")).attr({selected: repo.id == json.default, title: repo.description, value:repo.id}).text(repo.title)); | select.append($(document.createElement("option")).attr({selected: repo.id == json['default'], title: repo.description, value:repo.id}).text(repo.title)); | $.getJSON('/dev/dummyjson/searchRepositories.json', function (json) { json.results.unshift({title: "Select a Repository:"}); $("select.repository_list").each(function (i, select) { select = $(select).empty(); $.each(json.results, function (i, repo) { select.append($(document.createElement("option")).attr({selected: repo.id == json.default, title: repo.description, value:repo.id}).text(repo.title)); }); }); $.uniform.update(); }); |
function (count) { tabs.select(0); }); | function (count) { tabs.select("$"); }); | function (count) { tabs.select(0); }); |
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; }); } }); | $$(".ddu_checkbox").each(function(el2) { if (el2.checked) dduChecked++; }); | element.observe("change", function(el) { // Count the number of checked ddus and make the ddu section appear if there are any 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; }); } }); |
function () { dactyl.beep(); }, | function () { dactyl.open("chrome: { from: "addons" }); }, | function () { dactyl.beep(); }, |
function (args) { tabs.reload(config.browser.mCurrentTab, args.bang); }, | let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); | function (args) { tabs.reload(config.browser.mCurrentTab, args.bang); }, |
$this.parents('form').submit(function(event) { | return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); $this.wrap('<div></div>'); $this.after('<div class="atd-ajax-load"></div>'); $this.parents('form').submit(function(e) { | $this.parents('form').submit(function(event) { AtD.restoreTextArea(id); }); |
$this.before(node); }); | $this.parents('form').submit(function(event) { AtD.restoreTextArea(id); }); |
|
if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ | if (AtD.autoproofread != undefined && AtD.autoproofread == 1 && AtD.proofread_click_count <= 0 && $this.val() != ""){ | return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(e) { AtD.restoreTextArea(id); if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ e.preventDefault(); AtD_check( id, node, AtD_submit_check_callback ); } }); $this.before(node); }); |
AtD_check( id, node, AtD_submit_check_callback ); | AtD_check( id, node ); | return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(e) { AtD.restoreTextArea(id); if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ e.preventDefault(); AtD_check( id, node, AtD_submit_check_callback ); } }); $this.before(node); }); |
return succeed().addCallback(function(){ return request('http: | suggestions : this.getCurrentUser().addCallback(function(user){ return request('http: queryString : { noui : 1, url : url } }); | return succeed().addCallback(function(){ return request('http://feeds.delicious.com/v2/json/tags/' + user); }).addCallback(function(res){ |
$(contentmediaSearchButton).live("click", function(){ | $(contentmediaSearch + " form").submit(function(){ | $(contentmediaSearchButton).live("click", function(){ // Execute the submit event on the parent form $(this).parents().filter("form").trigger("submit"); }); |
$(this).parents().filter("form").trigger("submit"); | var searchvalue = $(contentmediaSearch + " form input").val(); if(searchvalue.replace(/ /g,'').length > 0){ options.search = searchvalue; doFileSearch(options); }else { if(options.search){ options.search = false; doFileSearch(options); } } return false; | $(contentmediaSearchButton).live("click", function(){ // Execute the submit event on the parent form $(this).parents().filter("form").trigger("submit"); }); |
return function (linkText) { if (hintStrings.length == 1 && hintStrings[0].length == 0) return true; let words = tokenize(wordSplitRegex, linkText); if (hintStrings.length == 1) return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping); else return stringsAtBeginningOfWords(hintStrings, words, allowWordOverleaping); }; | return tokens.every(function (token) indexOf(linkText, token) >= 0); | return function (linkText) { if (hintStrings.length == 1 && hintStrings[0].length == 0) return true; let words = tokenize(wordSplitRegex, linkText); if (hintStrings.length == 1) return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping); else return stringsAtBeginningOfWords(hintStrings, words, allowWordOverleaping); }; |
this.container.forEach(function(e){ e.removeAttribute('style'); }); | return this.tags.value.split(this.delimiter).filter(function(i){ return i }); | this.container.forEach(function(e){ e.removeAttribute('style'); }); |
function (count) { modes.set(modes.VISUAL, dactyl.mode); }); | function (count) { editor.executeCommand("cmd_deleteCharForward", count); }, | function (count) { modes.set(modes.VISUAL, dactyl.mode); }); |
io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || this.sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({}, args || {}); if (tokens && !callable(string)) string = util.compileMacro(string, true); if (callable(string)) string = string(tokens || {}); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } }); | array.nth(this._exCommands, function (cmd) cmd.user && cmd.hasName(name), 0) || null, | io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || this.sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({}, args || {}); if (tokens && !callable(string)) string = util.compileMacro(string, true); if (callable(string)) string = string(tokens || {}); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } }); |
completeOpts = options.filter(function (opt) opt.multiple || !(opt.names[0] in args)); | return this._exCommands.filter(function (cmd) cmd.user); | completeOpts = options.filter(function (opt) opt.multiple || !(opt.names[0] in args)); |
return function (linkText) { linkText = linkText.toLowerCase(); return tokens.every(function (token) indexOf(linkText, token) >= 0); }; | this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); | return function (linkText) { linkText = linkText.toLowerCase(); return tokens.every(function (token) indexOf(linkText, token) >= 0); }; |
this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); | return function (linkText) { linkText = linkText.toLowerCase(); return tokens.every(function (token) indexOf(linkText, token) >= 0); }; | this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); |
["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); | function (args) { for (let i in Iterator(tabs.closedTabs)) window.undoCloseTab(0); }, | ["TabMove", "TabOpen", "TabClose"].forEach(function (event) { events.addSessionListener(tabContainer, event, this.closure._updateTabCount, false); }, this); |
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); }); | (function() { var id = chrome.contextMenus.create({ title: 'Share ...', contexts: ['all'] }); chrome.contextMenus.create({ title: 'Taberareloo', contexts: ['all'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenus', content: info }); } }); chrome.contextMenus.create({ title: 'Quote', contexts: ['selection'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusQuote', content: info }); } }); chrome.contextMenus.create({ title: 'Link', contexts: ['link'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusLink', content: info }); } }); chrome.contextMenus.create({ title: 'Photo', contexts: ['image'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusImage', content: info }); } }); chrome.contextMenus.create({ title: 'Video', contexts: ['video'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusVideo', content: info }); } }); chrome.contextMenus.create({ title: 'Audio', contexts: ['audio'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusAudio', content: info }); } }); chrome.contextMenus.create({ title: 'Photo - Capture', contexts: ['all'], parentId: id, onclick: function(info, tab) { chrome.tabs.sendRequest(tab.id, { request: 'contextMenusCapture', content: info }); } }); })(); | chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments);}); |
yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2] : function () this.text]; | : function () this.text]; | yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2] : function () this.text]; |
!(timespan.contains(item.timestamp) && (host ? commands.hasDomain(item.value, host) : item.privateData))); | !(timespan.contains(item.timestamp) && (!host || commands.hasDomain(item.value, host)))); | storage["history-command"].mutate("filter", function (item) !(timespan.contains(item.timestamp) && (host ? commands.hasDomain(item.value, host) : item.privateData))); |
remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d, | {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}}; | remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d, |
function () { dactyl.open("chrome: { from: "addons" }); }, | function (args) { let dialog = args[0]; dactyl.assert(dialog in config.dialogs, "E475: Invalid argument: " + dialog); try { config.dialogs[dialog][1](); } catch (e) { dactyl.echoerr("Error opening " + dialog.quote() + ": " + (e.message || e)); } }, { | function () { dactyl.open("chrome://mozapps/content/extensions/extensions.xul", { from: "addons" }); }, |
function () { liberator.open("chrome: { from: "addons" }); }, | function () { liberator.beep(); }, | function () { liberator.open("chrome://mozapps/content/extensions/extensions.xul", { from: "addons" }); }, |
function (count) { tabs.select("$"); }); | function (count) { tabs.select(0); }); | function (count) { tabs.select("$"); }); |
function () { if (!document.getElementById("sidebar-box").hidden) window.toggleSidebar(); | function (args) { if (args.bang) { liberator.open("about:config", (options["newtab"] && options.get("newtab").has("all", "prefs")) ? liberator.NEW_TAB : liberator.CURRENT_TAB); } else window.openPreferences(); | function () { if (!document.getElementById("sidebar-box").hidden) window.toggleSidebar(); }, |
return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none') return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); $this.before('<span class="atd-ajax-load"></span>'); $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 ); } }); $this.before(node); }); | jConfirm(message, '', function(r) { if ( r == true ) { AtD_update_post(id); } else { node.click(); } }); | return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none') return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); $this.before('<span class="atd-ajax-load"></span>'); /* attach a submit listener to the parent form */ $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 ); } }); $this.before(node); }); |
this.each(function(value, index) { (iterator.call(context, value, index) ? trues : falses).push(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])*?\*\ | this.each(function(value, index) { (iterator.call(context, value, index) ? trues : falses).push(value); }); |
function (count) { modes.push(modes.VISUAL); }); | function (count) { editor.executeCommand("cmd_deleteCharForward", count); }, | function (count) { modes.push(modes.VISUAL); }); |
function (args) { let arg = args[0] || ""; let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); dactyl.assert(!arg || titles.indexOf(arg) >= 0, "E475: Invalid argument: " + arg); if (options["usermode"]) options["usermode"] = false; window.stylesheetSwitchAll(buffer.focusedFrame, arg); }, | function (args) { buffer.showPageInfo(true, args[0]); }, | function (args) { let arg = args[0] || ""; let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); dactyl.assert(!arg || titles.indexOf(arg) >= 0, "E475: Invalid argument: " + arg); if (options["usermode"]) options["usermode"] = false; window.stylesheetSwitchAll(buffer.focusedFrame, arg); }, |
].filter(function (f) f[0] !== "" && String(f[0]).length < 200); | context.generate = function () option.values.map(function (o) [o, ""]); | ].filter(function (f) f[0] !== "" && String(f[0]).length < 200); |
function () options.get("sanitizetimespan").completer()] | CommandOption.defaultValue("multiple", function () false); | function () options.get("sanitizetimespan").completer()] |
array_each(onpuchan_topics(document), function(topic) { var placepoint = topic[0]; var tag = topic[1]; var link = xpath(". var abbreviate = xpath(". if(link && abbreviate) { var href = link.getAttribute("href"); var anchor = document.createElement("a"); anchor.setAttribute("style", "cursor: hand; font-size: 10px; color: #fff; padding: 4px; border: 1px solid #00f; background: #36c;"); var f = function() { anchor.removeEventListener("click", f, false); anchor.innerHTML = "読み込み中..."; xmlHttpRequest({method: "GET", url: href, onload: function(http) { var html = document.createElement("div"); html.innerHTML = http.responseText; array_each(onpuchan_topics(html), function(t) { tag.parentNode.removeChild(tag); insertNext(placepoint, t[1]); }); }}); } anchor.addEventListener("click", f, false); anchor.innerHTML = "全部表示"; insertNext(abbreviate, anchor); } insertNext(placepoint, tag); }); | arrayEach(elements, function(a) { var i = xpath(". while(i) { if(i.tagName && i.tagName.toLowerCase() == "hr") { break; } var sibling = i.previousSibling; insertNext(tag, i); i = sibling; } a.parentNode.removeChild(a); tag.appendChild(a); }); | array_each(onpuchan_topics(document), function(topic) { var placepoint = topic[0]; var tag = topic[1]; var link = xpath(".//a[contains(text(), '返信')]", tag)[0]; var abbreviate = xpath(".//*[contains(text(), '省略')]", tag)[0]; if(link && abbreviate) { var href = link.getAttribute("href"); var anchor = document.createElement("a"); anchor.setAttribute("style", "cursor: hand; font-size: 10px; color: #fff; padding: 4px; border: 1px solid #00f; background: #36c;"); var f = function() { anchor.removeEventListener("click", f, false); anchor.innerHTML = "読み込み中..."; xmlHttpRequest({method: "GET", url: href, onload: function(http) { var html = document.createElement("div"); html.innerHTML = http.responseText; array_each(onpuchan_topics(html), function(t) { tag.parentNode.removeChild(tag); insertNext(placepoint, t[1]); }); }}); } anchor.addEventListener("click", f, false); anchor.innerHTML = "全部表示"; insertNext(abbreviate, anchor); } insertNext(placepoint, tag); }); |
}).bind('keyup',function (e) { | }).bind('keypress',function (e) { | $this.bind('keydown',function (e) { var kc = $.fn.tabby.catch_kc(e); if (16 == kc) pressed.shft = true; /* because both CTRL+TAB and ALT+TAB default to an event (changing tab/window) that will prevent js from capturing the keyup event, we'll set a timer on releasing them. */ if (17 == kc) {pressed.ctrl = true; setTimeout("$.fn.tabby.pressed.ctrl = false;",1000);} if (18 == kc) {pressed.alt = true; setTimeout("$.fn.tabby.pressed.alt = false;",1000);} if (9 == kc && !pressed.ctrl && !pressed.alt) { e.preventDefault; // does not work in O9.63 ?? pressed.last = kc; setTimeout("$.fn.tabby.pressed.last = null;",0); process_keypress ($(e.target).get(0), pressed.shft, options); return false; } }).bind('keyup',function (e) { |
equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'); | equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%'); | test("disabled", function() { var view = pane.view('progress disabled'); ok(view.$().hasClass('disabled'), 'should have disabled class'); ok(view.$('.sc-inner'), 'should have sc-inner class'); equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'); equals(view.$('.sc-inner').width(), 0, 'pixel width '); }); |
$.each(c_list.checked_list,function(check_id,obj){ | bt_refresh.element.bind('dcmgrGUI.refresh',function(){ c_list.page = c_pagenate.current_page; list_request.url = DcmgrGUI.Util.getPagePath('/security_groups/list/',c_list.page); list_request.data = DcmgrGUI.Util.getPagenateData(c_list.page,c_list.maxrow) c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) $.each(c_list.checked_list,function(check_id,obj){ | $.each(c_list.checked_list,function(check_id,obj){ //All remove detail element $($('#detail').find('#'+check_id)).remove(); //All reload detail element c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/security_groups/show/',check_id) },true); }); |
}); | $.each(c_list.checked_list,function(check_id,obj){ //All remove detail element $($('#detail').find('#'+check_id)).remove(); //All reload detail element c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/security_groups/show/',check_id) },true); }); |
|
var timeout = setTimeout(function(){ | stop(1000); SC.RunLoop.begin(); view.invokeLater('animate', 1, 'left', 100, .5, function() { | test("callbacks work in general", function(){ var timeout = setTimeout(function(){ start(); ok(false, "Timeout! Callback was not called."); }, 2000); view.animate('left', 100, { duration: 1, callback: function() { start(); ok(true, "Callback was called."); clearTimeout(timeout); } }); stop(); }); |
ok(false, "Timeout! Callback was not called."); }, 2000); view.animate('left', 100, { duration: 1, callback: function() { start(); ok(true, "Callback was called."); clearTimeout(timeout); } | ok(true, "Callback was called."); | test("callbacks work in general", function(){ var timeout = setTimeout(function(){ start(); ok(false, "Timeout! Callback was not called."); }, 2000); view.animate('left', 100, { duration: 1, callback: function() { start(); ok(true, "Callback was called."); clearTimeout(timeout); } }); stop(); }); |
stop(); | SC.RunLoop.end(); | test("callbacks work in general", function(){ var timeout = setTimeout(function(){ start(); ok(false, "Timeout! Callback was not called."); }, 2000); view.animate('left', 100, { duration: 1, callback: function() { start(); ok(true, "Callback was called."); clearTimeout(timeout); } }); stop(); }); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.