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.w : scale.h? scale.h/dim.h : scale; canvas.width = size.w = dim.w; canvas.height = size.h = dim.h; dim.w *= scale; dim.h *= scale; pos.x *= scale; pos.y *= scale; } else { canvas.width = size.w = dim.w; canvas.height = size.h = dim.h; } ctx.drawImage(img, pos.x, pos.y, dim.w, dim.h, 0, 0, size.w, size.h); ret.callback({ contentType: 'image/png', base64: true, height: size.h, width : size.w, binary: canvas.toDataURL('image/png', '') }); }, false);
$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.uniq().forEach(function(url){ chrome.tabs.create({ windowId: win.id, url: url, selected: false }); }); } }); } });
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: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); });
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, shiftKey: shiftKey, metaKey: false })); }); });
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 { io.readHeredoc = readHeredoc; } });
["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, shiftKey: shiftKey, metaKey: 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(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
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||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" "+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(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
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(); }), title : title, comment : Models.Hatena.reprTags(tags) + description.replace(/[\n\r]+/g, ' ') } }); });
["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: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); });
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: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); });
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, title : title, selection : (!!sel.raw)? sel : null, target : TBRL.getTarget() || document }, window.location); if(Extractors.Quote.check(ctx)){ var d = Extractors.Quote.extract(ctx); } else { var d = Extractors.Link.extract(ctx); } maybeDeferred(d).addCallback(function(ps){ func(update({ page : title, pageUrl : content.url }, ps)); });
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(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
this.each(function(value, index) { 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 == undefined) // Ignore anything undefined res = "<" + token + ">"; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; });
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 }); else liberator.open("about:blank", { 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', self, function(){ if(!addElementClass(img, 'disabled')){ removeElementClass(img, 'disabled'); self.enables[poster.name] = poster; } else { delete self.enables[poster.name]; } }); if(res){ self.enables[poster.name] = poster; } else { addElementClass(img, 'disabled'); } df.appendChild(img); self.buttons.push(img); });
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', self, function(){ if(!addElementClass(img, 'disabled')){ removeElementClass(img, 'disabled'); self.enables[poster.name] = poster; } else { delete self.enables[poster.name]; } }); if(res){ self.enables[poster.name] = poster; } else { addElementClass(img, 'disabled'); } df.appendChild(img); self.buttons.push(img); });
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); } } func({}); }).addErrback(function(e){
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); } } func({}); }).addErrback(function(e){
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 }); else liberator.open("about:blank", { 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 }); else liberator.open("about:blank", { 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 the last tab tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, {
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.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } },
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]; commandline.echo(message.message, message.highlight, commandline.FORCE_SINGLELINE); } else if (commandline._messageHistory.length > 1) { XML.ignoreWhitespace = false; commandline.commandOutput( template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));; } },
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==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
" ");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(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
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==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
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.Quote.check(ctx)){ var d = Extractors.Quote.extract(ctx); } else { var d = Extractors.Link.extract(ctx); } maybeDeferred(d).addCallback(function(ps){ func(update({ page : title, pageUrl : content.url }, ps)); });
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(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
this.each(function(value, index) { 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 == undefined) // Ignore anything undefined res = "<" + token + ">"; if (quote && typeof res != "number") return Commands.quoteArg['"'](res); return res; });
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") onComplete(); }.createDelegate(this), easing); } }.createDelegate(this), 0);
} : 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(this, function(response) { start(); clearTimeout(checkstop); equals(response.get('status'), 0, "Status code should be zero"); equals(response.get('timedOut'), YES, "Should have timedOut property set to YES"); // timeout did fire...just resume... return YES; }); SC.RunLoop.begin(); timeoutRequest.send(); SC.RunLoop.end(); stop() ; // stops the test runner // in case nothing works checkstop = setTimeout(function() { ok(false, 'timeout did not fire at all'); window.start(); }, 500);});
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', image: self.cutBase64(file.binary), fotosize: Math.max(file.height, file.width), folder : '' } }); });
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.map(commandline._messageHistory.messages, function (message)
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==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
" ");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(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
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==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
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); },