rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
$.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); if (found) { var r = me._matchKey(k.slice(1), j, seg, fuzzyMap); if (r) { result = r; return false; } } } });
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } });
$.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); ...
homepages = homepages.replace(/\|/g, options["urlseperator"] || ", ");
function () { let homepages = gHomeButton.getHomePage(); liberator.open(homepages, { from: "homepage", where: liberator.NEW_TAB }); });
[["-keyword", "-k"], commands.OPTION_STRING, function (arg) /\w/.test(arg)]]
return this._exCommands.filter(function (cmd) cmd.user && cmd.hasName(name))[0] || null;
[["-keyword", "-k"], commands.OPTION_STRING, function (arg) /\w/.test(arg)]]
result: prefix + item.result,
let items = this.contextList.map(function (context) { if (!context.hasItems) return []; let prefix = self.value.substring(minStart, context.offset); return context.items.map(function (item) ({ text: prefix + item.text, ...
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
["copy", "copylink", "selectall"].forEach(function (tail) { let xpath = " document.getElementById("dactyl-context-" + tail).style.listStyleImage = util.computedStyle(util.evaluateXPath(xpath, document).snapshotItem(0)).listStyleImage; });
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
(function (frame) { if (frame.document.body instanceof HTMLBodyElement) frames.push(frame); Array.forEach(frame.frames, arguments.callee); })(window.content);
["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); });
(function (frame) { if (frame.document.body instanceof HTMLBodyElement) frames.push(frame); Array.forEach(frame.frames, arguments.callee); })(window.content);
function (args) { tabs.reloadAll(args.bang); }, {
function () { tabs.stopAll(); },
function (args) { tabs.reloadAll(args.bang); }, {
$.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } });
$.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } });
$.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } });
$("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) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList =...
$.post(action, params, function (data) { errors = data['errors']; if (errors) { $(trgt).parent().find(":input").each(function () { if (errors[$(this).attr("name")]) { $(this).addClass("error"); if (!$(this).next().hasClass("msg")) { $(this).after('<span class="msg">' + errors[$(this).attr("name")][0] + '</span>'); } } ...
$("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) { if (data['...
} else { $(selector).insertAfter('<span class="fail">An error occurred.</span>'); $("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); }); } }, "json"); } return false; });
}); } else { $(trgt).parent().replaceWith(data['new_row']); $(selector).prev().find("li.empty").remove(); } }, "json");
$("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) { if (data['...
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments); });
getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Popup.open(tab, ps); } else { var posters = Models.getDefaults(ps); if(!posters.length){ TBRL.Service.alertPreference(ps.type); } else { TBRL.Service.post(ps, posters); } } func({}); }).addErrback(function(e){
chrome.extension.onRequest.addListener(function(req, sender, func){ var handler = onRequestsHandlers[req.request]; handler && handler.apply(this, arguments);});
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand)
function (args) { let arg = args[0] || ""; if (args.bang) arg = "!" + arg; if (options["banghist"]) { dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io...
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
} io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); }, {
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
}).addErrback(function(err){ self.alertError(err, ps.pageUrl); });
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
self.element.live('click',function(){ self.element.trigger('dcmgrGUI.refresh'); })
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ var data = { item:params.data } if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) ...
self.element.live('click',function(){ self.element.trigger('dcmgrGUI.refresh'); })
this.addMode("F", "Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F"); });
this.addMode("F", "Open multiple hints in tabs", function (elem, l, c, top) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F", null, top); });
this.addMode("F", "Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F"); });
$.alerts._show(title, message, value, 'prompt', function(result) {
$.alerts._show(title, message, null, 'confirm', function(result) {
$.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); });
var bindingType = Report.bindingTypes.results.bindings.filter(function(el) { return el.type.value == bindings[i].type.value; } )[0];
var bindDataTypes = this.dataTypes.filter(function(dataType) { return dataType.bindingType.value == bindingType.type.value; } );
var bindingType = Report.bindingTypes.results.bindings.filter(function(el) { return el.type.value == bindings[i].type.value; } )[0];
player.volume = util.Math.constrain(level, 0, 1);
player.volume = Math.constrain(level, 0, 1);
function (args) { let arg = args[0]; dactyl.assert(/^[+-]?\d+$/.test(arg), "E488: Trailing characters"); let level = parseInt(arg, 10) / 100; if (/^[+-]/.test(arg)) level = player.volume + level; player.volume = ut...
function (count, arg) { count = Math.max(count, 1); while (count-- && events.playMacro(arg)) ; },
values.forEach(function (re) { re.result = events.fromString(re.result).map(events.closure.toString); re.result.toString = function toString() this.join(""); });
function (count, arg) { count = Math.max(count, 1); while (count-- && events.playMacro(arg)) ; },
var n = theTable.find(".select_entry input.select_box:checked").length; theTable.find(".selected_number").text(n);
function () { theTable = $(this).parents(".select_list:first"); if ( theTable.find("select.select_type:first option:selected").hasClass("select_one") ) { theTable.find(".select_entry input.select_box").removeAttr("checked"); theTable.find(".select_entry").css(...
connect(this.image, 'onload', this.image, function(){ var width = this.naturalWidth; var height = this.naturalHeight; var resizedHeight = this.width / width * height; if(resizedHeight > 300){ this.setAttribute('style', 'height:300px !important;width:'+(height/300*width)+' !important;'); this.setAttribute('style', 'heig...
wait(0).addCallback(function(){
connect(this.image, 'onload', this.image, function(){ var width = this.naturalWidth; var height = this.naturalHeight; var resizedHeight = this.width / width * height; if(resizedHeight > 300){ this.setAttribute('style', 'height:300px !important;width:'+(height/300*width)+' !important;'); this.set...
function () { editor.executeCommand("cmd_deleteCharForward", 1); });
function () { events.feedkeys("<BS>", true); });
function () { editor.executeCommand("cmd_deleteCharForward", 1); });
canvas.width = size.w = dim.w * scale; canvas.height = size.h = dim.h * scale; ctx.scale(scale, scale);
canvas.width = size.w = dim.w; canvas.height = size.h = dim.h; dim.w *= scale; dim.h *= scale; pos.x *= scale; pos.y *= scale;
}, function(res){ var img = new Image(); img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/di...
var ctx = canvas.getContext('2d');
}, function(res){ var img = new Image(); img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/di...
$.each(data[q.ikey.join(" ")] || [], function (i, e) {
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + files[index] + me.JSON, null, function (data) { if (me._queries !== queries) return; $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } $.each(data[q.ikey.join(" ")] || [], function (i, e) {
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else ...
}); var pos = -1; $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); if (pos == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(pos, 1); if (pending.length == 0) { me._queries = null; ctx.phrase = phrase; ctx.prediction = me._makePredic...
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else ...
}, function(res){ var img = new Image(); img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); scale = (img.naturalWidth === width)? null : img.naturalWidth / width; var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; var ctx = canvas.getContext('2d'); ...
}).addCallback(function(file){ return { type : 'photo', item : ctx.title, file : file };
}, function(res){ var img = new Image(); img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); scale = (img.naturalWidth === width)? null : img.naturalWidth / width; var canvas = document.createElement('canvas'); var ...
YUI().use('node', function(Y) { for ( var x in args) { data = data.replace(x, args[x]); } alert(data); });
YUI().use( 'node', function(Y) { var container = Y.Node.get('#cos-content'); if ( container ) { if ( container.getStyle('display') == 'block' ) { container.setStyle('display', 'none'); } else { container.setStyle('display', 'block'); } } });
YUI().use('node', function(Y) { for ( var x in args) { data = data.replace(x, args[x]); } alert(data); });
function (args) { let arg = args.literalArg; if (args.bang) arg = "!" + arg; dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, "E34: No previous command"); if (options["banghist"]) arg = arg.replace(/(\\)*!/g, function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io...
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand)
function (args) { let arg = args.literalArg; // :!! needs to be treated specially as the command parser sets the // bang flag but removes the ! from arg if (args.bang) arg = "!" + arg; // replaceable bang and no pr...
io._lastRunCommand = arg; let output = io.system(arg); commandline.command = "!" + arg; commandline.commandOutput(<span highlight="CmdOutput">{output}</span>); autocommands.trigger("ShellCmdPost", {}); }, {
function (args) { let arg = args.literalArg; // :!! needs to be treated specially as the command parser sets the // bang flag but removes the ! from arg if (args.bang) arg = "!" + arg; // replaceable bang and no pr...
function (args) { io.sourceFromRuntimePath(args, args.bang); },
return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n");
function (args) { io.sourceFromRuntimePath(args, args.bang); },
function (args) { dactyl.quit(false, args.bang); }, {
function (args) { tabs.switchTo(args[0], args.bang, args.count); }, {
function (args) { dactyl.quit(false, args.bang); }, {
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; });
dactyl.trapErrors(function () { if (self._completions) self._completions.tab(event.shiftKey, event.altKey && options["altwildmode"]); });
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||""...
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(thi...
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||""...
var request = (function(){ var ID = 0; return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; } })();
args = args.map(function(arg){ return JSON.stringify(arg); }).join(',')
var request = (function(){ var ID = 0; return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; }})();
width:400,
width:550,
$("#manageFilter").click(function(){ var ok = ''; var options ={ height:450, width:400, hide:'explode', modal : true, resizable: false, title:__("Filter & Search"), buttons: { "Cancel":function(){ ...
"Apply Filter": function() {
"Apply filter": function() {
$("#manageFilter").click(function(){ var ok = ''; var options ={ height:450, width:400, hide:'explode', modal : true, resizable: false, title:__("Filter & Search"), buttons: { "Cancel":function(){ ...
ret.callback(canvas.toDataURL('image/png', ''));
ret.callback({ contentType: 'image/png', base64: true, height: size.h, width : size.w, binary: canvas.toDataURL('image/png', '') });
img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/dim.w : scale.h? scale.h/dim.h : scale; ...
function () { tabs.stopAll(); },
function (args) { tabs.reloadAll(args.bang); }, {
function () { tabs.stopAll(); },
}, function(res){ d.callback(res);
return function(ps){ var id = "post_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "post", "ps" : ps, "id" : id
}, function(res){ d.callback(res); });
return ret; }
}, function(res){ d.callback(res); });
return this.template.gsub(this.pattern, function(match) { if (object == null) return ''; var before = match[1] || ''; if (before == '\\') return match[2]; var ctx = object, expr = match[3]; var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; match = pattern.exec(expr); if (match == null) return before; while (ma...
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(...
return this.template.gsub(this.pattern, function(match) { if (object == null) return ''; var before = match[1] || ''; if (before == '\\') return match[2]; var ctx = object, expr = match[3]; var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; match = pattern.exec(expr); if (mat...
Array.some(elem.childNodes, function (child) regexp.test(child.alt) === regexp.result))
frames.filter(function (f) f !== buffer.focusedFrame))
Array.some(elem.childNodes, function (child) regexp.test(child.alt) === regexp.result))
return Array.concat(values).every(function (re) res.some(function (item) item[0] == re.result));
function (value) evaluator.createExpression(value, util.evaluateXPath.resolver));
return Array.concat(values).every(function (re) res.some(function (item) item[0] == re.result));
values.forEach(function (re) { re.result = events.fromString(re.result).map(events.closure.toString); re.result.toString = function toString() this.join(""); });
function (arg) { events.startRecording(arg); },
values.forEach(function (re) { re.result = events.fromString(re.result).map(events.closure.toString); re.result.toString = function toString() this.join(""); });
$.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } });
$.each(pending, function (i, e) { if (e == index) { pos = i; return false; } });
$.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } });
result: prefix + item.result,
return context.items.map(function (item) ({ text: prefix + item.text, __proto__: item }));
this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; });
multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")),
this.__defineGetter__("_completionList", function () { let node = this.widgets.active.commandline; if (!node._completionList) node._completionList = ItemList("dactyl-completions-" + node.id); return node._completionList; });
$("summarize").observe("click", function(ev) { window.open(URL + "/Summarize", "SummarizeWindow"); });
Event.observe(window, "load", function(event) { // Hide all hidden elements ($$(".hidden")).invoke("hide"); // Update the DB system names and keys getDBKeys(); // Make the drop-downs for selecting things var systemButton = new ButtonInput("system_selector"); systemButton.type = "System"; systemButton.action = "get"; sy...
function () { tabs.stopAll(); },
function (args) { let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, {
function () { tabs.stopAll(); },
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } });
$.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } });
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } });
ids.map(function (id) document.getElementById(id))
guioptions[option].forEach(function (elem) { try { document.getElementById(elem).collapsed = true; } catch (e) {} });
ids.map(function (id) document.getElementById(id))
guioptions[option].forEach(function (elem) { try { document.getElementById(elem).collapsed = true; } catch (e) {} });
ids.map(function (id) document.getElementById(id))
guioptions[option].forEach(function (elem) { try { document.getElementById(elem).collapsed = true; } catch (e) {} });
$.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); if (!$(containingList).children().length) { $(containingList).append('<li class="empty">No ' + $(contai...
$(trgt).parent().find(":input").each(function () { if (errors[$(this).attr("name")]) { $(this).addClass("error"); if (!$(this).next().hasClass("msg")) { $(this).after('<span class="msg">' + errors[$(this).attr("name")][0] + '</span>'); } } else { $(this).removeClass("error"); $(this).parent().find('span.msg').remove();
$.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); ...
} else { $(selector).insertAfter('<span class="fail">An error occurred.</span>'); $("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); }); } }, "json");
});
$.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent().parent(); $(selector).parent().parent().remove(); ...
context.filters.push(function ({ item }) item.isDirectory());
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
context.filters.push(function ({ item }) item.isDirectory());
$.getJSON(this.SCHEMA + encodeURIComponent(schemaName), null, function (data) { schema = new Schema (schemaName, data); callback(schema);
$.each(pending, function (i_, p) { p.request.abort();
$.getJSON(this.SCHEMA + encodeURIComponent(schemaName), null, function (data) { schema = new Schema (schemaName, data); callback(schema); });
$("#popup_ok").click( function() { $.alerts._hide(); callback(true); });
$.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); });
$("#popup_ok").click( function() { $.alerts._hide(); callback(true); });
var variables = this.variables.results.bindings.filter(function(el) { return el.binding.value == report.bindings.results.bindings[i].binding.value; } );
var bindingType = Report.bindingTypes.results.bindings.filter(function(el) { return el.type.value == bindings[i].type.value; } )[0];
var variables = this.variables.results.bindings.filter(function(el) { return el.binding.value == report.bindings.results.bindings[i].binding.value; } );
var timeoutRequest = SC.Request.getUrl("http:
var timeoutRequest = SC.Request.getUrl("/"),
test("Timeouts - SC.Request didReceive callback", function() { var message; // Sanity check - Should throw an error if we try to set a timeout of 0s. try { SC.Request.getUrl(url).set('timeout', 0).send(); } catch (e) { message = e; } ok(message && message.indexOf("The timeout value must either not be speci...
if (v) context.filters.push(function (item) this.matchString(v, item[k]));
if (v != null) context.filters.push(function (item) item.item[k] != null && this.matchString(v, item.item[k]));
forEach(iter(extra || {}), function ([k, v]) { if (v) context.filters.push(function (item) this.matchString(v, item[k])); });
setBGcolorCompare ( theLines.find("input.select_box:checked").parents(".select_entry:first"), $(this).find("option:selected").hasClass("select_red"), "#C24949", "#49C24f" );
setBGcolorCompare ( theLines.find("input.select_box:checked").parents(".select_entry"), $(this).find("option:selected").hasClass("select_red"), "#C24949", "#49C24f" );
function () { theTable = $(this).parents(".select_list:first"); theLines = theTable.find(".select_entry"); if ( $(this).find("option:selected").hasClass("select_one") ) { theLines.find("input.select_box").removeAttr("checked"); theLines.css("backgro...
wait(0).addCallback(function(){ Form.resize(true); });
connect(desc, 'oninput', desc, function(){ count.replaceChild($T(desc.value.length), count.firstChild); });
wait(0).addCallback(function(){ Form.resize(true); });
let saved = save.map(function (p) dactyl[p]);
let vals = save.map(function (p) dactyl[p]);
let saved = save.map(function (p) dactyl[p]);
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
function () { editor.pasteClipboard(); });
function () { editor.executeCommand("cmd_deleteCharForward", 1); });
function () { editor.pasteClipboard(); });
canvas.width = size.w = dim.w * scale; canvas.height = size.h = dim.h * scale; ctx.scale(scale, scale);
canvas.width = size.w = dim.w; canvas.height = size.h = dim.h; dim.w *= scale; dim.h *= scale; pos.x *= scale; pos.y *= scale;
img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/dim.w : scale.h? scale.h/dim.h : scale; ...
var ctx = canvas.getContext('2d');
img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; if(scale){ scale = scale.w? scale.w/dim.w : scale.h? scale.h/dim.h : scale; ...
return Hatena.getToken().addErrback(function(e){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); });
url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); }),
return Hatena.getToken().addErrback(function(e){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); });
img.addEventListener('load', function(ev){
}, function(res){ var img = new Image(); img.addEventListener('load', function(ev){
img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); scale = (img.naturalWidth === width)? null : img.naturalWidth / width; var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; var ctx = canvas.getCon...
img.src = res; });
img.addEventListener('load', function(ev){ img.removeEventListener('load', arguments.callee, false); scale = (img.naturalWidth === width)? null : img.naturalWidth / width; var canvas = document.createElement('canvas'); var size = {w: 0, h: 0}; var ctx = canvas.getCon...
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
.map(function (key) options.getPref("intl.charsetmenu.browser." + key).split(', '))
function (m) /^\\(\\\\)*!$/.test(m) ? m.replace("\\!", "!") : m.replace("!", io._lastRunCommand) );
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
}).addErrback(function(err){ self.alertError(err, ps.pageUrl); });
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config); });
function (args) { tabs.reloadAll(args.bang); }, {
function (args) { tabs.list(args[0] || ""); }, {
function (args) { tabs.reloadAll(args.bang); }, {
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; dactyl.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; });
return function(url, opt){
var request = (function(){ var ID = 0; return function(url, opt){
return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; }
})();
return function(url, opt){ var id = "request_"+(++ID); var ret = Callbacks[id] = new Deferred(); connection.postMessage({ "type" : "request", "url" : url, "opt" : opt, "id" : id }); return ret; }
return request(HatenaBookmark.JSON_URL).addCallback(function(res){ var data = JSON.parse(res.responseText); if(!data["login"]){ delete self['token']; delete self['user']; delete self['tags']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } self.token = data['rks']; self.user = data['name']; ...
return Hatena.getToken().addErrback(function(e){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); });
return request(HatenaBookmark.JSON_URL).addCallback(function(res){ var data = JSON.parse(res.responseText); if(!data["login"]){ delete self['token']; delete self['user']; delete self['tags']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name));...
function (args) { let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, {
function () { tabs.stopAll(); },
function (args) { let arg = args[0]; // FIXME: tabmove! N should probably produce an error dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); // if not specified, move to after t...
args = args.map(function(arg){ return JSON.stringify(arg); }).join(',')
connect(document, 'onDOMContentLoaded', null, function(ev){ d.callback(title_getter()); });
args = args.map(function(arg){ return JSON.stringify(arg); }).join(',')
{ var xy = Y.one(node).getXY(); imageNode = Y.Node.create('<img />'); imageNode.set('id', Y.guid()); var overlay = new Y.Overlay( { headerContent : 'Popup: Click to close.', bodyContent : imageNode, width : 'auto', height : 'auto', centered : node, visible : false, xy : [ xy[0] + 10, xy[1] + 35 ] }); if (imagetext) { o...
{ var xy = Y.one(node).getXY(); imageNode = Y.Node.create('<img />'); imageNode.set('id', Y.guid()); var overlay = new Y.Overlay( { headerContent : 'Popup: Click to close.', bodyContent : imageNode, width : 'auto', height : 'auto', centered : node, visible : false, xy : [ xy[0] + 10, xy[1] + 35 ] }); if (imagetext) { o...
YUI().use('node', 'overlay', 'imageloader', function(Y) { var xy = Y.one(node).getXY(); imageNode = Y.Node.create('<img />'); imageNode.set('id', Y.guid()); var overlay = new Y.Overlay( { headerContent : 'Popup: Click to close.', bodyContent : imageNode, width : 'auto', height : 'auto', centered : nod...
Y.on('click', Y.bind(overlay.hide, overlay), overlay.get('contentBox')); if (doubleclick) { Y.on('dblclick', function(e) { overlay.show(); }, node); } else { Y.on('click', function(e) { overlay.show(); }, node); } });
overlay.render(); Y.on('click', Y.bind(overlay.hide, overlay), overlay.get('contentBox')); if (doubleclick) { Y.on('dblclick', function(e) { overlay.show(); }, node); } else { Y.on('click', function(e) { overlay.show(); }, node); } });
YUI().use('node', 'overlay', 'imageloader', function(Y) { var xy = Y.one(node).getXY(); imageNode = Y.Node.create('<img />'); imageNode.set('id', Y.guid()); var overlay = new Y.Overlay( { headerContent : 'Popup: Click to close.', bodyContent : imageNode, width : 'auto', height : 'auto', centered : nod...
this._each(function(value) { iterator.call(context, value, index++); });
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) { iterator.call(context, value, index++); });
prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ctrlKey, shiftKey: shiftKey, metaKey: ctrlKey })); }); });
Array.some(elem.childNodes, function (child) regexp.test(child.alt) === regexp.result))
prefs.withContext(function () { prefs.set("browser.tabs.loadInBackground", true); ["mousedown", "mouseup", "click"].forEach(function (event) { elem.dispatchEvent(events.create(doc, event, { screenX: offsetX, screenY: offsetY, ctrlKey: ct...
return Array.concat(values).every(function (value) res.some(function (item) item[0] == value));
dactyl.registerObserver("shutdown", function () { if (this._loadPreference("dom.popup_allowed_events", "") == popupAllowedEvents + " keypress") this._storePreference("dom.popup_allowed_events", popupAllowedEvents); });
return Array.concat(values).every(function (value) res.some(function (item) item[0] == value));
$.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } });
$.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); if (found) { var r = me._matchKey(k.slice(1), j, seg, fuzzyMap); if (r) { result = r; return false; } } } });
$.each(c, function (i_, e) { e.prob = (e.unigram[2] + 0.1) / total * p; if (d[i] == undefined || d[i].prob < e.prob) { d[i] = e; } });
return specs.map(function (spec) { let [, head, tail] = /([^[]+)(?:\[(.*)])?/.exec(spec); return tail ? [head + tail, head] : [head]; });
if (Array.concat(cmd.domains(args)).some(function (domain) util.isSubdomain(domain, host)))
return specs.map(function (spec) { let [, head, tail] = /([^[]+)(?:\[(.*)])?/.exec(spec); return tail ? [head + tail, head] : [head]; });
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; dactyl.execute(command); } finally { io.readHeredoc = readHeredoc; } });
mowContainer: Class.memoize(function () this.multilineOutput.parentNode)
this.registerCallback("submit", modes.EX, function (command) { try { var readHeredoc = io.readHeredoc; io.readHeredoc = commandline.readHeredoc; commands.repeat = command; dactyl.execute(command); } finally { ...
help: function (map) let (char = array.compact(map.modes.map(function (m) m.char))[0])
function (args) { events.feedkeys(args[0] || "", args.bang, false, findMode(args["-mode"])); },
help: function (map) let (char = array.compact(map.modes.map(function (m) m.char))[0])
function (args) { let arg = args[0]; dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang); }, {
function () { tabs.keepOnly(config.tabbrowser.mCurrentTab); },
function (args) { let arg = args[0]; // FIXME: tabmove! N should probably produce an error dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); // if not specified, move to after t...
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady();
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); }
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); });
$("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); });
$("a.edit").live("click", function () { trgt = this; addAnchor = $(this).closest("div").find("a.add"); $.get($(this).attr("rel"), {}, function (data) { $(trgt).parent().parent().after(getForm(addAnchor, data, $(trgt).attr("rel"))); $(trgt).parent().parent().hide(); }, "json"); return false; });
$("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); });
context.generate = function () lines.map(function (line) (line.match(/([^=]+)=(.+)/) || []).slice(1));
context.filters.push(function ({ item }) item.isDirectory());
context.generate = function () lines.map(function (line) (line.match(/([^=]+)=(.+)/) || []).slice(1));
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList);
$.getJSON(this.SCHEMA + encodeURIComponent(schemaName), null, function (data) { schema = new Schema (schemaName, data); callback(schema);
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); });
$("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click');
$("#popup_ok").click( function() { $.alerts._hide(); callback(true);
$("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); });
context.filters.push(function (item) this.matchString(v, item[k]));
context.filters.push(function (item) item.item[k] != null && this.matchString(v, item.item[k]));
context.filters.push(function (item) this.matchString(v, item[k]));
connect(desc, 'oninput', desc, function(){ count.replaceChild($T(desc.value.length), count.firstChild);
this.posters.forEach(function(poster){ var stat = self.models.getConfig(ps, poster); if(~ps.enabledPosters.indexOf(poster.name)){ var res = true; } else { var res = stat === 'default'; } var img = $N('img', {'src':poster.ICON, 'title':poster.name, 'class':'poster'}); connect(img, 'onclick', self, function(){ if(!addEle...
connect(desc, 'oninput', desc, function(){ count.replaceChild($T(desc.value.length), count.firstChild); });
let vals = save.map(function (p) dactyl[p]);
saved.forEach(function (p, i) dactyl[save[i]] = p);
let vals = save.map(function (p) dactyl[p]);
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content);
Object.keys(log).forEach(function(k){ setter(k, log, TBRL.Config);
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); });