rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
[function (context, obj, args) { context.quote[2] = ""; completion.file(context, true); }]);
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
memoize(this._exMap, name, function () Command.apply(null, args));
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
memoize(this._exMap, name, function () Command.apply(null, args));
.map(function (line) line.match(/([^=]+)=(.*)/).slice(1));
.split("\n").filter(function (line) line.indexOf("=") > 0)
.map(function (line) line.match(/([^=]+)=(.*)/).slice(1));
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){ alert(chrome.i18n.getMessage('error_noPoster', ps.type.capitalize())); } else { TBRL.Service.post(ps, posters); } } func({}); }).addErrback(function(e){
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Popup.open(tab, ps); } else { var posters = Models.getDefaults(ps); if(!posters.length){ alert(chrome.i18n.getMessage('error_noPoster', ps.type.capitalize())); } else { TBRL.Service.post(ps, posters); } } func({}); }).addErrback(function(e){
let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen")) activate = !activate; for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate);
dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang });
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen")) activate = !activate; for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate); }, {
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config);
callLater(0.5, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) {
Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) {
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
}, this);
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
commandline.runSilently(function () dactyl.execute(args[0], null, true));
function (args) { commandline.runSilently(function () dactyl.execute(args[0], null, true)); }, {
commandline.runSilently(function () dactyl.execute(args[0], null, true));
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
maybeDeferred(d).addCallback(function(ps){
(content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var ctx = update({ document :document, window : window, title : title, selection : window.getSelection().toString(), target : TBRL.target || 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){
maybeDeferred(d).addCallback(function(ps){ func(update({ page : title, pageUrl : content.url }, ps)); });
});
maybeDeferred(d).addCallback(function(ps){ func(update({ page : title, pageUrl : content.url }, ps)); });
selection : window.getSelection(),
selection : createFlavoredString(window.getSelection()),
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 ctx = update({ document :document, window : window, title : title, selection : window.getSelection(), target : TBRL.target || 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)); }); }); }});
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
function (args) { dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters"); let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1]; dactyl.assert(win, "Window " + winIndex + " does not exist"); dactyl.assert(win != window, "Can't reattach to the same window"); let browser = win.getBrowser(); let dummy = browser.addTab("about:blank"); browser.stop(); browser.docShell; let last = browser.mTabs.length - 1; browser.moveTabTo(dummy, Math.constrain(tabIndex || last, 0, last)); browser.selectedTab = dummy; browser.swapBrowsersAndCloseOther(dummy, config.tabbrowser.mCurrentTab); }, {
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; commands.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; commands.execute(command); } finally { io.readHeredoc = readHeredoc; } });
function (count) { editor.executeCommand("cmd_undo", count); editor.unselectText(); },
function () { editor.expandAbbreviation(modes.INSERT); });
function (count) { editor.executeCommand("cmd_undo", count); editor.unselectText(); },
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
this.registerCallback("change", modes.PROMPT, function (str) { if (self._input.complete) self._autocompleteTimer.tell(false); if (self._input.change) self._input.change.call(commandline, str); });
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
this.__defineGetter__(name, function () this._optionMap[name].values);
function (resp) { if (resp == "yes") for (let pref in values(options.allPrefs())) options.resetPref(pref); },
this.__defineGetter__(name, function () this._optionMap[name].values);
if ($(this).children().length == 1) { $(upOne).prepend('<span class="errorlist">Choice sets must contain two or more items before they will appear to customers.</span>');
if ($(this).children("li").not(".empty").length == 1) { if (!$(this).find("span.errorlist").length) { $(upOne).prepend('<span class="errorlist">Choice sets must contain two or more items before they will appear to customers.</span>'); }
$('ul.item-container').bind('changeLength', function () { upOne = $(this).parent(); if ($(this).children().length == 1) { $(upOne).prepend('<span class="errorlist">Choice sets must contain two or more items before they will appear to customers.</span>'); } else { $(upOne).removeClass("warning"); } });
$(upOne).removeClass("warning");
$(upOne).find("span.errorlist").remove();
$('ul.item-container').bind('changeLength', function () { upOne = $(this).parent(); if ($(this).children().length == 1) { $(upOne).prepend('<span class="errorlist">Choice sets must contain two or more items before they will appear to customers.</span>'); } else { $(upOne).removeClass("warning"); } });
context.generate = function () util.chromePackages.map(function (p) [p, match[1] + p + "/"]);
context.generate = function () util.chromePackages.map(function (p) [p, match[2] + p + "/"]);
completion.addUrlCompleter("f", "Local files", function (context, full) { let match = util.regexp(<![CDATA[ ^ ( ((chrome|resource):\/\/) [^\/]* ) (\/[^\/]*)? $ ]]>).exec(context.filter); if (match) { if (!match[4]) { context.key = match[2]; context.advance(match[2].length); context.generate = function () util.chromePackages.map(function (p) [p, match[1] + p + "/"]); } else if (match[3] === "chrome") { context.key = match[1]; context.advance(match[1].length + 1); context.generate = function () iter({ content: "Chrome content", locale: "Locale-specific content", skin: "Theme-specific content" }); }
text: !full ? "leafName" : function (f) dir + f.leafName,
let cmds = commands._exCommands.filter(function (c) c.user && (!cmd || c.name.match("^" + cmd)));
text: !full ? "leafName" : function (f) dir + f.leafName,
$("upload_to_db").observe("click", function(ev) { ($$(".action_button")).each(function(el) { el.disabled = true; }); ev.element().update("Uploading to database...").insert(new Element("img", {src: "/emu/emuDCS/FEDApps/images/ajax-loader.gif", id: "spinner"})); var url = URL + '/UploadToDB'; new Ajax.Request(url, { method: "get", onSuccess: finalUploadCheck, onFailure: reportError });
$("write_xml").observe("click", function(ev) { window.location.href = URL + '/WriteXML';
$("upload_to_db").observe("click", function(ev) { ($$(".action_button")).each(function(el) { el.disabled = true; }); ev.element().update("Uploading to database...").insert(new Element("img", {src: "/emu/emuDCS/FEDApps/images/ajax-loader.gif", id: "spinner"})); var url = URL + '/UploadToDB'; new Ajax.Request(url, { method: "get", onSuccess: finalUploadCheck, onFailure: reportError }); });
this.each(function(value) { if (value == object) { found = true; throw $break; } });
elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
this.each(function(value) { if (value == object) { found = true; throw $break; } });
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
context.filters.push(function ({ item }) item != window);
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);
function (dir) !Array.some(opts, function (o) this.opts[o] && this.opts[o][1] == dir, this),
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);
this.registerCallback("change", modes.PROMPT, function (str) { if (self._input.complete)
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history")
this.registerCallback("change", modes.PROMPT, function (str) { if (self._input.complete) self._autocompleteTimer.tell(false); if (self._input.change) self._input.change.call(commandline, str); });
if (self._input.change) self._input.change.call(commandline, str);
this.registerCallback("change", modes.PROMPT, function (str) { if (self._input.complete) self._autocompleteTimer.tell(false); if (self._input.change) self._input.change.call(commandline, str); });
child = SC.View.create({ hasAcceleratedLayer: YES, useStaticLayout: YES, render: function(context) { context.push('<div style="padding: 10px"></div>'); }
child = SC.View.create({ hasAcceleratedLayer: YES, useStaticLayout: YES, render: function(context) { context.push('<div style="padding: 10px"></div>'); } }); parent.createLayer(); var layer = parent.get('layer'); document.body.appendChild(layer); var layout = { top: 0, left: 0, width: 'auto', height: 'auto' }; var expectedTransform = 'translateX(0px) translateY(0px)'; if (SC.platform.supportsCSS3DTransforms) expectedTransform += ' translateZ(0px)'; var no_f = { x: 0, y: 0, width: 0, height: 0, transform: expectedTransform }; var with_f = { x: 0, y: 0, width: 20, height: 20, transform: expectedTransform }; var s = { top: 0, left: 0, width: 'auto', height: 'auto', transform: expectedTransform }; performLayoutTest(layout, no_f, s, with_f, s); layer.parentNode.removeChild(layer);
test("layout {top, left, width: auto, height: auto}", function() { child = SC.View.create({ hasAcceleratedLayer: YES, // Force this useStaticLayout: YES, render: function(context) { // needed for auto context.push('<div style="padding: 10px"></div>'); } }); // parent MUST have a layer. parent.createLayer(); var layer = parent.get('layer'); document.body.appendChild(layer); var layout = { top: 0, left: 0, width: 'auto', height: 'auto' }; var no_f = { x: 0, y: 0, width: 0, height: 0, "-webkit-transform": 'translateZ(0px)' }; var with_f = { x: 0, y: 0, width: 20, height: 20, "-webkit-transform": 'translateZ(0px)' }; var s = { top: 0, left: 0, width: 'auto', height: 'auto', "-webkit-transform": 'translateZ(0px)' }; performLayoutTest(layout, no_f, s, with_f, s); layer.parentNode.removeChild(layer);});
parent.createLayer(); var layer = parent.get('layer'); document.body.appendChild(layer); var layout = { top: 0, left: 0, width: 'auto', height: 'auto' }; var no_f = { x: 0, y: 0, width: 0, height: 0, "-webkit-transform": 'translateZ(0px)' }; var with_f = { x: 0, y: 0, width: 20, height: 20, "-webkit-transform": 'translateZ(0px)' }; var s = { top: 0, left: 0, width: 'auto', height: 'auto', "-webkit-transform": 'translateZ(0px)' }; performLayoutTest(layout, no_f, s, with_f, s); layer.parentNode.removeChild(layer); });
test("layout {top, left, width: auto, height: auto}", function() { child = SC.View.create({ hasAcceleratedLayer: YES, // Force this useStaticLayout: YES, render: function(context) { // needed for auto context.push('<div style="padding: 10px"></div>'); } }); // parent MUST have a layer. parent.createLayer(); var layer = parent.get('layer'); document.body.appendChild(layer); var layout = { top: 0, left: 0, width: 'auto', height: 'auto' }; var no_f = { x: 0, y: 0, width: 0, height: 0, "-webkit-transform": 'translateZ(0px)' }; var with_f = { x: 0, y: 0, width: 20, height: 20, "-webkit-transform": 'translateZ(0px)' }; var s = { top: 0, left: 0, width: 'auto', height: 'auto', "-webkit-transform": 'translateZ(0px)' }; performLayoutTest(layout, no_f, s, with_f, s); layer.parentNode.removeChild(layer);});
$("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
$("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null );
$("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); });
selection : createFlavoredString(window.getSelection()),
selection : (!!sel.raw)? sel : null,
(content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var ctx = update({ document :document, window : window, title : title, selection : createFlavoredString(window.getSelection()), target : TBRL.target || 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)); }); });
connect(tags, 'oninput', this, function(ev){ var self = this; this.refreshCheck(); setTimeout(function(){ self.onInput(ev) }, 0); });
setTimeout(function(){ self.onInput(ev) }, 0);
connect(tags, 'oninput', this, function(ev){ // ずらさないとselectionStartの値が正確でない var self = this; this.refreshCheck(); setTimeout(function(){ self.onInput(ev) }, 0); });
editor.executeCommand("cmd_redo", count);
editor.executeCommand("cmd_undo", count);
function (count) { editor.executeCommand("cmd_redo", count); dactyl.mode = modes.TEXTAREA; },
let sorted = this._exCommands.sort(function (a, b) a.serialGroup - b.serialGroup || a.name > b.name);
dactyl.assert(!names.some(function (name) name in this._exMap, this),
let sorted = this._exCommands.sort(function (a, b) a.serialGroup - b.serialGroup || a.name > b.name);
defaults = array(this.options).map(function (opt) [opt.names[0], opt.default]).toObject();
dactyl.assert(!names.some(function (name) name in this._exMap, this),
defaults = array(this.options).map(function (opt) [opt.names[0], opt.default]).toObject();
}).addErrback(function(e){
callLater(0.5, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
}).addErrback(function(e){ });
function (args) { dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters");
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab");
function (args) { dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters"); let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1]; dactyl.assert(win, "Window " + winIndex + " does not exist"); dactyl.assert(win != window, "Can't reattach to the same window"); let browser = win.getBrowser(); let dummy = browser.addTab("about:blank"); browser.stop(); // XXX: the implementation of DnD in tabbrowser.xml suggests // that we may not be guaranteed of having a docshell here // without this reference? browser.docShell; let last = browser.mTabs.length - 1; browser.moveTabTo(dummy, Math.constrain(tabIndex || last, 0, last)); browser.selectedTab = dummy; // required browser.swapBrowsersAndCloseOther(dummy, config.tabbrowser.mCurrentTab); }, {
let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1]; dactyl.assert(win, "Window " + winIndex + " does not exist"); dactyl.assert(win != window, "Can't reattach to the same window"); let browser = win.getBrowser(); let dummy = browser.addTab("about:blank"); browser.stop(); browser.docShell; let last = browser.mTabs.length - 1; browser.moveTabTo(dummy, Math.constrain(tabIndex || last, 0, last)); browser.selectedTab = dummy; browser.swapBrowsersAndCloseOther(dummy, config.tabbrowser.mCurrentTab); }, {
tabs.detachTab(null); },
function (args) { dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters"); let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1]; dactyl.assert(win, "Window " + winIndex + " does not exist"); dactyl.assert(win != window, "Can't reattach to the same window"); let browser = win.getBrowser(); let dummy = browser.addTab("about:blank"); browser.stop(); // XXX: the implementation of DnD in tabbrowser.xml suggests // that we may not be guaranteed of having a docshell here // without this reference? browser.docShell; let last = browser.mTabs.length - 1; browser.moveTabTo(dummy, Math.constrain(tabIndex || last, 0, last)); browser.selectedTab = dummy; // required browser.swapBrowsersAndCloseOther(dummy, config.tabbrowser.mCurrentTab); }, {
callLater(0.5, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){
callLater(0.5, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); });
});
callLater(0.5, function(){ chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); }); });
$('ul.item-container').bind('changeLength', function () {
$('ul.group-wrap ul.item-container').live('changeLength', function () {
$('ul.item-container').bind('changeLength', function () { upOne = $(this).parent(); if ($(this).children("li").not(".empty").length == 1) { if (!$(this).find("span.errorlist").length) { $(upOne).prepend('<span class="errorlist">Choice sets must contain two or more items before they will appear to customers.</span>'); } } else { $(upOne).find("span.errorlist").remove(); } });
Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this);
widgets: Class.memoize(function () CommandWidgets()),
Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this);
function () { events.onEscape(); });
commandline.runSilently(function () dactyl.execute(args[0], null, true));
function () { events.onEscape(); });
i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
return self.tags = items(tags).map(function(pair){ return { name : pair[0], frequency : pair[1].count } });
return this.getToken().addCallback(function(set){ return DeferredHash({ tags: self.getUserTags(set['name']), data: self.getURLData(url) }); }).addCallback(function(resses){
return self.tags = items(tags).map(function(pair){ return { name : pair[0], frequency : pair[1].count } });
selection : window.getSelection(),
selection : createFlavoredString(window.getSelection()),
(content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var ctx = update({ document :document, window : window, title : title, selection : window.getSelection(), target : TBRL.target || 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)); }); });
context.filters.push(function ({ item }) item != window);
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
context.filters.push(function ({ item }) item != window);
editor.executeCommand("cmd_redo", count);
editor.executeCommand("cmd_undo", count);
function (count) { editor.executeCommand("cmd_redo", count); editor.unselectText(); },
this.__defineSetter__(name, function (value) { this._optionMap[name].values = value; });
].filter(function ([k]) k != null && k.length < 200);
this.__defineSetter__(name, function (value) { this._optionMap[name].values = value; });
view.adjust({ height: '', bottom: 0 });
view.adjust({ height: null, bottom: 0 });
test("doesn't use acceleration when not appropriate", function(){ SC.RunLoop.begin(); view.adjust({ height: '', bottom: 0 }); view.animate('top', 100, 1); SC.RunLoop.end(); equals(transitionFor(view), 'top 1s linear', 'transition is not on transform'); });
text: !full ? "leafName" : function (f) dir + f.leafName,
function () { commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); }); },
text: !full ? "leafName" : function (f) dir + f.leafName,
($$(".action_button")).each(function(el) { el.disabled = true; });
$("upload_to_db").observe("click", function(ev) { ($$(".action_button")).each(function(el) { el.disabled = true; }); ev.element().update("Uploading to database...").insert(new Element("img", {src: "/emu/emuDCS/FEDApps/images/ajax-loader.gif", id: "spinner"})); var url = URL + '/UploadToDB'; new Ajax.Request(url, { method: "get", onSuccess: finalUploadCheck, onFailure: reportError }); });
($$(".action_button")).each(function(el) { el.disabled = true; });
context.filters.push(function ({ item }) item != window);
function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
context.filters.push(function ({ item }) item != window);
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
function (o) this.opts[o] && this.opts[o][1] == dir, this),
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
function () { commandline.open(":", "queue ", modes.EX); });
function () { commandline.open("", "queue ", modes.EX); });
function () { commandline.open(":", "queue ", modes.EX); });
this.registerCallback("complete", modes.PROMPT, function (context) {
this.registerCallback("change", modes.PROMPT, function (str) {
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); });
context.fork("input", 0, commandline, self._input.complete);
self._autocompleteTimer.tell(false); if (self._input.change) self._input.change.call(commandline, str);
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); });
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
let arg = args[0]; liberator.assert(!arg || arg[0] == ">" && !liberator.has("Win32"), "E488: Trailing characters"); options.withContext(function () { if (arg) { options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); liberator.echomsg("Printing to file: " + arg.substr(1)); } else liberator.echomsg("Sending to printer..."); options.setPref("print.always_print_silent", args.bang); options.setPref("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); if (arg) liberator.echomsg("Printed: " + arg.substr(1)); else liberator.echomsg("Print job sent.");
liberator.open(tabs.localStore.focusedFrame.document.documentURI);
function (args) { let arg = args[0]; // FIXME: arg handling is a bit of a mess, check for filename liberator.assert(!arg || arg[0] == ">" && !liberator.has("Win32"), "E488: Trailing characters"); options.withContext(function () { if (arg) { options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); liberator.echomsg("Printing to file: " + arg.substr(1)); } else liberator.echomsg("Sending to printer..."); options.setPref("print.always_print_silent", args.bang); options.setPref("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); }); if (arg) liberator.echomsg("Printed: " + arg.substr(1)); else liberator.echomsg("Print job sent."); },
this.timeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
I: Mode("Show image in a new tab", function (elem) dactyl.open(elem.src, dactyl.NEW_TAB), images)
this.timeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
var layout = { top: 0.1, left: 0.1, width: 0.5, height: 0.5 }; var s = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ; var no_f = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ; var with_f = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ;
var layout = { top: 0.1, left: 0.1, width: 0.5, height: 0.5 }; var expectedTransform = 'translateX(0px) translateY(0px)'; if (SC.platform.supportsCSS3DTransforms) expectedTransform += ' translateZ(0px)'; var s = { top: '10%', left: '10%', width: '50%', height: '50%', transform: expectedTransform } ; var no_f = { top: '10%', left: '10%', width: '50%', height: '50%', transform: expectedTransform } ; var with_f = { top: '10%', left: '10%', width: '50%', height: '50%', transform: expectedTransform } ;
test("layout w/ percentage {top, left, width, height}", function() { var layout = { top: 0.1, left: 0.1, width: 0.5, height: 0.5 }; var s = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ; var no_f = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ; var with_f = { top: '10%', left: '10%', width: '50%', height: '50%', "-webkit-transform": 'translateZ(0px)' } ; performLayoutTest(layout, no_f, s, with_f, s) ;}) ;
div.keypress(function (event) { return event.keyCode != 13; });
$("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); });
div.keypress(function (event) { return event.keyCode != 13; });
if (this._validHints.some(function (e) e.getAttribute("href") != firstHref))
setTimeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
if (this._validHints.some(function (e) e.getAttribute("href") != firstHref))
let arg = args.literalArg;
let arg = args[0] || "";
function (args) { let arg = args.literalArg; let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); dactyl.assert(!arg || titles.indexOf(arg) >= 0, "E475: Invalid argument: " + arg); if (options["usermode"]) options["usermode"] = false; window.stylesheetSwitchAll(window.content, arg); },
setTimeout(function(){ self.onInput(ev) }, 0);
connect(tags, 'onkeydown', this, function(ev){ var key = ev.key(); if(key.string === "KEY_BACKSPACE" || key.string === "KEY_DELETE") this.deleting = true; if(key.string === "KEY_TAB" && !this.popup.visible) return; if(this.sleeping){ ev.preventDefault(); return; } if(this.delimiter.charCodeAt() === key.code){ this.deleting = false; } switch(key.string){ case "KEY_TAB": case "KEY_ARROW_DOWN": ev.preventDefault(); if(!this.popup.visible) this.complete(); if(this.popup.rowCount === 1){ this.popup.enter(true); } else { this.popup.moveCursor(1); } break; case "KEY_ARROW_UP": ev.preventDefault(); this.popup.moveCursor(-1); break; case "KEY_ENTER": if(this.popup.visible){ this.popup.enter(true); } break; } });
setTimeout(function(){ self.onInput(ev) }, 0);
function () { editor.executeCommand("cmd_deleteToEndOfLine"); });
function (count) { editor.executeCommand("cmd_redo", count); dactyl.mode = modes.TEXTAREA; },
function () { editor.executeCommand("cmd_deleteToEndOfLine"); });
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
ex.__defineGetter__(name, function () this._run(name));
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
}).addCallback(function(resses){ if(!resses['tags'][0] || !resses['data'][0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } var data = resses['data'][1]; return { duplicated : !!data['bookmarked_data'], recommended : data['recommend_tags'], tags : resses['tags'][1] } });
suggestions : this.getCurrentUser().addCallback(function(user){ return request('http: queryString : { noui : 1, url : url } }); }).addCallback(function(res){
}).addCallback(function(resses){ if(!resses['tags'][0] || !resses['data'][0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } var data = resses['data'][1]; return { duplicated : !!data['bookmarked_data'], recommended : data['recommend_tags'], tags : resses['tags'][1] } });
io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({ setFrom: this.sourcing.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } });
memoize(this._exMap, name, function () Command.apply(null, args));
io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({ setFrom: this.sourcing.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } });
return request(url, opt).addCallbacks(function(res){ func({ success: true, content: res
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data);
return request(url, opt).addCallbacks(function(res){ func({ success: true, content: res }); }, function(res){
}, function(res){
return request(url, opt).addCallbacks(function(res){ func({ success: true, content: res }); }, function(res){
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen")) activate = !activate; for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate); }, {
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
function () { commandline.resetCompletions(); return editor.expandAbbreviation(modes.COMMAND_LINE); },
function () { events.onEscape(); });
function () { commandline.resetCompletions(); return editor.expandAbbreviation(modes.COMMAND_LINE); },
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);
}).addCallback(function(res){ try{ var json = JSON.parse(res.responseText); } catch(e) {
}).addCallback(function(resses){ if(!resses['tags'][0] || !resses['data'][0]){
}).addCallback(function(res){ try{ var json = JSON.parse(res.responseText); } catch(e) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return json; });
return json;
var data = resses['data'][1]; return { duplicated : !!data['bookmarked_data'], recommended : data['recommend_tags'], tags : resses['tags'][1] }
}).addCallback(function(res){ try{ var json = JSON.parse(res.responseText); } catch(e) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return json; });
function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
context.filters.push(function ({ item }) item != window);
function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
return this.eachSlice(number, function(slice) { while(slice.length < number) slice.push(fillWith); return slice; });
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
return this.eachSlice(number, function(slice) { while(slice.length < number) slice.push(fillWith); return slice; });
function () { editor.executeCommand("cmd_deleteToEndOfLine"); });
function (count) { editor.executeCommand("cmd_redo", count); editor.unselectText(); },
function () { editor.executeCommand("cmd_deleteToEndOfLine"); });
context.quote = ["", util.identity, ""];
context.fork("default", 0, this, function (context) { context.title = ["Extra Completions"]; context.completions = [ [option.value, "Current value"], [option.defaultValue, "Default value"] ].filter(function (f) f[0] !== "" && String(f[0]).length < 200); });
].filter(function (f) f[0] != "" && f[0].length < 200);
].filter(function (f) f[0] !== "" && String(f[0]).length < 200);
context.fork("default", 0, this, function (context) { context.title = ["Extra Completions"]; context.completions = [ [option.value, "Current value"], [option.defaultValue, "Default value"] ].filter(function (f) f[0] != "" && f[0].length < 200); });
this._options = this._options.filter(function (o) o != opt);
context.filters.push(function ({ item }) item.type == "boolean" || prefix == "inv" && isArray(item.values));
this._options = this._options.filter(function (o) o != opt);
function (args) { let name = args[0]; if (commands.get(name)) commands.removeUserCommand(name); else dactyl.echoerr("E184: No such user-defined command: " + name); }, {
commands.getUserCommands().forEach(function (cmd) { commands.removeUserCommand(cmd.name); });
function (args) { let name = args[0]; if (commands.get(name)) commands.removeUserCommand(name); else dactyl.echoerr("E184: No such user-defined command: " + name); }, {
($$(".action_button")).each(function(el) { el.disabled = false; });
($$(".action_button")).each(function(el) { el.disabled = true; });
($$(".action_button")).each(function(el) { el.disabled = false; });
if (args.length) args = args[0]; else args = args.count || 0;
for (let i in Iterator(tabs.closedTabs)) window.undoCloseTab(0);
function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
},
function (args) { if (args.length) args = args[0]; else args = args.count || 0; let m = /^(\d+)(:|$)/.exec(args || '1'); if (m) window.undoCloseTab(Number(m[1]) - 1); else if (args) { for (let [i, item] in Iterator(tabs.closedTabs)) if (item.state.entries[item.state.index - 1].url == args) { window.undoCloseTab(i); return; } dactyl.echoerr("Exxx: No matching closed tab"); } }, {
function () { dactyl.help(); });
let class_ = dir.map(function (dir) "html|html > xul|scrollbar[orient=" + dir + "]");
function () { dactyl.help(); });
$$(".ddu_checkbox").each(function(el2) { if (el2.checked) dduChecked++;
($$(".ddu_firmware")).each(function(el) { el.observe("click", function(ev) { window.location.href = URL + "/DDUFirmwareManager?crate=" + ev.element().readAttribute("crate"); });
$$(".ddu_checkbox").each(function(el2) { if (el2.checked) dduChecked++; });
function () { commandline.open(":", "filter ", modes.EX); });
function () { commandline.open("", "filter ", modes.EX); });
function () { commandline.open(":", "filter ", modes.EX); });
this.withSavedValues(["_silent"], function () { this._silent = true; func.call(self); });
this._timers.forEach(function (timer) timer.reset());
this.withSavedValues(["_silent"], function () { this._silent = true; func.call(self); });
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); });
["commandbar", "statusbar"].forEach(function (nodeSet) { Array.forEach(this.widgets[nodeSet].commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); }, this);
function () { dactyl.help(); });
[v for ([k, v] in Iterator(groups))].every(function (g) !g.validator || g.validator(val))
function () { dactyl.help(); });
options.withContext(function () {
function (args) { let arg = args[0]; liberator.assert(!arg || arg[0] == ">" && !liberator.has("Win32"), "E488: Trailing characters"); options.withContext(function () {
options.withContext(function () { if (arg) { options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); liberator.echomsg("Printing to file: " + arg.substr(1)); } else liberator.echomsg("Sending to printer..."); options.setPref("print.always_print_silent", args.bang); options.setPref("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); });
if (arg) liberator.echomsg("Printed: " + arg.substr(1)); else liberator.echomsg("Print job sent."); },
options.withContext(function () { if (arg) { options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); liberator.echomsg("Printing to file: " + arg.substr(1)); } else liberator.echomsg("Sending to printer..."); options.setPref("print.always_print_silent", args.bang); options.setPref("print.show_print_progress", !args.bang); config.browser.contentWindow.print(); });
setTimeout(function() { var content; if (navigator.appName == 'Microsoft Internet Explorer') content = div.html().replace(/<BR.*?class.*?atd_remove_me.*?>/gi, "\n"); else content = div.html(); var temp = jQuery('<div></div>'); temp.html(content); AtD.core.removeWords(temp); hidden.val(temp.html().replace(/\&lt\;/g, '<').replace(/\&gt\;/, '>').replace(/\&amp;/g, '&')); inProgress = false; }, 1500);
div.keypress(function (event) { return event.keyCode != 13; });
setTimeout(function() { var content; if (navigator.appName == 'Microsoft Internet Explorer') content = div.html().replace(/<BR.*?class.*?atd_remove_me.*?>/gi, "\n"); else content = div.html(); /* strip the AtD markup */ var temp = jQuery('<div></div>'); temp.html(content); AtD.core.removeWords(temp); hidden.val(temp.html().replace(/\&lt\;/g, '<').replace(/\&gt\;/, '>').replace(/\&amp;/g, '&')); inProgress = false; }, 1500);
memo.push({ name : tag, frequency : tags[tag] });
if(tag){ memo.push({ name : tag, frequency : tags[tag] }); }
return this.getCurrentUser(user).addCallback(function(user){ // 同期でエラーが起きないようにする return succeed().addCallback(function(){ return request('http://feeds.delicious.com/v2/json/tags/' + user); }).addCallback(function(res){ var tags = JSON.parse(res.responseText); return Object.keys(tags).reduce(function(memo, tag){ memo.push({ name : tag, frequency : tags[tag] }); return memo; }, []); }); });
this.setTimeout(function () { if (modes.extended & modes.HINTS) modes.reset(); this._hintMode.action(elem, elem.href || "", this._extendedhintCount); }, timeout);
if (this._validHints.some(function (e) e.getAttribute("href") != firstHref))
this.setTimeout(function () { if (modes.extended & modes.HINTS) modes.reset(); this._hintMode.action(elem, elem.href || "", this._extendedhintCount); }, timeout);
connect(tags, 'onkeydown', this, function(ev){ var key = ev.key(); if(key.string === "KEY_BACKSPACE" || key.string === "KEY_DELETE") this.deleting = true; if(key.string === "KEY_TAB" && !this.popup.visible) return; if(this.sleeping){ ev.preventDefault(); return; } if(this.delimiter.charCodeAt() === key.code){ this.deleting = false; } switch(key.string){ case "KEY_TAB": case "KEY_ARROW_DOWN": ev.preventDefault(); if(!this.popup.visible) this.complete(); if(this.popup.rowCount === 1){ this.popup.enter(true); } else { this.popup.moveCursor(1); } break; case "KEY_ARROW_UP": ev.preventDefault(); this.popup.moveCursor(-1); break; case "KEY_ENTER": if(this.popup.visible){ this.popup.enter(true); } break; }
connect(tags, 'onblur', this, function(ev){ setTimeout(function(){ self.popup.hidePopup(); }, 200);
connect(tags, 'onkeydown', this, function(ev){ var key = ev.key(); if(key.string === "KEY_BACKSPACE" || key.string === "KEY_DELETE") this.deleting = true; if(key.string === "KEY_TAB" && !this.popup.visible) return; if(this.sleeping){ ev.preventDefault(); return; } if(this.delimiter.charCodeAt() === key.code){ this.deleting = false; } switch(key.string){ case "KEY_TAB": case "KEY_ARROW_DOWN": ev.preventDefault(); if(!this.popup.visible) this.complete(); if(this.popup.rowCount === 1){ this.popup.enter(true); } else { this.popup.moveCursor(1); } break; case "KEY_ARROW_UP": ev.preventDefault(); this.popup.moveCursor(-1); break; case "KEY_ENTER": if(this.popup.visible){ this.popup.enter(true); } break; } });
function (count) { editor.executeCommand("cmd_endLine", 1); modes.set(modes.INSERT, modes.TEXTAREA); events.feedkeys("<Return>"); });
function () { editor.executeCommand("cmd_deleteToEndOfLine"); });
function (count) { editor.executeCommand("cmd_endLine", 1); modes.set(modes.INSERT, modes.TEXTAREA); events.feedkeys("<Return>"); });