rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); }); | dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); }); | function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); }); |
getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Popup.open(tab, ps); } else { var posters = Models.getDefaults(ps); if(!posters.length){ TBRL.Service.alertPreference(ps.type); } else { TBRL.Service.post(ps, posters); } } func({}); }).addErrback(function(e){ | Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); }); | getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Popup.open(tab, ps); } else { var posters = Models.getDefaults(ps); if(!posters.length){ TBRL.Service.alertPreference(ps.type); } else { TBRL.Service.post(ps, posters); } } func({}); }).addErrback(function(e){ |
function (args) { if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); }, { | function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); }, | function (args) { if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); }, { |
jsio.addCmd(function(context, path, request, opts, imports) { | jsio.addCmd(function(context, request, opts, imports) { | jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\//, '') // leading slash not needed .replace(/\.\.?\//g, '.') // replace relative path indicators with dots .replace(/\//g, '.'); // any remaining slashes are path separators // isAbsolute handles the edge case where the path looks like /../foo imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path) }; return true; } }); |
var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\ | var req = match[0] .replace(/^\ | jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\//, '') // leading slash not needed .replace(/\.\.?\//g, '.') // replace relative path indicators with dots .replace(/\//g, '.'); // any remaining slashes are path separators // isAbsolute handles the edge case where the path looks like /../foo imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path) }; return true; } }); |
imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path) }; | jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\//, '') // leading slash not needed .replace(/\.\.?\//g, '.') // replace relative path indicators with dots .replace(/\//g, '.'); // any remaining slashes are path separators // isAbsolute handles the edge case where the path looks like /../foo imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path) }; return true; } }); |
|
imports[0] = { from: req }; | jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\//, '') // leading slash not needed .replace(/\.\.?\//g, '.') // replace relative path indicators with dots .replace(/\//g, '.'); // any remaining slashes are path separators // isAbsolute handles the edge case where the path looks like /../foo imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path) }; return true; } }); |
|
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0] .replace(/^\ .replace(/\.\.?\ .replace(/\ imports[0] = { from: req }; return true; } }); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); }); | jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*[\w.0-9$\/]+\s*$/); if(match) { var req = match[0] .replace(/^\//, '') // remove any leading slash .replace(/\.\.?\//g, '.') // replace relative path indicators with dots .replace(/\//g, '.'); // any remaining slashes are path separators imports[0] = { from: req }; return true; } }); |
$(this).click(function(){ | this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ | $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); |
}) | $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); |
|
var binding = this.bindings.filter(function(el) { return el.type == this.bindingTypeElements[i].bindingType; } )[0]; | var toggle = this.visTypeToggleElements.filter(function(el) { return el.visType == visType.type.value; } )[0]; | var binding = this.bindings.filter(function(el) { return el.type == this.bindingTypeElements[i].bindingType; } )[0]; |
if (!p[r.end]) p[r.end] = [r]; | if (!a[r.end]) a[r.end] = [r]; | $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); |
p[r.end].push(r); | a[r.end].push(r); | $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); |
$.alerts._show(title, message, null, 'alert', function(result) { | (function($) { $.alerts = { verticalOffset: -75, horizontalOffset: 0, repositionOnResize: true, overlayOpacity: .01, overlayColor: '#FFF', draggable: false, okButton: ' ' + AtD.getLang('button_ok', "OK") + ' ', cancelButton: ' ' + AtD.getLang('button_cancel', "Cancel") + ' ', dialogClass: null, alert: function(message, title, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { | $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); |
}, confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, prompt: function(message, value, title, callback) { if( title == null ) title = 'Prompt'; $.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); }); }, _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( '<div id="popup_container">' + '<h1 id="popup_title"></h1>' + '<div id="popup_content">' + '<div id="popup_message"></div>' + '</div>' + '</div>'); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0 }); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth() }); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); callback(true); }); $("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); }); break; case 'confirm': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#popup_ok").focus(); $("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); break; case 'prompt': $("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_prompt").width( $("#popup_message").width() ); $("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val ); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null ); }); $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); if( value ) $("#popup_prompt").val(value); $("#popup_prompt").focus().select(); break; } if( $.alerts.draggable ) { try { $("#popup_container").draggable({ handle: $("#popup_title") }); $("#popup_title").css({ cursor: 'move' }); } catch(e) { } } }, _hide: function() { $("#popup_container").remove(); $.alerts._overlay('hide'); $.alerts._maintainPosition(false); }, _overlay: function(status) { switch( status ) { case 'show': $.alerts._overlay('hide'); $("BODY").append('<div id="popup_overlay"></div>'); $("#popup_overlay").css({ position: 'absolute', zIndex: 99998, top: '0px', left: '0px', width: '100%', height: $(document).height(), background: $.alerts.overlayColor, opacity: $.alerts.overlayOpacity }); break; case 'hide': $("#popup_overlay").remove(); break; } }, _reposition: function() { var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; if( top < 0 ) top = 0; if( left < 0 ) left = 0; if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); $("#popup_container").css({ top: top + 'px', left: left + 'px' }); $("#popup_overlay").height( $(document).height() ); }, _maintainPosition: function(status) { if( $.alerts.repositionOnResize ) { switch(status) { case true: $(window).bind('resize', $.alerts._reposition); break; case false: $(window).unbind('resize', $.alerts._reposition); break; } } } } jAlert = function(message, title, callback) { $.alerts.alert(message, title, callback); } jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback); }; jPrompt = function(message, value, title, callback) { $.alerts.prompt(message, value, title, callback); }; })(jQuery); | $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); |
|
var visDataTypes = Report.dataTypes.filter(function(dataType) { return dataType.visType.value == visType.type.value; } ); | var visBindingTypes = Report.bindingTypes.filter(function(bindingType) { return bindingType.visType.value == visType.type.value; } ); | var visDataTypes = Report.dataTypes.filter(function(dataType) { return dataType.visType.value == visType.type.value; } ); |
let saved = ["range", "lastRange", "lastString"].map(this.closure(function (s) [s, this[s]])); | let saved = ["range", "lastRange", "lastString"].map(function (s) [s, this[s]], this); | let saved = ["range", "lastRange", "lastString"].map(this.closure(function (s) [s, this[s]])); |
fileContents = fileContents.replace(/^(\s*this\.)(\w+)(\s*=\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ | fileContents = fileContents.replace(/^(\s*)(\w+)(\s*:\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ | fileContents = fileContents.replace(/^(\s*this\.)(\w+)(\s*=\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; }); |
function () { return; }); | function (count, arg) { count = Math.max(count, 1); while (count-- && events.playMacro(arg)) ; }, | function () { return; }); |
var bigStr = arguments.shift(), | var bigStr = Array.prototype.shift.call(arguments), | .defineBare("concat", function() { var bigStr = arguments.shift(), context = this; each(arguments, function() { bigStr = context.call("_concat", bigStr, this); }); return bigStr; }) |
$$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); | board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); | $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); |
Object.keys(this.savers).forEach(function(key){ this.ps[key] = this.savers[key].body(); }, this); | this.toggles.forEach(function(unit){ unit.toggle(); }); | Object.keys(this.savers).forEach(function(key){ this.ps[key] = this.savers[key].body(); }, this); |
args = update({ setFrom: this.file }, args || {}); | args = update({ setFrom: this.sourcing.file }, args || {}); | io.withSavedValues(["readHeredoc", "sourcing"], function () { this.sourcing = update({}, sourcing); args = update({ setFrom: this.file }, 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) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); dactyl.reportError(e, true); } } } }); |
function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); }); | options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); browser.loadOneTab(url, null, null, postdata, background); }); | function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); }); |
self.element.live('click',function(){ self.element.trigger('dcmgrGUI.refresh'); }) | $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ var data = { item:params.data } if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); | self.element.live('click',function(){ self.element.trigger('dcmgrGUI.refresh'); }) |
board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; | ($("reset")).observe("click", function(event) { event.element().update("Resetting").disabled = true; var url = URL + "/DDUReset"; var params = new Hash(); params.set("crate", crateNumber); new Ajax.Request(url, { method: "get", parameters: params, onSuccess: button.callback.bind(button), onFailure: reportError }); | board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); |
function () { editor.executeCommand("cmd_endLine", 1); }); | function () { editor.executeCommand("cmd_beginLine", 1); }); | function () { editor.executeCommand("cmd_endLine", 1); }); |
function (args) { map(args, mapmodes, true); }, | function (args) { map(args, true); }, | function (args) { map(args, mapmodes, true); }, |
return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); | return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); | return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); |
board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); | $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); | board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); |
function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); }, | function (args) { if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); }, { | function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); // TODO: add colon and remove column titles for pedantic Vim compatibility? }, |
let validEvents = config.autocommands.map(function (e) e[0]); | JavaScript.setCompleter(this.get, [function () Iterator(config.autocommands)]); | let validEvents = config.autocommands.map(function (e) e[0]); |
lines.__defineGetter__("last", function () this[this.length - 1]); | function (args) { let runtime = util.OS.isWindows ? "~/vimfiles/" : "~/.vim/"; let file = io.File(runtime + "syntax/" + config.name + ".vim"); if (args.length) file = io.File(args[0]); if (file.exists() && file.isDirectory() || args[0] && /\/$/.test(args[0])) file.append(config.name + ".vim"); dactyl.assert(!file.exists() || args.bang, "File exists"); let template = <![CDATA[ " Vim syntax file " Language: Pentadactyl configuration file " Maintainer: Doug Kearns <[email protected]> " TODO: make this <name> specific - shared dactyl config? if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn include @javascriptTop syntax/javascript.vim unlet b:current_syntax syn include @cssTop syntax/css.vim unlet b:current_syntax syn match <name>CommandStart "\%(^\s*:\=\)\@<=" nextgroup=<name>Command,<name>AutoCmd <commands> \ contained syn match <name>Command "!" contained syn keyword <name>AutoCmd au[tocmd] contained nextgroup=<name>AutoEventList skipwhite <autocommands> \ contained syn match <name>AutoEventList "\(\a\+,\)*\a\+" contained contains=<name>AutoEvent syn region <name>Set matchgroup=<name>Command start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" \ end="$" keepend oneline contains=<name>Option,<name>String <options> \ contained nextgroup=pentadactylSetMod <toggleoptions> execute 'syn match <name>Option "\<\%(no\|inv\)\=\%(' . \ join(s:toggleOptions, '\|') . \ '\)\>!\=" contained nextgroup=<name>SetMod' syn match <name>SetMod "\%(\<[a-z_]\+\)\@<=&" contained syn region <name>JavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline syn region <name>JavaScript matchgroup=<name>JavaScriptDelimiter \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' execute 'syn region <name>Css start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' execute 'syn region <name>Css matchgroup=<name>CssDelimiter' \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' syn match <name>Notation "<[0-9A-Za-z-]\+>" syn match <name>Comment +".*$+ contains=<name>Todo,@Spell syn keyword <name>Todo FIXME NOTE TODO XXX contained syn region <name>String start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline syn match <name>LineComment +^\s*".*$+ contains=<name>Todo,@Spell " NOTE: match vim.vim highlighting group names hi def link <name>AutoCmd <name>Command hi def link <name>AutoEvent Type hi def link <name>Command Statement hi def link <name>Comment Comment hi def link <name>JavaScriptDelimiter Delimiter hi def link <name>CssDelimiter Delimiter hi def link <name>Notation Special hi def link <name>LineComment Comment hi def link <name>Option PreProc hi def link <name>SetMod <name>Option hi def link <name>String String hi def link <name>Todo Todo let b:current_syntax = "<name>" let &cpo = s:cpo_save unlet s:cpo_save " vim: tw=130 et ts=4 sw=4: ]]>; const WIDTH = 80; function wrap(prefix, items, sep) { sep = sep || " "; let width = 0; let lines = []; lines.__defineGetter__("last", function () this[this.length - 1]); for (let item in (isArray(items) ? array.iterValues : iter)(items)) { if (item.length > width && (!lines.length || lines.last.length > 1)) { lines.push([prefix]); width = WIDTH - prefix.length; prefix = " \\ "; } width -= item.length + sep.length; lines.last.push(item, sep); } lines.last.pop(); return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n"); } file.write(commands.replaceTokens(String(template), { name: config.name, autocommands: wrap("syn keyword " + config.name + "AutoEvent ", keys(config.autocommands)), commands: wrap("syn keyword " + config.name + "Command ", array(c.specs for (c in commands)).flatten()), options: wrap("syn keyword " + config.name + "Option ", array(o.names for (o in options) if (o.type != "boolean")).flatten()), toggleoptions: wrap("let s:toggleOptions = [", array(o.realNames for (o in options) if (o.type == "boolean")) .flatten().map(String.quote), ", ") + "]" })); }, { argCount: "?", bang: true, completer: function (context) completion.file(context, true), literal: 1 }); commands.add(["runt[ime]"], "Source the specified file from each directory in 'runtimepath'", function (args) { io.sourceFromRuntimePath(args, args.bang); }, { argCount: "+", bang: true, completer: function (context) completion.runtime(context) } ); commands.add(["scrip[tnames]"], "List all sourced script names", function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); }, { argCount: "0" }); commands.add(["so[urce]"], "Read Ex commands from a file", function (args) { if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); }, { argCount: "+", bang: true, completer: function (context) completion.file(context, true) }); commands.add(["!", "run"], "Run a command", function (args) { let arg = args[0] || ""; if (args.bang) arg = "!" + arg; if (options["banghist"]) { dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) ); } io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); }, { argCount: "?", bang: true, literal: 0 }); }, completion: function () { completion.charset = function (context) { context.anchored = false; context.keys = { text: util.identity, description: services.charset.getCharsetTitle }; context.generate = function () iter(services.charset.getDecoderList()); }; completion.directory = function directory(context, full) { this.file(context, full); context.filters.push(function (item) item.isdir); }; completion.environment = function environment(context) { context.title = ["Environment Variable", "Value"]; context.generate = function () io.system(util.OS.isWindows ? "set" : "env") .split("\n").filter(function (line) line.indexOf("=") > 0) .map(function (line) line.match(/([^=]+)=(.*)/).slice(1)); }; completion.file = function file(context, full, dir) { function getDir(str) str.match(/^(?:.*[\/\\])?/)[0]; dir = getDir(dir || context.filter); let file = util.getFile(dir); if (file && (!file.exists() || !file.isDirectory())) file = file.parent; if (!full) context.advance(dir.length); context.title = [full ? "Path" : "Filename", "Type"]; context.keys = { text: !full ? "leafName" : function (f) this.path, path: function (f) dir + f.leafName, description: function (f) this.isdir ? "Directory" : "File", isdir: function (f) f.isDirectory(), icon: function (f) this.isdir ? "resource: : "moz-icon: }; context.compare = function (a, b) b.isdir - a.isdir || String.localeCompare(a.text, b.text); if (options["wildignore"]) { let wig = options.get("wildignore"); context.filters.push(function (item) item.isdir || !wig.getKey(this.name)); } context.key = dir; let uri = io.isJarURL(dir); if (uri) context.generate = function generate_jar() { let file = util.getFile(uri.JARFile); if (file) { let jar = services.ZipReader(file); try { let filter = RegExp("^" + util.regexp.escape(decodeURI(getDir(uri.JAREntry))) + "[^/]*/?$"); return [ { isDirectory: function () s.substr(-1) == "/", leafName: /([^\/]*)\/?$/.exec(s)[1] } for (s in iter(jar.findEntries("*"))) if (filter.test(s)) ] } finally { jar.close(); } } }; else context.generate = function generate_file() { try { return io.File(file || dir).readDirectory(); } catch (e) {} return []; }; }; completion.runtime = function (context) { for (let [, dir] in Iterator(options["runtimepath"])) context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) this.path.substr(dir.length); }); }; completion.shellCommand = function shellCommand(context) { context.title = ["Shell Command", "Path"]; context.generate = function () { let dirNames = services.environment.get("PATH").split(util.OS.isWindows ? ";" : ":"); let commands = []; for (let [, dirName] in Iterator(dirNames)) { let dir = io.File(dirName); if (dir.exists() && dir.isDirectory()) commands.push([[file.leafName, dir.path] for (file in iter(dir.directoryEntries)) if (file.isFile() && file.isExecutable())]); } return array.flatten(commands); }; }; completion.addUrlCompleter("f", "Local files", function (context, full) { let match = util.regexp(<![CDATA[ ^ ( ((chrome|resource):\/\/) [^\/]* ) (\/[^\/]*)? $ ]]>).exec(context.filter); if (match) { if (!match[4]) { context.key = match[2]; context.advance(match[2].length); context.generate = function () util.chromePackages.map(function (p) [p, match[2] + p + "/"]); } else if (match[3] === "chrome") { context.key = match[1]; context.advance(match[1].length + 1); context.generate = function () iter({ content: "Chrome content", locale: "Locale-specific content", skin: "Theme-specific content" }); } } if (!match || match[3] === "resource" && match[4]) if (/^(\.{0,2}|~)\/|^file:/.test(context.filter) || util.getFile(context.filter) || io.isJarURL(context.filter)) completion.file(context, full); }); }, | lines.__defineGetter__("last", function () this[this.length - 1]); |
function (args) { tabs.switchTo(args[0], args.bang, args.count); }, { | function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, { | function (args) { tabs.switchTo(args[0], args.bang, args.count); }, { |
return function(url){ if (url.match(/^https?:\/\ return url; } else if (url.indexOf("/") === 0) { return top + url; } else { var result = current; if(url.indexOf(".") === 0){ var count = 15; while(url.indexOf(".") === 0 && !(--count === 0)){ if(url.substring(0, 3) === "../") result = result.replace(/\/[^\/]+\/$/,"/"); url = url.replace(/^\.+\/?/,"") } } return result + url; } } | return new DeferredList(values(ds)).addCallback(function(results){ var res = {}; for (var i = 0, len=results.length; i < len; i++) res[props[i]] = results[i]; return res; }); | return function(url){ if (url.match(/^https?:\/\//)) { return url; } else if (url.indexOf("/") === 0) { return top + url; } else { var result = current; if(url.indexOf(".") === 0){ var count = 15;// η‘ιγ«γΌγι²ζ’η¨. 15εγ../γ./δ½Ώγ£γ¦γURLγ―γγγγ«γͺγγ γγ¨γγγγ¨γ§. while(url.indexOf(".") === 0 && !(--count === 0)){ if(url.substring(0, 3) === "../") result = result.replace(/\/[^\/]+\/$/,"/"); url = url.replace(/^\.+\/?/,"") } } return result + url; } } |
}, function(res){ d.callback(res); }); | }, function(res){ }); | }, function(res){ d.callback(res); }); |
}).addCallback(function(image){ console.log(image); | }).addCallback(function(file){ | }).addCallback(function(image){ console.log(image); return { type : 'photo', item : ctx.title, file : { contentType: 'image/png', base64: true, binary: image } }; }); |
file : { contentType: 'image/png', base64: true, binary: image } | file : file | }).addCallback(function(image){ console.log(image); return { type : 'photo', item : ctx.title, file : { contentType: 'image/png', base64: true, binary: image } }; }); |
function (args) { dactyl.quit(false, args.bang); }, { | function (args) { tabs.list(args.literalArg); }, { | function (args) { dactyl.quit(false, args.bang); }, { |
.addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); | return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id | .addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); }); |
return ret; } | .addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); }); |
|
var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { var character = String.specialChar[match[0]]; return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); }); | 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])*?\*\ | var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { var character = String.specialChar[match[0]]; return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); }); |
$.each(keyCodes, function (i, keyCode) { | (function () { var keyCodes = [ 192, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 109, 189, 107, 187, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 219, 221, 220, 65, 83, 68, 70, 71, 72, 74, 75, 76, 59, 186, 222, 90, 88, 67, 86, 66, 78, 77, 188, 190, 191, 32 ]; var lowerCase = "`1234567890--==qwertyuiop[]\\asdfghjkl;;\'zxcvbnm,./ "; var upperCase = "~!@#$%^&*()__++QWERTYUIOP{}|ASDFGHJKL::\"ZXCVBNM<>? "; var table = {}; $.each(keyCodes, function (i, keyCode) { | $.each(keyCodes, function (i, keyCode) { table[keyCode] = [lowerCase.charAt(i), upperCase.charAt(i)]; }); |
KeyEvent._table = table; })(); | $.each(keyCodes, function (i, keyCode) { table[keyCode] = [lowerCase.charAt(i), upperCase.charAt(i)]; }); |
|
return frames.filter(function (f) f === buffer.focusedFrame).concat( | buffer.allFrames().forEach(function (frame) frame.document.pageIsFullyLoaded = val), | return frames.filter(function (f) f === buffer.focusedFrame).concat( |
res = context.allItems.items.map(function (item) [item.text]); | return Array.concat(values).every(function (value) res.some(function (item) item[0] == value)); | res = context.allItems.items.map(function (item) [item.text]); |
function (count, arg) { count = Math.max(count, 1); while (count-- && events.playMacro(arg)) ; }, | function () { modes.push(modes.QUOTE); }); | function (count, arg) { count = Math.max(count, 1); while (count-- && events.playMacro(arg)) ; }, |
$.each(pending, function (i, e) { if (e == index) { pos = i; return false; | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; | $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); |
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); | $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); |
|
function (arg) /^(up|down)$/.test(arg), | return this._exMap[name] || !full && this._exCommands.filter(function (cmd) cmd.hasName(name))[0] || null; | function (arg) /^(up|down)$/.test(arg), |
function () { window.openOptionsDialog(); }, | function () { window.BrowserOpenFileWindow(); }], | function () { window.openOptionsDialog(); }, |
["mousedown", "mouseup", "click"].forEach(function (event) { | options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { | ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); |
}); | ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); |
|
function (args) { dactyl.quit(false, args.bang); }, { | function (args) { tabs.reloadAll(args.bang); }, { | function (args) { dactyl.quit(false, args.bang); }, { |
$.each(fuzzyMap[c[i]], function (i_, t) { | $.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { | $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); |
if (found) { var r = me._matchKey(k.slice(1), j, seg, fuzzyMap); if (r) { result = r; return false; } } } }); | $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); |
|
options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); browser.loadOneTab(url, null, null, postdata, background); }); | return urls.map(function (url) { if (/^(\.{0,2}|~)\ try { let file = io.File(url); if (file.exists() && file.isReadable()) return services.get("io").newFileURI(file).spec; } catch (e) {} } url = url.trim(); let proto = url.match(/^([-\w]+):/); if (proto && Cc["@mozilla.org/network/protocol;1?name=" + proto[1]]) return url.replace(/\s*\n+\s*/g, ""); if (/^[a-zA-Z0-9-.]+(?:\/|$)/.test(url) && /[.\/]/.test(url) && !/\s/.test(url) || /^[a-zA-Z0-9-.]+:\d+(?:\/|$)/.test(url)) return url; let searchURL = bookmarks.getSearchURL(url, false) || bookmarks.getSearchURL(url, true); if (searchURL) return searchURL; return url; }); | options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); browser.loadOneTab(url, null, null, postdata, background); }); |
$.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); | $("a.inline-save").live("click", function () { trgt = this; action = $(trgt).attr("rel"); params = $(this).parent().find(":input").serialize(); selector = '[rel="' + action + '"]'; $.post(action, params, function (data) { errors = data['errors']; if (errors) { $(trgt).parent().find(":input").each(function () { if (errors[$(this).attr("name")]) { $(this).addClass("error"); if (!$(this).next().hasClass("msg")) { $(this).after('<span class="msg">' + errors[$(this).attr("name")][0] + '</span>'); } } else { $(this).removeClass("error"); $(this).parent().find('span.msg').remove(); } }); } else { $(trgt).parent().replaceWith(data['new_row']); $(selector).prev().find("li.empty").remove(); } | $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); }, "json"); |
return false; }); | $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); }, "json"); |
|
options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); browser.loadOneTab(url, null, null, postdata, background); }); | function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); }); | options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); browser.loadOneTab(url, null, null, postdata, background); }); |
}).addErrback(function(e){ | getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); | }).addErrback(function(e){ }); |
let arg = args[0] || ""; if (args.bang) arg = "!" + arg; if (options["banghist"]) { dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) ); } io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); | if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); | function (args) { let arg = args[0] || ""; // :!! needs to be treated specially as the command parser sets the // bang flag but removes the ! from arg if (args.bang) arg = "!" + arg; // NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable? // pass through a raw bang when escaped or substitute the last command // This is an asinine and irritating feature when we have searchable // command-line history. --Kris if (options["banghist"]) { // replaceable bang and no previous command? dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) ); } io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); }, { |
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ | $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ | self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); |
self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); | self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); |
|
var variables = this.variables.results.bindings.filter(function(el) { return el.binding.value == report.bindings.results.bindings[i].binding.value; } ); | var binding = this.bindings.filter(function(el) { return el.type == this.bindingTypeElements[i].bindingType; } )[0]; | var variables = this.variables.results.bindings.filter(function(el) { return el.binding.value == report.bindings.results.bindings[i].binding.value; } ); |
$.each(pending, function (i, e) { if (e == index) { | $.each(pending, function (i, p) { if (p.index == index) { | $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); |
$.alerts._show(title, message, null, 'confirm', function(result) { | $.alerts._show(title, message, null, 'alert', function(result) { | $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); |
var bindDataTypes = this.dataTypes.filter(function(dataType) { return dataType.bindingType.value == bindingType.type.value; } ); | var visDataTypes = Report.dataTypes.filter(function(dataType) { return dataType.visType.value == visType.type.value; } ); | var bindDataTypes = this.dataTypes.filter(function(dataType) { return dataType.bindingType.value == bindingType.type.value; } ); |
fileContents = fileContents.replace(/^(\s*)([\w\.]+)(\s*=\s*function)\s*(\(.*)/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(p2.replace(/\./g, "_"))+p4; }); | fileContents = fileContents.replace(/^(\s*this\.)(\w+)(\s*=\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; }); | fileContents = fileContents.replace(/^(\s*)([\w\.]+)(\s*=\s*function)\s*(\(.*)/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(p2.replace(/\./g, "_"))+p4; }); |
function (arg) { events.startRecording(arg); }, | if (re.test(url) && re.result.some(function (k) k === key)) | function (arg) { events.startRecording(arg); }, |
dactyl.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); | dactyl.echoerr("Exxx: Could not add bookmark " + title.quote(), commandline.FORCE_SINGLELINE); | function (args) { let url = args.length == 0 ? buffer.URL : args[0]; let title = args["-title"] || (args.length == 0 ? buffer.title : null); let keyword = args["-keyword"] || null; let tags = args["-tags"] || []; if (bookmarks.add(false, title, url, keyword, tags, args.bang)) { let extra = (title == url) ? "" : " (" + title + ")"; dactyl.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE); } else dactyl.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); }, { |
data.boards.each(function(board) { | percents.each(function(it) { | data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); }); |
var slot = board.slot; board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); | if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } | data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); }); |
this.toggles.forEach(function(unit){ unit.toggle(); | connect(this.image, 'onload', this.image, function(){ var width = this.naturalWidth; var height = this.naturalHeight; var resizedHeight = this.width / width * height; if(resizedHeight > 300){ this.setAttribute('style', 'height:300px !important;width:'+(height/300*width)+' !important;'); this.setAttribute('style', 'height:300px !important;width:'+(height/300*width)+' !important;'); } self.size.appendChild($T(width + ' Γ ' + height)); wait(0).addCallback(function(){ Form.resize(true); | this.toggles.forEach(function(unit){ unit.toggle(); }); |
}); | this.toggles.forEach(function(unit){ unit.toggle(); }); |
|
percents.each(function(it) { if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } }); | data.boards.each(function(board) { var slot = board.slot; board.chips.each(function(chip) { var name = chip.chip; $(name + "_label_" + slot).update(chip.version); }); }); | percents.each(function(it) { if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } }); |
function () { events.feedkeys("<BS>", true); }); | function () { editor.executeCommand("cmd_endLine", 1); }); | function () { events.feedkeys("<BS>", true); }); |
$.each(queries[index], function (i, q) { | (function (index) { pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + files[index] + me.JSON, null, function (data) { if (me._queries !== queries) return; $.each(queries[index], function (i, q) { | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); |
var pos = -1; $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); if (pos == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(pos, 1); if (pending.length == 0) { me._queries = null; ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } }); })(k); | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); |
|
}).addCallback(function(file){ return { type : 'photo', item : ctx.title, file : file }; }); | return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); | }).addCallback(function(file){ return { type : 'photo', item : ctx.title, file : file }; }); |
var binding = this.bindings.filter(function(el) { return el.type == this.bindingTypeElements[i].bindingType; } )[0]; | var binding = this.bindings.results.bindings.filter(function(el) { return el.type.value == element.bindingType; } )[0]; | var binding = this.bindings.filter(function(el) { return el.type == this.bindingTypeElements[i].bindingType; } )[0]; |
percents.each(function(it) { | data.boards.each(function(board) { | percents.each(function(it) { if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } }); |
if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } | var slot = board.slot; board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); | percents.each(function(it) { if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } }); |
if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); | let arg = args.literalArg; if (args.bang) arg = "!" + arg; dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); if (options["banghist"]) arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) ); io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); | function (args) { if (args.length > 1) dactyl.echoerr("E172: Only one file name allowed"); else io.source(args[0], args.bang); }, { |
YUI().use('node', function(Y) { if (Y.Node.get('#shipping-checkbox').get('checked')) { Y.Node.get('#shippinginfo').setStyle('display', 'none'); } else { Y.Node.get('#shippinginfo').setStyle('display', 'block'); if (document.register.company_name) { document.register.s_company_name.value = document.register.company_name.value; } if (document.register.company_additional) { document.register.s_company_additional.value = document.register.company_additional.value; } if (document.register.mi) { document.register.s_mi.value = document.register.mi.value; } if (document.register.state) { document.register.s_state.value = document.register.state.value; } document.register.s_first_name.value = document.register.first_name.value; document.register.s_last_name.value = document.register.last_name.value; | YUI().use( 'node', function(Y) { if (Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { Y.Node.get( '#shippinginfo' ).setStyle( 'display', 'none' ); } else { Y.Node.get( '#shippinginfo' ).setStyle('display', 'block' ); if ( Y.Node.get( '#s_company_name' ) && Y.Node.get( '#company_name' ) && Y.Node.get( '#company_name' ).get( 'value' ) != '' ) { Y.Node.get( '#s_company_name' ).set( 'value', Y.Node.get( '#company_name' ).get( 'value' ) ); } | YUI().use('node', function(Y) { if (Y.Node.get('#shipping-checkbox').get('checked')) { Y.Node.get('#shippinginfo').setStyle('display', 'none'); } else { Y.Node.get('#shippinginfo').setStyle('display', 'block'); if (document.register.company_name) { document.register.s_company_name.value = document.register.company_name.value; } if (document.register.company_additional) { document.register.s_company_additional.value = document.register.company_additional.value; } if (document.register.mi) { document.register.s_mi.value = document.register.mi.value; } if (document.register.state) { document.register.s_state.value = document.register.state.value; } document.register.s_first_name.value = document.register.first_name.value; document.register.s_last_name.value = document.register.last_name.value; document.register.s_zip.value = document.register.zip.value; document.register.s_phone.value = document.register.phone.value; if (Y.Node.get('#fax') && Y.Node.get('#s_fax')) { document.register.s_fax.value = document.register.fax.value; } document.register.s_email.value = document.register.email.value; document.register.s_address1.value = document.register.address1.value; if (Y.Node.get('#address2') && Y.Node.get('#s_address2')) { document.register.s_address2.value = document.register.address2.value; } document.register.s_city.value = document.register.city.value; document.register.s_country.selectedIndex = document.register.country.selectedIndex; } }); |
document.register.s_zip.value = document.register.zip.value; document.register.s_phone.value = document.register.phone.value; if (Y.Node.get('#fax') && Y.Node.get('#s_fax')) { document.register.s_fax.value = document.register.fax.value; } document.register.s_email.value = document.register.email.value; document.register.s_address1.value = document.register.address1.value; if (Y.Node.get('#address2') && Y.Node.get('#s_address2')) { document.register.s_address2.value = document.register.address2.value; } document.register.s_city.value = document.register.city.value; document.register.s_country.selectedIndex = document.register.country.selectedIndex; | if ( Y.Node.get( '#s_company_additional' ) && Y.Node.get( '#company_additional' ) && Y.Node.get( '#company_additional' ).get( 'value' ) != '' ) { Y.Node.get( '#s_company_additional' ).set( 'value', Y.Node.get( '#company_additional' ).get( 'value' ) ); } if ( Y.Node.get( '#s_first_name' ) && Y.Node.get( '#first_name' ) && Y.Node.get( '#first_name' ).get( 'value' ) != '' ) { Y.Node.get( '#s_first_name' ).set( 'value', Y.Node.get( '#first_name' ).get( 'value' ) ); } if ( Y.Node.get( '#s_mi' ) && Y.Node.get( '#mi' ) && Y.Node.get( '#mi' ).get( 'value' ) != '' ) { Y.Node.get( '#s_mi' ).set( 'value', Y.Node.get( '#mi' ).get( 'value' ) ); } if ( Y.Node.get( '#s_last_name' ) && Y.Node.get( '#last_name' ) && Y.Node.get( '#last_name' ).get( 'value' ) != '' ) { Y.Node.get( '#s_last_name' ).set( 'value', Y.Node.get( '#last_name' ).get( 'value' ) ); } if ( Y.Node.get( '#s_address1' ) && Y.Node.get( '#address1' ) && Y.Node.get( '#address1' ).get( 'value' ) != '' ) { Y.Node.get( '#s_address1' ).set( 'value', Y.Node.get( '#address1' ).get( 'value' ) ); } if ( Y.Node.get( '#s_address2' ) && Y.Node.get( '#address2' ) && Y.Node.get( '#address2' ).get( 'value' ) != '' ) { Y.Node.get( '#s_address2' ).set( 'value', Y.Node.get( '#address2' ).get( 'value' ) ); } if ( Y.Node.get( '#s_city' ) && Y.Node.get( '#city' ) && Y.Node.get( '#city' ).get( 'value' ) != '' ) { Y.Node.get( '#s_city' ).set( 'value', Y.Node.get( '#city' ).get( 'value' ) ); } if ( Y.Node.get( '#s_zip' ) && Y.Node.get( '#zip' ) && Y.Node.get( '#zip' ).get( 'value' ) != '' ) { Y.Node.get( '#s_zip' ).set( 'value', Y.Node.get( '#zip' ).get( 'value' ) ); } if ( Y.Node.get( '#s_country' ) && Y.Node.get( '#country' ) && Y.Node.get( '#country' ).get( 'selectedIndex' ) != '' ) { Y.Node.get( '#s_country' ).set( 'selectedIndex', Y.Node.get( '#country' ).get( 'selectedIndex' ) ); updateSubdivisions( Y.Node.get( '#s_country' ) ); } if ( Y.Node.get( '#s_state' ) && Y.Node.get( '#state' ) && Y.Node.get( '#state' ).get( 'selectedIndex' ) != '' ) { Y.Node.get( '#s_state' ).set( 'selectedIndex', Y.Node.get( '#state' ).get( 'selectedIndex' ) ); } if ( Y.Node.get( '#s_phone' ) && Y.Node.get( '#phone' ) && Y.Node.get( '#phone' ).get( 'value' ) != '' ) { Y.Node.get( '#s_phone' ).set( 'value', Y.Node.get( '#phone' ).get( 'value' ) ); } if ( Y.Node.get( '#s_fax' ) && Y.Node.get( '#fax' ) && Y.Node.get( '#fax' ).get( 'value' ) != '' ) { Y.Node.get( '#s_fax' ).set( 'value', Y.Node.get( '#fax' ).get( 'value' ) ); } if ( Y.Node.get( '#s_email' ) && Y.Node.get( '#email' ) && Y.Node.get( '#email' ).get( 'value' ) != '' ) { Y.Node.get( '#s_email' ).set( 'value', Y.Node.get( '#email' ).get( 'value' ) ); } | YUI().use('node', function(Y) { if (Y.Node.get('#shipping-checkbox').get('checked')) { Y.Node.get('#shippinginfo').setStyle('display', 'none'); } else { Y.Node.get('#shippinginfo').setStyle('display', 'block'); if (document.register.company_name) { document.register.s_company_name.value = document.register.company_name.value; } if (document.register.company_additional) { document.register.s_company_additional.value = document.register.company_additional.value; } if (document.register.mi) { document.register.s_mi.value = document.register.mi.value; } if (document.register.state) { document.register.s_state.value = document.register.state.value; } document.register.s_first_name.value = document.register.first_name.value; document.register.s_last_name.value = document.register.last_name.value; document.register.s_zip.value = document.register.zip.value; document.register.s_phone.value = document.register.phone.value; if (Y.Node.get('#fax') && Y.Node.get('#s_fax')) { document.register.s_fax.value = document.register.fax.value; } document.register.s_email.value = document.register.email.value; document.register.s_address1.value = document.register.address1.value; if (Y.Node.get('#address2') && Y.Node.get('#s_address2')) { document.register.s_address2.value = document.register.address2.value; } document.register.s_city.value = document.register.city.value; document.register.s_country.selectedIndex = document.register.country.selectedIndex; } }); |
function () { editor.executeCommand("cmd_deleteCharBackward", 1); }); | function () { events.feedkeys("<BS>", true); }); | function () { editor.executeCommand("cmd_deleteCharBackward", 1); }); |
return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n"); | lines.__defineGetter__("last", function () this[this.length - 1]); | return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n"); |
function (args) { tabs.list(args[0] || ""); }, { | function () { tabs.select(0, false); }, | function (args) { tabs.list(args[0] || ""); }, { |
if (!events.feedingKeys && self._completions && options["autocomplete"].length) { self._completions.complete(true, false); if (self._completions) self._completions.itemList.show(); } | if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); | dactyl.trapErrors(function () { if (!events.feedingKeys && self._completions && options["autocomplete"].length) { self._completions.complete(true, false); if (self._completions) self._completions.itemList.show(); } }); |
let arg = args.literalArg; | let arg = args[0] || ""; | function (args) { let arg = args.literalArg; // :!! needs to be treated specially as the command parser sets the // bang flag but removes the ! from arg if (args.bang) arg = "!" + arg; // replaceable bang and no previous command? dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); // NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable? // pass through a raw bang when escaped or substitute the last command // This is an asinine and irritating feature when we have searchable // command-line history. --Kris if (options["banghist"]) arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) ); io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); }, { |
args = args.map(function(arg){ return JSON.stringify(arg); }).join(',') | }, function(res){ d.callback(res); }); | args = args.map(function(arg){ return JSON.stringify(arg); }).join(',') |
return request('http: if(res.responseText.match(/\srkm\s*:\s*['"](.+?)['"]/)) return self.token = RegExp.$1; | return request(Hatena.JSON).addCallback(function(res){ var data = JSON.parse(res.responseText); if(!data["login"]){ delete self['data']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } self.data = data; return self.data; | return request('http://d.hatena.ne.jp/edit').addCallback(function(res){ if(res.responseText.match(/\srkm\s*:\s*['"](.+?)['"]/)) return self.token = RegExp.$1; }); |
ret.callback(canvas.toDataURL('image/png', '')); | ret.callback({ contentType: 'image/png', base64: true, height: size.h, width : size.w, binary: canvas.toDataURL('image/png', '') }); | }, function(res){ var img = new Image(); img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/dim.w : scale.h? scale.h/dim.h : scale; canvas.width = size.w = dim.w * scale; canvas.height = size.h = dim.h * scale; ctx.scale(scale, scale); } else { canvas.width = size.w = dim.w; canvas.height = size.h = dim.h; } var ctx = canvas.getContext('2d'); ctx.drawImage(img, pos.x, pos.y, dim.w, dim.h, 0, 0, size.w, size.h); ret.callback(canvas.toDataURL('image/png', '')); }, false); img.src = res; }); |
function (args) { tabs.reloadAll(args.bang); }, { | function (args) { dactyl.quit(false, args.bang); }, { | function (args) { tabs.reloadAll(args.bang); }, { |
}, function(res){ }); | var post = (function(){ var ID = 0; return function(ps){ var id = "post_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "post", "ps" : ps, "id" : id }); return ret; } })(); | }, function(res){ }); |
return function(match) { return template.evaluate(match) }; | 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 function(match) { return template.evaluate(match) }; |
frames.filter(function (f) f !== buffer.focusedFrame)) | return frames.filter(function (f) f === buffer.focusedFrame).concat( | frames.filter(function (f) f !== buffer.focusedFrame)) |
return Array.concat(values).every(function (re) res.some(function (item) item[0] == re.result)); | return Array.concat(values).every(function (value) res.some(function (item) item[0] == value)); | return Array.concat(values).every(function (re) res.some(function (item) item[0] == re.result)); |
if (re.test(url) && re.result.some(function (k) k === key)) | function () { return; }); | if (re.test(url) && re.result.some(function (k) k === key)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.