rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
function () { editor.editFieldExternally(); }); | function () { editor.pasteClipboard(); }); | function () { editor.editFieldExternally(); }); |
var index = $(this).attr('name'); | var index = $(this).attr('id'); | $(this.left_select_id).find('option:selected').each(function(){ var index = $(this).attr('name'); self.leftSelectionsArray[index] = null; self.rightSelectionsArray[index] = this; $(this).remove(); }); |
$X(' flash.setAttribute('wmode', 'opaque'); flash = swapDOM(flash, flash.cloneNode(false)); flash.offsetWidth; }); | img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); scale = (img.naturalWidth === width)? null : img.naturalWidth / width; var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; var ctx = canvas.getContext('2d'); if(scale){ scale = scale.w? scale.w/dim.... | $X('//*[self::object or self::embed][contains(@type, "flash")][boolean(@wmode)=false or (@wmode!="opaque" and @wmode!="transparent")]', doc).forEach(function(flash){ flash.setAttribute('wmode', 'opaque'); flash = swapDOM(flash, flash.cloneNode(false)); flash.offsetWidth; }); |
.map(function (key) options.getPref("intl.charsetmenu.browser." + key).split(', ')) | context.filters.push(function ({ item }) item.isDirectory()); | .map(function (key) options.getPref("intl.charsetmenu.browser." + key).split(', ')) |
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); }); | chrome.windows.getAll(null, function(wins) { if (wins.length) { chrome.tabs.create({ url: url, selected: true }); if (logins.length) { logins.uniq().forEach(function(url){ chrome.tabs.create({ url: url, selected: false }); }); } } else { chrome.windows.create({ url: url }, function(win) { if (logins.length) { logins.un... | getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); }); |
["mousedown", "mouseup", "click"].slice(0, util.haveGecko("2.0") ? 2 : 3) | ["mousedown", "mouseup", "click"].slice(0, util.haveGecko("2b") ? 2 : 3) | prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].slice(0, util.haveGecko("2.0") ? 2 : 3) .forEach(function (event) { events.dispatch(elem, events.create(doc, event, { screenX... |
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: false | ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey | prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey,... |
function () { tabs.stopAll(); }, | function (args) { dactyl.quit(false, args.bang); }, { | function () { tabs.stopAll(); }, |
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; dactyl.execute(command); } finally { io.readHeredoc = readHeredoc; } | this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); | this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; dactyl.execute(command); } finally { ... |
["mousedown", "mouseup"].forEach(function (event) { | ["mousedown", "mouseup", "click"].slice(0, util.haveGecko("2.0") ? 2 : 3) .forEach(function (event) { | prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey,... |
function (args) { | ].forEach(function (command) { commands.add([command.name], command.description, function (args) { | function (args) { let str = CommandLine.echoArgumentToString(args[0], true); if (str != null) command.action(str); }, { |
completer: function (context) completion.javascript(context), literal: 0 }); }); | function (args) { let str = CommandLine.echoArgumentToString(args[0], true); if (str != null) command.action(str); }, { | |
" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(va... | i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").spl... | " "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(va... |
var post = (function(){ var ID = 0; return function(ps){ var id = "post_"+(++ID); | return function(url, opt){ var id = "request_"+(++ID); | 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; }})(); |
"type" : "post", "ps" : ps, | "type" : "request", "url" : url, "opt" : opt, | 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; }})(); |
})(); | 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; }})(); | |
return this.getToken().addCallback(function(token){ return request('http: method: 'POST', sendContent : { rks : token, url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); }), title : title, comment : Models.Hatena.reprTags(tags) + description.replace(/[\n\r]+/g, ' ') } }); | return (ps.file? succeed(ps.file) : canvasRequest(ps.itemUrl)).addCallback(function(file){ return self.uploadWithBase64(file); | return this.getToken().addCallback(function(token){ return request('http://b.hatena.ne.jp/bookmarklet.edit', { //denyRedirection: true, method: 'POST', sendContent : { rks : token, url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); ... |
["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { | ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { | prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ct... |
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey | ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: false | prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ct... |
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, | function (args) { let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, { | function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, |
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 | chrome.extension.onRequest.addListener(function(req, sender, func){ if(req.request === 'popup'){ var content = req.content; (content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var sel = createFlavoredString(window.getSelection()); var ctx = update({ document :document, window : window, titl... | 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 }); return ret; }})(); |
return ret; | 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 }); return ret; }})(); | |
})(); | }); | 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 }); return ret; }})(); |
this.each(function(value, index) { result = result && !!iterator.call(context, value, index); if (!result) throw $break; }); | 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(... | this.each(function(value, index) { result = result && !!iterator.call(context, value, index); if (!result) throw $break; }); |
["mousedown", "mouseup", "click"].forEach(function (event) { | prefs.withContext(function () { prefs.set("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 })); }); |
return Array.concat(values).every(function (value) res.some(function (item) item[0] == value)); | values(this._options.sort(function (a, b) String.localeCompare(a.name, b.name))), | return Array.concat(values).every(function (value) res.some(function (item) item[0] == value)); |
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } }); | $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); | this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } }); |
return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") return "<"; let res = tokens[token]; if (res == undefined) res = "<" + token + ">"; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; }); | completeOpts = options.filter(function (opt) opt.multiple || !(opt.names[0] in args)); | return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") // Don't quote, as in Vim (but, why so in Vim? You'd think people wouldn't say <q-lt> if they didn't want it) return "<"; let res = tokens[token]; if (res == undefin... |
let special = args.bang; args = args.string; let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; if (args) liberator.open(args, { from: "tabopen", where: where }); else liberator.open("about:blank", { from: "tabopen", where: where }); | liberator.open(args.string || "about:blank", { from: "tabopen", where: liberator.NEW_TAB, background: args.bang }); | function (args) { let special = args.bang; args = args.string; let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; if (args) liberator.open(args, { from: "tabopen", where: where }); ... |
this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); }); | multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")), | this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); }); |
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, | function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { | function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, |
$("ul.group-wrap a.add").live("click", function () { nestedList = $(this).prev(); if (!$(nestedList).find("li.form").length) { $(nestedList).append($(getForm(this))); } else { $(nestedList).find("input:first").focus(); } return false; }); | $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); }, "json"); | $("ul.group-wrap a.add").live("click", function () { nestedList = $(this).prev(); if (!$(nestedList).find("li.form").length) { $(nestedList).append($(getForm(this))); } else { $(nestedList).find("input:first").focus(); } return false; }); |
return this.getToken().addCallback(function(set){ ps.rkm = set['rkm']; return request('http: sendContent : update({ mode : 'enter' }, ps) }); }); | url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); }), | return this.getToken().addCallback(function(set){ ps.rkm = set['rkm']; return request('http://f.hatena.ne.jp/'+set['name']+'/up', { sendContent : update({ mode : 'enter' }, ps) }); }); |
getAttributeNS : Ext.isIE ? function(ns, name){ var d = this.dom; var type = typeof d[ns+":"+name]; if(type != 'undefined' && type != 'unknown'){ return d[ns+":"+name]; } return d[name]; } : function(ns, name){ | function(){ Ext.callback(cb, this); Ext.callback(opt.callback, opt.scope || this, [this, opt]); }, | getAttributeNS : Ext.isIE ? function(ns, name){ var d = this.dom; var type = typeof d[ns+":"+name]; if(type != 'undefined' && type != 'unknown'){ return d[ns+":"+name]; } return d[name]; } : function(ns, name){ |
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); | this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); | this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); |
$("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); | $("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); | $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); |
dactyl.assert(!editor.isTextEdit) | dactyl.assert(!editor.isTextEdit); | function () { dactyl.assert(!editor.isTextEdit) modes.push(modes.TEXT_EDIT); }); |
this.posters.forEach(function(poster){ var stat = self.models.getConfig(ps, poster); if(~ps.enabledPosters.indexOf(poster.name)){ var res = true; } else { var res = stat === 'default'; } var img = $N('img', {'src':poster.ICON, 'title':poster.name, 'class':'poster'}); connect(img, 'onclick', self, function(){ | connect(img, 'onclick', self, function(){ | this.posters.forEach(function(poster){ var stat = self.models.getConfig(ps, poster); if(~ps.enabledPosters.indexOf(poster.name)){ var res = true; } else { var res = stat === 'default'; } var img = $N('img', {'src':poster.ICON, 'title':poster.name, 'class':'poster'}); connect(img, 'onclick'... |
if(res){ self.enables[poster.name] = poster; } else { addElementClass(img, 'disabled'); } df.appendChild(img); self.buttons.push(img); }); | this.posters.forEach(function(poster){ var stat = self.models.getConfig(ps, poster); if(~ps.enabledPosters.indexOf(poster.name)){ var res = true; } else { var res = stat === 'default'; } var img = $N('img', {'src':poster.ICON, 'title':poster.name, 'class':'poster'}); connect(img, 'onclick'... | |
saved.forEach(function (p, i) dactyl[save[i]] = p); | vals.forEach(function (p, i) dactyl[save[i]] = p); | saved.forEach(function (p, i) dactyl[save[i]] = p); |
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){ | TBRL.Popup.open(tab, req.content); }); | 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); ... |
function () { dactyl.mode = modes.TEXTAREA; }); | function () { editor.editFieldExternally(); }); | function () { dactyl.mode = modes.TEXTAREA; }); |
var index = $(this).attr('name'); | var index = $(this).attr('id'); | $(this.right_select_id).find('option:selected').each(function(){ var index = $(this).attr('name'); self.leftSelectionsArray[index] = this; self.rightSelectionsArray[index] = null; $(this).remove(); }); |
params.map(function (name, i) [name, process(args[i])]).toObject(); | let type = ["-builtin", "-ex", "-javascript", "-keys"].reduce(function (a, b) args[b] ? b : a, default_); | params.map(function (name, i) [name, process(args[i])]).toObject(); |
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); | callLater(1, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); | getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); }); |
context.filters.push(function ({ item }) item.isDirectory()); | context.generate = function () lines.map(function (line) (line.match(/([^=]+)=(.+)/) || []).slice(1)); | context.filters.push(function ({ item }) item.isDirectory()); |
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){ | logins.uniq().forEach(function(url){ chrome.tabs.create({ url: url, selected: false }); }); | 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); ... |
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: false | ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey | ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: false })); }); |
liberator.open(args, { from: "tabopen", where: where }); | liberator.open(args, { where: where }); | function (args) { let special = args.bang; args = args.string; let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; if (args) liberator.open(args, { from: "tabopen", where: where }); ... |
liberator.open("about:blank", { from: "tabopen", where: where }); | liberator.open("about:blank", { where: where }); | function (args) { let special = args.bang; args = args.string; let where = special ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB; if (args) liberator.open(args, { from: "tabopen", where: where }); ... |
function (args) { let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, { | function (args) { tabs.reloadAll(args.bang); }, { | function (args) { let arg = args[0]; // FIXME: tabmove! N should probably produce an error dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); // if not specified, move to after t... |
this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); | this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); | this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); }); |
["mousedown", "mouseup"].forEach(function (event) { | .forEach(function (event) { | ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); |
function () { if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template... | function (args) { let str = CommandLine.echoArgumentToString(args[0], true); if (str != null) command.action(str); }, { | function () { // TODO: are all messages single line? Some display an aggregation // of single line messages at least. E.g. :source if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; ... |
b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="u... | " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(... | b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="u... |
return function(ps){ | var post = (function(){ var ID = 0; return function(ps){ | return function(ps){ var id = "post_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "post", "ps" : ps, "id" : id }); return ret; } |
})(); | return function(ps){ var id = "post_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "post", "ps" : ps, "id" : id }); return ret; } | |
["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { | ["mousedown", "mouseup"].forEach(function (event) { events.dispatch(elem, events.create(doc, event, { | ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); |
ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey | ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: false | ["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.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { | function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, | function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { |
return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id | (content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var sel = createFlavoredString(window.getSelection()); var ctx = update({ document :document, window : window, title : title, selection : (!!sel.raw)? sel : null, target : TBRL.getTarget() || document }, window.location); if(Extractors.Quo... | return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; } |
return ret; } | return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; } | |
this.each(function(value, index) { if (result = !!iterator.call(context, value, index)) throw $break; }); | 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(... | this.each(function(value, index) { if (result = !!iterator.call(context, value, index)) throw $break; }); |
function () { if (!editor.isTextEdit) modes.push(modes.TEXT_EDIT); else dactyl.beep(); }); | function () { editor.editFieldExternally(); }); | function () { if (!editor.isTextEdit) modes.push(modes.TEXT_EDIT); else dactyl.beep(); }); |
frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); | ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); | frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); |
function (value) evaluator.createExpression(value, util.evaluateXPath.resolver)); | memoize(this._optionMap, name, function () Option(names, description, type, defaultValue, extraInfo)); | function (value) evaluator.createExpression(value, util.evaluateXPath.resolver)); |
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); | $.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } }); | this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); |
return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") return "<"; let res = tokens[token]; if (res == undefined) res = "<" + token + ">"; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; }); | this._exCommands = this._exCommands.filter(function (c) c != cmd); | return str.replace(/<((?:q-)?)([a-zA-Z]+)?>/g, function (match, quote, token) { if (token == "lt") // Don't quote, as in Vim (but, why so in Vim? You'd think people wouldn't say <q-lt> if they didn't want it) return "<"; let res = tokens[token]; if (res == undefin... |
this._exCommands = this._exCommands.filter(function (c) c != cmd); | this._exCommands = this._exCommands.filter(function (c) c !== cmd); | this._exCommands = this._exCommands.filter(function (c) c != cmd); |
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); }); | mowContainer: Class.memoize(function () document.getElementById("dactyl-multiline-output-container")) | this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); }); |
frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); | commandline.input("Upload file: ", function (path) { let file = io.File(path); dactyl.assert(file.exists()); elem.value = file.path; }, { | frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); |
function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { | function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); }, | function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { |
frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); | frames = frames.filter(function (frame) !(frame.document.body instanceof HTMLFrameSetElement)) | frames = frames.filter(function (frame) { frame.focus(); return document.commandDispatcher.focusedWindow == frame; }); |
this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; }); | dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); }); | this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; }); |
} : function(ns, name){ var d = this.dom; return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; }, | setTimeout(function(){ var height = parseInt(this.dom.scrollHeight, 10); if(!animate){ this.setHeight(height); this.unclip(); if(typeof onComplete == "function"){ onComplete(); } }else{ this.setHeight(oldHeight); this.setHeight(height, animate, duration, function(){ this.unclip(); if(typeof onComplete == "function") on... | } : function(ns, name){ var d = this.dom; return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; }, |
$("#popup_cancel").click( function() { | $("#popup_ok").click( function() { | $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); |
if( callback ) callback(false); | if( callback ) callback(true); | $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); |
commandline.widgets.message = null; if (modes.main != modes.COMMAND_LINE) commandline.widgets.command = null; | commandline.clear(); | function () { window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils).redraw(); commandline.widgets.message = null; if (modes.main != modes.COMMAND_LINE) commandline.widgets.command = null; ... |
var timeoutRequest = SC.Request.getUrl("http: | var timeoutRequest = SC.Request.getUrl("/"), | test("Timeouts - Status listener callback", function() { // Make sure timeouts actually fire, and fire when expected. var timeoutRequest = SC.Request.getUrl("http://www.sproutcore.com"), checkstop; // make the timeout as short as possible so that it will always happen timeoutRequest.timeoutAfter(10).notify(thi... |
connect(img, 'onclick', self, function(){ if(!addElementClass(img, 'disabled')){ removeElementClass(img, 'disabled'); self.enables[poster.name] = poster; } else { delete self.enables[poster.name]; } }); | ps.tags.forEach(function(tag){ this.injectCandidates(tag, true, false); }, this); | connect(img, 'onclick', self, function(){ if(!addElementClass(img, 'disabled')){ removeElementClass(img, 'disabled'); self.enables[poster.name] = poster; } else { delete self.enables[poster.name]; } }); |
vals.forEach(function (p, i) dactyl[save[i]] = p); | guioptions[option].forEach(function (elem) { try { document.getElementById(elem).collapsed = true; } catch (e) {} }); | vals.forEach(function (p, i) dactyl[save[i]] = p); |
}).addErrback(function(e){ | callLater(1, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); | }).addErrback(function(e){ }); |
function () { editor.expandAbbreviation(modes.INSERT); }, | function () { dactyl.mode = modes.TEXTAREA; }); | function () { editor.expandAbbreviation(modes.INSERT); }, |
e.prob = (e.unigram[2] + 0.1) / total * p; | e.prob = (e.unigram[2] + 0.1) / total * p * penalty; | $.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } }); |
return this.getToken().addCallback(function(set){ var name = set['name']; var rkm = set['rkm']; return request('http: method: 'POST', sendContent: { name : name, rkm : rkm, ext : 'png', model: 'capture', image: self.cutBase64(file.binary), fotosize: Math.max(file.height, file.width), folder : '' } }); }); | tags : map(function(pair){ var tag = pair[0], info = pair[1]; return { name : tag, frequency : info.count } }, items(tags)) | return this.getToken().addCallback(function(set){ var name = set['name']; var rkm = set['rkm']; return request('http://f.hatena.ne.jp/'+name+'/haiku', { method: 'POST', sendContent: { name : name, rkm : rkm, ext : 'png', model: 'capture', ... |
callLater(1, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ | chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ | callLater(1, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); }); |
}); | callLater(1, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); }); | |
}).addErrback(function(e){ }); | }, function(win) { if (logins.length) { logins.uniq().forEach(function(url){ chrome.tabs.create({ windowId: win.id, url: url, selected: false }); }); } }); | }).addErrback(function(e){ }); |
let sorted = this._exCommands.sort(function (a, b) a.name > b.name); | let type = ["-builtin", "-ex", "-javascript", "-keys"].reduce(function (a, b) args[b] ? b : a, default_); | let sorted = this._exCommands.sort(function (a, b) a.name > b.name); |
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, | function () { tabs.stopAll(); }, | function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); }, |
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") | this.registerCallback("change", modes.PROMPT, function (str) { if (self._input.complete) | this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); }); |
if (self._input.change) self._input.change.call(commandline, str); | this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); }); | |
template.map(commandline._messageHistory.messages, function (message) | function () { if (commandline._messageHistory.length == 1) { let message = commandline._messageHistory.messages[0]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template... | template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; |
} }, | template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; | |
b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="u... | " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(... | b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="u... |
connect(document, 'onDOMContentLoaded', null, function(ev){ d.callback(title_getter()); | return function(ps){ var id = "post_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "post", "ps" : ps, "id" : id | connect(document, 'onDOMContentLoaded', null, function(ev){ d.callback(title_getter()); }); |
return ret; } | connect(document, 'onDOMContentLoaded', null, function(ev){ d.callback(title_getter()); }); | |
return this.getToken().addCallback(function(){ return DeferredHash({ tags: self.getUserTags(), data: self.getURLData(url) | return this.getToken().addCallback(function(set){ var name = set['name']; var rkm = set['rkm']; return request('http: method: 'POST', sendContent: { name : name, rkm : rkm, ext : 'png', model: 'capture', image: self.cutBase64(file.binary), fotosize: Math.max(file.height, file.width), folder : '' } | return this.getToken().addCallback(function(){ return DeferredHash({ tags: self.getUserTags(), data: self.getURLData(url) }); }).addCallback(function(resses){ |
}).addCallback(function(resses){ | }); | return this.getToken().addCallback(function(){ return DeferredHash({ tags: self.getUserTags(), data: self.getURLData(url) }); }).addCallback(function(resses){ |
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); }, | function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { | function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.