rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); case 'Element': return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return s... | return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); } } })(elm); | return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); case 'Element': return self.selectElement(ctx).addCallback... |
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); | jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as... |
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); let lines = [cmd.serialize().map(comm... | function (args) { io.sourceFromRuntimePath(args, args.bang); }, { | function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + f... |
else if ( oldShippSelIndex != 'undefined' ) | else if ( oldShippSelIndex ) | YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'optio... |
ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); | if ( oldname ) { ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } | YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'optio... |
].forEach(function (command) { commands.add([command.name], command.description, function (args) { | function (args) { | ].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { ... |
let validEvents = config.autocommands.map(function (e) e[0]); | let validEvents = keys(config.autocommands); | ].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { ... |
argCount: "*", completer: function (context) completion.autocmdEvent(context) }); }); | ].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { ... | |
let arg = args.literalArg; | let arg = args[0]; | function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified t... |
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 () tabs.select("$", false), | function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; // count is ignored if an arg is specified, as per Vim if (arg) { dactyl.assert(/^\d+... |
img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback({ contentType: 'image/png', base64: true, height: img.naturalHeight, width ... | Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); | img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback({ contentType: 'image/png', base64: true, ... |
$(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>'); | $(containingList).append('<li class="empty">No choice groups defined.</li>'); | $.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent(); $(selector).parent().remove(); if (!$(containingL... |
autocommands.trigger(event, { url: url || buffer.URL }); | autocommands.trigger(event, { url: defaultURL }); | ].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { ... |
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(... | w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(... | a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(... |
equals(view.get('layout').rotate, 45, "should set rotate"); | view.set('layout', { rotateX: 0 }); equals(view.get('layout').rotate, 0, "should also work with 0"); | test("sets rotate when rotateX is set", function(){ var view = SC.View.create({}); view.set('layout', { rotateX: 45 }); equals(view.get('layout').rotate, 45, "should set rotate");}); |
return function(link){ | var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ | return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; } |
})(); | return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; } | |
.addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); | }, function(res){ | .addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); }); |
$(function(){ | $("#cancelUtrManager").click(function(){ $("#utrTemplateManager").hide(speed); | $(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); }); |
removeSession(); utrIntro(); manageEvents(); | $(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); }); | |
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, ... | function () { tabs.select(0, false); }, | function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified t... |
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); | $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); | this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); |
}).addErrback(function(e){ console.log(e); }); | args = args.map(function(arg){ return JSON.stringify(arg); }).join(',') | }).addErrback(function(e){ console.log(e); }); |
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : | 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(... | $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : |
return $.map(c.slice(start, end), function (e) { return e.text; }); | $.each(this._selected, function (i, e) { result.push(e.text); start += e.text.length; }); | return $.map(c.slice(start, end), function (e) { return e.text; }); |
if(parent === doc){ | if(parent === doc || !parent){ | return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); ... |
function () { return; }); | function () { document.commandDispatcher.rewindFocus(); }); | function () { return; }); |
$.each(queries[index], function (i, q) { | (function (index) { pending.push(index); $.getJSON(me.DATA_DIR + me.encode(prefix) + me.SEPARATOR + me.encode(index) + me.JSON, null, function (data) { Logger.debug("fetched: " + index); 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(" ")] || [],... |
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; Logger.debug("lookup successful."); ctx.phrase = phrase; ... | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [],... | |
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e... | "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"... | c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e... |
function () { bookmarks.toggle(buffer.URL); }); | return liberator.open(items.map(function (i) i.url), liberator.NEW_TAB); | function () { bookmarks.toggle(buffer.URL); }); |
Array.some(elem.childNodes, function (child) regex.test(child.alt))) { | .map(function (re) RegExp(re, "i")); | Array.some(elem.childNodes, function (child) regex.test(child.alt))) { |
buffer.allFrames().map(function (frame) frame.document.pageIsFullyLoaded || 0)), | util.timeout(function () { statusline.updateBufferPosition(); statusline.updateZoomLevel(); commandline.clear(); }, 500); | buffer.allFrames().map(function (frame) frame.document.pageIsFullyLoaded || 0)), |
dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); | dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); | dirs.forEach(function (dir) { dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); sourceDirectory(dir); }); |
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, ... | function (args) { tabs.list(args.literalArg); }, { | function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified t... |
$.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; } }); |
TBRL.Service.open(tab, req.content); | TBRL.Popup.open(tab, req.content); | getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); }); |
$(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();... | $("a.inline-cancel").live("click", function () { if ($(this).parent().hasClass("populated")) { $(this).parent().prev().show(); } $(this).parent().slideUp("fast", function () { $(this).remove(); }); return false; }); | $(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("n... |
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); }); | dir.readDirectory(true).forEach(function (file) { if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); dactyl.pluginFiles[file.path] = true; } catch (e) { dactyl.reportError(e); } } else if (file.isDirectory()) sourceDirectory(file); }); | dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); }); |
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); }); | Object.keys(val).forEach(function(k){ setter(k, val, target[key]); }); | getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); }); |
if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { | if (e.keyCode == $.ui.keyCode.ENTER) { | $(ajaxbox.form).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { // we do NOT want to submit the form on ENTER. e.preventDefault(); } }); |
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) { io.sourceFromRuntimePath(args, 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 ... |
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); }); |
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { | jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); }); |
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 }); }); | |
this.element.find("[type='checkbox']").each(function(key,value){ $(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... | c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } | this.element.find("[type='checkbox']").each(function(key,value){ $(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 hea... |
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] } } }); }) | this.element.find("[type='checkbox']").each(function(key,value){ $(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 hea... | |
var toggle = this.visTypeToggleElements.filter(function(el) { return el.visType == visType.type.value; } )[0]; | var fieldset = this.visTypeFieldsetElements.filter(function(el) { return el.visType == visType.type.value; } )[0]; | var toggle = this.visTypeToggleElements.filter(function(el) { return el.visType == visType.type.value; } )[0]; |
var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; | var a = phrase[q.start]; if (!a) { a = phrase[q.start] = []; | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [],... |
if (!p[r.end]) p[r.end] = [r]; | if (!a[r.end]) a[r.end] = [r]; | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [],... |
p[r.end].push(r); | a[r.end].push(r); | $.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($) { $.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, ... | setTimeout(function() { AtD.suggestShow = false; }, 2); | (function($) { $.alerts = { // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels horizontalOffset: 0, // horizontal offset of the dialog from cent... |
var visBindingTypes = Report.bindingTypes.filter(function(bindingType) { return bindingType.visType.value == visType.type.value; } ); | var variables = this.variables.filter(function(variable) { return variable.variable.value == name; } ); | var visBindingTypes = Report.bindingTypes.filter(function(bindingType) { return bindingType.visType.value == visType.type.value; } ); |
let ranges = this.ranges.filter(function (r) r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0); | this.selections.forEach(function (selection) { selection.removeAllRanges(); }); | let ranges = this.ranges.filter(function (r) r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0); |
fileContents = fileContents.replace(/^(\s*)(\w+)(\s*:\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; }); | (function(){ var names = "("; for(var param in buildUtil.baseMappings){ if(names != "("){ names += "|"; } names += param; } names += ")"; buildUtil.baseMappingRegExp = new RegExp("\\." + names + "\\W", "g"); })(); | fileContents = fileContents.replace(/^(\s*)(\w+)(\s*:\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; }); |
function () { modes.push(modes.QUOTE); }); | function (arg) { events.startRecording(arg); }, | function () { modes.push(modes.QUOTE); }); |
$(document).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { e.preventDefault(); } }); | $(ajaxbox.form).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { e.preventDefault(); } }); | $(document).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { // we do NOT want to submit the form on ENTER. e.preventDefault(); } }); |
$$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; }); | data.boards.each(function(board) { 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 (chip.percent == 100) alldone++; }); }); | $$("form[chip=\"" + chip + "\"").each(function(el) { // Add some more form information el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; }); |
connect(toggle_detail, 'onclick', this, function(ev){ if(!addElementClass(toggle_detail, 'extended')){ removeElementClass(toggle_detail, 'extended'); } this.toggle(); }); | Object.keys(this.savers).forEach(function(key){ this.ps[key] = this.savers[key].body(); }, this); | connect(toggle_detail, 'onclick', this, function(ev){ if(!addElementClass(toggle_detail, 'extended')){ removeElementClass(toggle_detail, 'extended'); } this.toggle(); }); |
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); }); | 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," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); }); |
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ | this.element.find("[type='checkbox']").each(function(key,value){ $(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... | 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.da... |
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.da... | |
data.boards.each(function(board) { 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 (chip.percent == 100) alldone++; }); }); | $$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); } }); | 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.n... |
function () { editor.executeCommand("cmd_beginLine", 1); }); | function () { editor.executeCommand("cmd_deleteToEndOfLine", 1); }); | function () { editor.executeCommand("cmd_beginLine", 1); }); |
function (args) { map(args, mapmodes, false); }, | function (args) { map(args, false); }, | function (args) { map(args, mapmodes, false); }, |
return self.selectRegion(ctx).addCallback(function(region){ | return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ | return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); |
case 'Element': 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)); }); case 'View': return self.capture(win, getViewportPosition(), getViewDimensions()); case 'Page'... | return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); | |
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); | match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}); }); |
data.boards.each(function(board) { 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); } }); }); | $$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; }); | 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.n... |
function (args) { io.sourceFromRuntimePath(args, 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) { io.sourceFromRuntimePath(args, args.bang); }, { |
function (args) { if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(val... | dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), | function (args) { // Vim compatible if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || ... |
func({}); | getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); func({}); }); | |
function (args) { tabs.list(args.literalArg); }, { | function (args) { tabs.list(args[0] || ""); }, { | function (args) { tabs.list(args.literalArg); }, { |
if((''+this.ps[key]) !== body) this.ps[key] = body; | if(key === 'body' && this.ps[key] !== body) delete ps['flavors']; this.ps[key] = body; | Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if((''+this.ps[key]) !== body) this.ps[key] = body; }, this); |
function () { tabs.select(0, false); }, | function (args) { let count = args.count; let arg = args[0]; if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, { | function () { tabs.select(0, false); }, |
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); | chrome.tabs.getSelected(null, function(tab){ d.callback(tab); }); | Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); |
autocommands.trigger(event, { url: url || buffer.URL }); | autocommands.trigger(event, { url: defaultURL }); | function (args) { // Vim compatible if (args.length == 0) { liberator.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url ... |
a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[]... | w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(... | a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[]... |
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(link){ var a = anchor.cloneNode(false); a.href = link; return a; } | 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; }); |
}, function(res){ }); | .addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); }); | }, function(res){ }); |
function (args) { tabs.list(args.literalArg); }, { | function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, ... | function (args) { tabs.list(args.literalArg); }, { |
}, function(res){ | var request = (function(){ var ID = 0; return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id | }, function(res){ }); |
return ret; } })(); | }, function(res){ }); | |
return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { var key = decodeURIComponent(pair.shift()); var value = pair.length > 1 ? pair.join('=') : pair[0]; if (value != undefined) value = decodeURIComponent(value); if (key in hash) { if (!Object.isArray(hash[key]))... | 1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){ret... | return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { var key = decodeURIComponent(pair.shift()); var value = pair.length > 1 ? pair.join('=') : pair[0]; if (value != undefined) value = decodeURIComponent(value); if (key in has... |
(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,./... | return $.map(c.slice(start, end), function (e) { return e.text; }); | (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 = "`1234... |
if(this.ps[key] !== body) | if((''+this.ps[key]) !== body) | Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if(this.ps[key] !== body) this.ps[key] = body; }, this); |
"E189: \"" + filename + "\" exists (add ! to override)"); | "E189: " + filename.quote() + " exists (add ! to override)"); | function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = File(filename); dactyl.assert(!file.exists() || args.bang, "E189: \"" + fi... |
dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing"); | dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); | function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = File(filename); dactyl.assert(!file.exists() || args.bang, "E189: \"" + fi... |
function (arg) { events.startRecording(arg); }, | function () { modes.push(modes.PASS_THROUGH); }); | function (arg) { events.startRecording(arg); }, |
$.each(data[q.ikey.join(" ")] || [], function (i, e) { | $.getJSON(me.DATA_DIR + me.encode(prefix) + me.SEPARATOR + me.encode(index) + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } $.each(data[q.ikey.join(" ")] |... | $.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 ... |
}); 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; Logger.debug("lookup successful."); ctx.phrase = phra... | $.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 ... | |
MsgOpenNewTabForMessage(); | OpenMessageInNewTab({shiftKey: options.getPref("mail.tabs.loadInBackground") }); | function () { if (gDBView && gDBView.selection.count < 1) return void liberator.beep(); MsgOpenNewTabForMessage(); }); |
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); }); | <><dl>{ br + template.map(ary, function ([a, b]) <><dt>{a}</dt> <dd>{b}</dd></>, br) } | dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); }); |
options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); }); | Array.some(elem.childNodes, function (child) regex.test(child.alt))) { | options.withContext(function () { options.setPref("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctr... |
buffer.allFrames().forEach(function (frame) frame.document.pageIsFullyLoaded = val), | util.timeout(function () { statusline.updateUrl(); }, 100); | buffer.allFrames().forEach(function (frame) frame.document.pageIsFullyLoaded = val), |
function (args) { tabs.list(args.literalArg); }, { | function (args) { dactyl.quit(false, args.bang); }, { | function (args) { tabs.list(args.literalArg); }, { |
$.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.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(pending, function (i, e) { if (e == index) { pos = i; return false; } }); | $.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); ... |
TBRL.Service.open(tab, ps); | TBRL.Popup.open(tab, ps); | getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Service.open(tab, ps); } else { var posters = Models.getDefaults(ps); if(!posters.length){ TBRL.Service.alertPreference(ps.type); } else { TBRL.Service.post(ps, posters); ... |
if (!silent) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); | 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 + ":"); } | io.withSavedValues(["readHeredoc", "sourcing"], function () { this.sourcing = update({}, sourcing); args = update({ setFrom: this.sourcing.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[... |
$("a.edit").live("click", function () { trgt = this; addAnchor = $(this).closest("div").find("a.add"); $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); }, "json"); return false; }); | $(this).parent().slideUp("fast", function () { $(this).remove(); }); | $("a.edit").live("click", function () { trgt = this; addAnchor = $(this).closest("div").find("a.add"); $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.