rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
}
};
return function() { var i; var nes = new JSNES({ emulateSound: true, ui: JSNES.DummyUI }); nes.loadRom(croomRom); nes.setLimitFrames(false); nes.isRunning = true; for (i=0; i<5; i++) { nes.frame(); } // Hit e...
if(separatorPostion > 0 && separatorPostion<len && idx >= len-separatorPostion) {
if(separatorPosition > 0 && separatorPosition<len && idx >= len-separatorPosition) {
objects.forEach(function(object) { if (object) { //Get the name value. If value key is not specified convert obj //to string name = nameKey ? (object.get ? object.get(nameKey) : object[nameKey]) : object.toString() ; // localize name if specified. name = shouldLocalize? name.loc()...
if (separatorPostion && idx === (len-separatorPostion)) {
if (separatorPosition && idx === (len-separatorPosition)) {
objects.forEach(function(object) { if (object) { //Get the name value. If value key is not specified convert obj //to string name = nameKey ? (object.get ? object.get(nameKey) : object[nameKey]) : object.toString() ; // localize name if specified. name = shouldLocalize? name.loc()...
matches = array.nth(tabs.allTabs, function (t) t.linkedBrowser.lastURI.spec === buffer, 0);
matches = array.nth(tabs.allTabs, function (t) (t.linkedBrowser.lastURI || {}).spec === buffer, 0);
matches = array.nth(tabs.allTabs, function (t) t.linkedBrowser.lastURI.spec === buffer, 0);
util.timeout(function () { doc.body.removeChild(indicator); }, 500);
commandline.input("Upload file: ", function (path) { let file = io.File(path); dactyl.assert(file.exists()); elem.value = file.path; }, {
util.timeout(function () { doc.body.removeChild(indicator); }, 500);
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab");
function (args) { let tab = tabs.getTab();
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); },
tabs.detachTab(null); },
let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate); }, {
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); },
dactyl.execute(command);
commands.execute(command);
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; dactyl.execute(command); } finally { ...
util.timeout(function () { doc.body.removeChild(indicator); }, 500);
.filter(function (frame) !frame.frameElement || let (rect = frame.frameElement.getBoundingClientRect()) rect.width && rect.height);
util.timeout(function () { doc.body.removeChild(indicator); }, 500);
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.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList;
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; commands.execute(command); } finally { ...
completion.file(context, true, dir + context.filter);
completion.file(context, args, true, dir + context.filter);
context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) f.path.substr(dir.length); ...
context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) f.path.substr(dir.length); });
context.filters.push(function ({ item }) item.isDirectory() || !wig.getKey(this.name));
context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) f.path.substr(dir.length); ...
help: function (map) let (char = array.compact(map.modes.map(function (m) m.char))[0])
function (context, obj, args) { let mode = args[0]; return array.flatten([ [[name, map.description] for ([i, name] in Iterator(map.names))] for ([i, map] in Iterator(mappings._user[mode].concat(mappings._main[mode]))) ]); }
help: function (map) let (char = array.compact(map.modes.map(function (m) m.char))[0])
$("#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(false);
$("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); });
ps.tags.forEach(function(tag){ this.injectCandidates(tag, true, false); }, this);
.addCallback(function(res){ self.arrangeSuggestions(res); self.setSuggestions(res); self.setTags(res.tags); removeElementClass(self.suggestionIcon, 'loading'); addElementClass(self.suggestionIcon, 'loaded'); connect(self.suggestionIcon, 'onclick', self, 'toggleSuggestions'); if(self.suggestionShownDefault){ self.toggl...
ps.tags.forEach(function(tag){ this.injectCandidates(tag, true, false); }, this);
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); });
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments);});
function () { editor.expandAbbreviation(modes.INSERT); document.commandDispatcher.advanceFocus(); });
function () { editor.expandAbbreviation(modes.INSERT); },
function () { editor.expandAbbreviation(modes.INSERT); document.commandDispatcher.advanceFocus(); });
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);
let type = ["-builtin", "-ex", "-javascript", "-keys"].reduce(function (a, b) args[b] ? b : a, default_);
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
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(...
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
commandline.open(":",
commandline.open("",
function () { let options = {}; let bmarks = bookmarks.get(buffer.URL).filter(function (bmark) bmark.url == buffer.URL); if (bmarks.length == 1) { let bmark = bmarks[0]; options["-title"] = bmark.title; if ...
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); });
logins.uniq().forEach(function(url){ chrome.tabs.create({ windowId: win.id, url: url, selected: false }); });
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments);});
context.filters.push(function (item) item.isdir);
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
context.filters.push(function (item) item.isdir);
dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang });
let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang);
function (args) { dactyl.open(args[0] || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, {
c = confirm('Are you sure you want to delete this item? This action cannot be undone.');
trgt = this; action = $(this).attr("rel"); selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent().parent(); sectionNamePlural = $(containingList).closest("div").find("h3")[0] .childNodes[0].textContent .replace(/\s+$/, '') .toLowerCase(); sectionNameSingular = sectionNamePlural.substring(0,...
$("a.delete").live("click", function () { c = confirm('Are you sure you want to delete this item? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { selector =...
trgt = this; action = $(this).attr("rel");
$("a.delete").live("click", function () { c = confirm('Are you sure you want to delete this item? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { selector =...
selector = '[rel="' + action + '"]';
$("a.delete").live("click", function () { c = confirm('Are you sure you want to delete this item? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { selector =...
containingList = $(selector).parent().parent().parent();
$("a.delete").live("click", function () { c = confirm('Are you sure you want to delete this item? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { selector =...
$(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>');
$(containingList).append('<li class="empty">No ' + sectionNamePlural + ' defined.</li>');
$("a.delete").live("click", function () { c = confirm('Are you sure you want to delete this item? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { selector =...
this.registerCallback("change", modes.PROMPT, function (str) {
this.registerCallback("complete", modes.PROMPT, function (context) {
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); });
self._autocompleteTimer.tell(false); if (self._input.change) self._input.change.call(commandline, str);
context.fork("input", 0, commandline, self._input.complete);
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); });
function () { commandline._messageHistory.clear(); },
template.map(commandline._messageHistory.messages, function (message) <div highlight={message.highlight + " Message"}>{message.message}</div>));;
function () { commandline._messageHistory.clear(); },
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArr...
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val()...
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArr...
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().toString()...
connect(document, 'onDOMContentLoaded', null, function(ev){ d.callback(title_getter());
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, sele...
} });
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, sele...
}).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]; console.log('duplicated', !!data['bookmarked_data']); return { duplicated : !!data['bookmarked_data'], recommended : data['recommend_tag...
return Hatena.getToken().addErrback(function(e){ delete self['tags']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name));
}).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]; console.log('duplicated', !!data['bookmarked_data']); return { duplicated : !!data['bookmarke...
function (args) { let tab = tabs.getTab();
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab");
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.cou...
let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate); }, {
tabs.detachTab(null); },
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.cou...
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
function (node) ItemList(node.id));
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
this.each(function(value, index) { if (iterator.call(context, value, index)) { result = value; throw $break; } });
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(...
this.each(function(value, index) { if (iterator.call(context, value, index)) { result = value; throw $break; } });
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
util.timeout(function () { doc.body.removeChild(indicator); }, 500);
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
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);
this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex");
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); });
values(this._options.sort(function (a, b) String.localeCompare(a.name, b.name))),
this.__defineSetter__(name, function (value) { this._optionMap[name].values = value; });
values(this._options.sort(function (a, b) String.localeCompare(a.name, b.name))),
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
commandline.input("Upload file: ", function (path) { let file = io.File(path); liberator.assert(file.exists()); elem.value = file.path; }, {
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
let tab = tabs.getTab();
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters");
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.cou...
let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate;
let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1];
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.cou...
for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate);
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...
function (args) { let tab = tabs.getTab(); let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate; for (let i in util.range(0, Math.max(1, args.cou...
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; }
this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); });
completion.addUrlCompleter("f", "Local files", function (context, full) {
completion.addUrlCompleter("f", "Local files", function (context, args, full) {
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
completion.file(context, full);
completion.file(context, args, full);
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); },
function () { tabs.keepOnly(tabs.getTab()); },
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); },
return this.getToken().addCallback(function(data){ return request('http: method: 'POST', sendContent : { rks : data['rks'], 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, ' ') } }); });
tags : map(function(pair){ var tag = pair[0], info = pair[1]; return { name : tag, frequency : info.count } }, items(tags))
return this.getToken().addCallback(function(data){ return request('http://b.hatena.ne.jp/bookmarklet.edit', { //denyRedirection: true, method: 'POST', sendContent : { rks : data['rks'], url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCas...
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) f.path.substr(dir.length); });
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
document.commandDispatcher.advanceFocus();
services.focus.moveFocus(window, null, Ci.nsIFocusManager.MOVEFOCUS_FORWARD, Ci.nsIFocusManager.FLAG_BYKEY);
function () { editor.expandAbbreviation(modes.INSERT); document.commandDispatcher.advanceFocus(); });
var layout = { top: 10, left: 10, width: 50, height: 50 }; var s = { top: 0, left: 0, width: 50, height: 50, "-webkit-transform": 'translate3d(10px, 10px, 0)' } ; var no_f = { x: 0, y: 0, width: 50, height: 50, "-webkit-transform": 'translate3d(10px, 10px, 0)' } ; var with_f = { x: 0, y: 0, width: 50, height: 50, "-web...
performLayoutTest(layout, no_f, s, with_f, s) ; }) ;
test("layout {top, left, width, height}", function() { var layout = { top: 10, left: 10, width: 50, height: 50 }; var s = { top: 0, left: 0, width: 50, height: 50, "-webkit-transform": 'translate3d(10px, 10px, 0)' } ; var no_f = { x: 0, y: 0, width: 50, height: 50, "-webkit-transform": 'translate3d(10px, 10px, 0)' }...
$("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val );
$("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');
$("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val ); });
.addCallback(function(res){ self.arrangeSuggestions(res); self.setSuggestions(res); self.setTags(res.tags); removeElementClass(self.suggestionIcon, 'loading'); addElementClass(self.suggestionIcon, 'loaded'); connect(self.suggestionIcon, 'onclick', self, 'toggleSuggestions'); if(self.suggestionShownDefault){ self.toggl...
}).addErrback(function(e){ notify(Config['post']['tag_provider']+'\n'+e.message.indent(4)); var icon = $('loading_icon'); removeElementClass(icon, 'loading'); addElementClass(icon, 'loaded'); });
.addCallback(function(res){ self.arrangeSuggestions(res); self.setSuggestions(res); self.setTags(res.tags); removeElementClass(self.suggestionIcon, 'loading'); addElementClass(self.suggestionIcon, 'loaded'); connect(self.suggestionIcon, 'onclick', self, 'toggleSuggestions...
function () { editor.expandAbbreviation(modes.INSERT); });
function () { editor.expandAbbreviation(modes.INSERT); document.commandDispatcher.advanceFocus(); });
function () { editor.expandAbbreviation(modes.INSERT); });
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(...
}).addErrback(function(e){ });
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...
context.filters.push(function ({ item }) item.isDirectory() || !wig.getKey(this.name));
completion.addUrlCompleter("f", "Local files", function (context, full) { if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)) completion.file(context, full); });
context.filters.push(function ({ item }) item.isDirectory() || !wig.getKey(this.name));
dactyl.assert(!names.some(function (name) name in this._exMap, this),
let sorted = this._exCommands.sort(function (a, b) a.name > b.name);
dactyl.assert(!names.some(function (name) name in this._exMap, this),
.split("\n").filter(function (line) line.indexOf("=") > 0)
context.filters.push(function (item) item.isdir);
.split("\n").filter(function (line) line.indexOf("=") > 0)
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
chrome.tabs.captureVisibleTab(sender.tab.windowId, function(data){ func(data); });
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); },
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); },
function () { dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); },
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
selector = '[rel="' + action + '"]';
$.post(action, $.param({'delete': true}), function (data) { selector = '[rel="' + action + '"]'; if (data['deleted']) { containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); if (...
containingList = $(selector).parent().parent().parent();
$.post(action, $.param({'delete': true}), function (data) { selector = '[rel="' + action + '"]'; if (data['deleted']) { containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); if (...
$(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>');
$(containingList).append('<li class="empty">No ' + sectionNamePlural + ' defined.</li>');
$.post(action, $.param({'delete': true}), function (data) { selector = '[rel="' + action + '"]'; if (data['deleted']) { containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); if (...
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);
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); });
function (args) { commandline.runSilently(function () dactyl.execute(args[0], null, true)); }, {
function () { commandline._messageHistory.clear(); },
function (args) { commandline.runSilently(function () dactyl.execute(args[0], null, true)); }, {
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArr...
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val()...
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArr...
(content.title ? succeed(content.title):getTitle()).addCallback(function(title){
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){
(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....
} });
(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....
return this.getToken().addCallback(function(){ var user = self.user; var tags = self.tags; if(user && tags){ return succeed(tags); } else { return request('http: try{ tags = JSON.parse(res.responseText)['tags']; } catch(e) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return self.tags = i...
return this.getToken().addCallback(function(data){ return request('http: method: 'POST', sendContent : { rks : data['rks'], 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 this.getToken().addCallback(function(){ var user = self.user; var tags = self.tags; if(user && tags){ return succeed(tags); } else { return request('http://b.hatena.ne.jp/'+user+'/tags.json').addCallback(function(res){ try{ tags = JSON.parse(res.responseT...
dactyl.assert(!arg || arg[0] == ">" && !dactyl.has("Win32"),
dactyl.assert(!arg || arg[0] == ">" && !dactyl.has("WINNT"),
function (args) { let arg = args[0]; // FIXME: arg handling is a bit of a mess, check for filename dactyl.assert(!arg || arg[0] == ">" && !dactyl.has("Win32"), "E488: Trailing characters"); options.withContext(function () { ...
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters");
let tab = tabs.getTab();
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]; ...
let [winIndex, tabIndex] = args.map(parseInt); let win = dactyl.windows[winIndex - 1];
let activate = args.bang ? true : false; if (options.get("activate").has("tabopen", "all")) activate = !activate;
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...
for (let i in util.range(0, Math.max(1, args.count))) tabs.cloneTab(tab, activate);
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]; ...
this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList;
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.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; });
this.each(function(value, index) { if (iterator.call(context, value, index)) results.push(value); });
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(...
this.each(function(value, index) { if (iterator.call(context, value, index)) results.push(value); });
let list = template.map(option, function (option) { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; }, <br/>);
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
let list = template.map(option, function (option) { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; }, <br/>);
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete);
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false);
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); });
memoize(this._optionMap, name, function () Option(names, description, type, defaultValue, extraInfo));
this._options = this._options.filter(function (o) o != opt);
memoize(this._optionMap, name, function () Option(names, description, type, defaultValue, extraInfo));
let cmds = commands._exCommands.filter(function (c) c.user && (!cmd || c.name.match("^" + cmd)));
function (args) { let cmd = args[0]; dactyl.assert(!/\W/.test(cmd || ''), "E182: Invalid command name"); if (args.literalArg) { let nargsOpt = args["-nargs"] || "0"; let bangOpt = "-bang" in args; let countOpt = "-count" in args; let descriptionOpt = args["-description"] || "User-defined command";...
let cmds = commands._exCommands.filter(function (c) c.user && (!cmd || c.name.match("^" + cmd)));
$("write_xml").observe("click", function(ev) { window.location.href = URL + '/WriteXML';
$("summarize").observe("click", function(ev) { window.open(URL + "/Summarize", "SummarizeWindow");
$("write_xml").observe("click", function(ev) { window.location.href = URL + '/WriteXML'; });
this.each(function(value, index) { if (filter.match(value)) results.push(iterator.call(context, value, index)); });
value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)) elem.className+=(elem.className?"...
this.each(function(value, index) { if (filter.match(value)) results.push(iterator.call(context, value, index)); });
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...
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]; ...
var info_url=$(this).parent().attr('href').replace(/.photo\
var info_url=$(this).parent().attr('href').replace(/.photo.*\
$('.image img').hover(function() { var info_url=$(this).parent().attr('href').replace(/.photo\//,'.jsrpc/imginfo/'); $('#imageinfo').load(info_url) },function() {})
let list = template.map(option, function (option) { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; }, <br/>);
function (file) editor.editFileExternally(file.path);
let list = template.map(option, function (option) { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; }, <br/>);
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");
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false); });
completion.file(context, true);
completion.file(context, args, true);
[function (context, obj, args) { context.quote[2] = ""; completion.file(context, true); }]);
[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); });
[function (context, obj, args) { context.quote[2] = ""; completion.file(context, true); }]);
var layout = { top: 10, left: 10, bottom: 10, right: 10 }; var no_f = { x: 10, y: 10, width: 0, height: 0, "-webkit-transform": 'translateZ(0px)' } ; var with_f = { x: 10, y: 10, width: 180, height: 180, "-webkit-transform": 'translateZ(0px)' } ; var s = { top: 10, left: 10, bottom: 10, right: 10, "-webkit-transform": ...
var layout = { top: 10, left: 10, bottom: 10, right: 10 }; var expectedTransform = 'translateX(0px) translateY(0px)'; if (SC.platform.supportsCSS3DTransforms) expectedTransform += ' translateZ(0px)'; var no_f = { x: 10, y: 10, width: 0, height: 0, transform: expectedTransform } ; var with_f = { x: 10, y: 10, width: 180...
test("layout {top, left, bottom, right}", function() { var layout = { top: 10, left: 10, bottom: 10, right: 10 }; var no_f = { x: 10, y: 10, width: 0, height: 0, "-webkit-transform": 'translateZ(0px)' } ; var with_f = { x: 10, y: 10, width: 180, height: 180, "-webkit-transform": 'translateZ(0px)' } ; var s = { top:...
$("#popup_cancel").click( function() {
$("#popup_ok").click( function() { var val = $("#popup_prompt").val();
$("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null ); });
if( callback ) callback( null );
if( callback ) callback( val );
$("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null ); });
selection : createFlavoredString(window.getSelection()),
selection : (!!sel.raw)? sel : null,
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, sele...
}).addErrback(function(e){ if(isPopup){ notify(Config['post']['tag_provider']+'\n'+e.message.indent(4)); } else { alert(Config['post']['tag_provider']+'\n'+e.message.indent(4)); } var icon = $('loading_icon'); removeElementClass(icon, 'loading'); addElementClass(icon, 'loaded'); });
connect(tags, 'oninput', this, function(ev){ var self = this; this.refreshCheck(); setTimeout(function(){ self.onInput(ev) }, 0); });
}).addErrback(function(e){ if(isPopup){ notify(Config['post']['tag_provider']+'\n'+e.message.indent(4)); } else { alert(Config['post']['tag_provider']+'\n'+e.message.indent(4)); } var icon = $('loading_icon'); removeElementClass(icon, 'loading'); addElem...
function (count) { editor.executeCommand("cmd_undo", count); dactyl.mode = modes.TEXTAREA; },
function () { editor.expandAbbreviation(modes.INSERT); });
function (count) { editor.executeCommand("cmd_undo", count); dactyl.mode = modes.TEXTAREA; },
let sorted = this._exCommands.sort(function (a, b) a.name > b.name);
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
let sorted = this._exCommands.sort(function (a, b) a.name > b.name);
}).addErrback(function(e){ });
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); });
}).addErrback(function(e){ });
context.keys.text = function (f) f.path.substr(dir.length);
context.keys.text = function (f) this.path.substr(dir.length);
context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); context.title[0] = dir; context.keys.text = function (f) f.path.substr(dir.length); ...