rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); case 'Element': return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); case 'View': return self.capture(win, getViewportPosition(), getViewDimensions()); case 'Page': return self.capture(win, {x:0, y:0}, getPageDimensions()); } return null; }).addCallback(function(file){
return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); } } })(elm);
return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); case 'Element': return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); case 'View': return self.capture(win, getViewportPosition(), getViewDimensions()); case 'Page': return self.capture(win, {x:0, y:0}, getPageDimensions()); } return null; }).addCallback(function(file){
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg});
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath});
jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}); }); return true; } });
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); let lines = [cmd.serialize().map(commands.commandToString) for (cmd in commands) if (cmd.serialize)]; lines = array.flatten(lines); lines.unshift('"' + dactyl.version + "\n"); lines.push("\n\" vim: set ft=" + config.name + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); } }, {
function (args) { io.sourceFromRuntimePath(args, args.bang); }, {
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); // TODO: Use a set/specifiable list here: let lines = [cmd.serialize().map(commands.commandToString) for (cmd in commands) if (cmd.serialize)]; lines = array.flatten(lines); lines.unshift('"' + dactyl.version + "\n"); lines.push("\n\" vim: set ft=" + config.name + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX } }, {
else if ( oldShippSelIndex != 'undefined' )
else if ( oldShippSelIndex )
YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } else { var selectedIndex = Y.Node.get( '#s_country').get( 'selectedIndex' ); var country = Y.Node.get( '#s_country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } var doit = function(data) { if ( Y.Node.get( '#shippingtype' ).get( 'tagName' ) == 'INPUT' ) { return false; } // If shippingtype is selected: get the old value for checking it later if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) > 0 ) { var oldShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var oldname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'text' ); var old = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'value' ); } var nodes = Y.all('#shippingtype option'); var deleteNodes = function(n, a, b) { n.get('parentNode').removeChild(n); }; nodes.each(deleteNodes); for (i = 0; i < data.length; i++) { if (data[i][2] == false) { var node = Y.Node.create('<option value="' + data[i][1] + '" disabled>' + data[i][0] + '</option>'); } else { if (old == data[i][1]) { var selected = i; } var node = Y.Node.create('<option value="' + data[i][1] + '">' + data[i][0] + '</option>'); } Y.Node.get('#shippingtype').appendChild(node); } if (typeof (selected) != 'undefined') { Y.Node.get('#shippingtype').set('selectedIndex', selected); } else if ( oldShippSelIndex != 'undefined' ) { if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) != -1 ) { var replace = new Array(); replace['%old%'] = oldname; var newShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var newname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( newShippSelIndex ).get( 'text' ); replace['%new%'] = newname; ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } } Y.log('INFO2: ' + Y.Lang.dump(Y.Node.get('#shippingtype').get('options'))); }; ezjson('getshipping?country=' + country, doit); });
ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace);
if ( oldname ) { ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); }
YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } else { var selectedIndex = Y.Node.get( '#s_country').get( 'selectedIndex' ); var country = Y.Node.get( '#s_country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } var doit = function(data) { if ( Y.Node.get( '#shippingtype' ).get( 'tagName' ) == 'INPUT' ) { return false; } // If shippingtype is selected: get the old value for checking it later if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) > 0 ) { var oldShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var oldname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'text' ); var old = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'value' ); } var nodes = Y.all('#shippingtype option'); var deleteNodes = function(n, a, b) { n.get('parentNode').removeChild(n); }; nodes.each(deleteNodes); for (i = 0; i < data.length; i++) { if (data[i][2] == false) { var node = Y.Node.create('<option value="' + data[i][1] + '" disabled>' + data[i][0] + '</option>'); } else { if (old == data[i][1]) { var selected = i; } var node = Y.Node.create('<option value="' + data[i][1] + '">' + data[i][0] + '</option>'); } Y.Node.get('#shippingtype').appendChild(node); } if (typeof (selected) != 'undefined') { Y.Node.get('#shippingtype').set('selectedIndex', selected); } else if ( oldShippSelIndex != 'undefined' ) { if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) != -1 ) { var replace = new Array(); replace['%old%'] = oldname; var newShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var newname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( newShippSelIndex ).get( 'text' ); replace['%new%'] = newname; ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } } Y.log('INFO2: ' + Y.Lang.dump(Y.Node.get('#shippingtype').get('options'))); }; ezjson('getshipping?country=' + country, doit); });
].forEach(function (command) { commands.add([command.name], command.description, function (args) {
function (args) {
].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, { argCount: "*", // FIXME: kludged for proper error message should be "1". completer: function (context) completion.autocmdEvent(context) }); });
let validEvents = config.autocommands.map(function (e) e[0]);
let validEvents = keys(config.autocommands);
].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, { argCount: "*", // FIXME: kludged for proper error message should be "1". completer: function (context) completion.autocmdEvent(context) }); });
argCount: "*", completer: function (context) completion.autocmdEvent(context) }); });
].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, { argCount: "*", // FIXME: kludged for proper error message should be "1". completer: function (context) completion.autocmdEvent(context) }); });
let arg = args.literalArg;
let arg = args[0];
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified then E488 if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, {
function () tabs.select("$", false),
function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; // count is ignored if an arg is specified, as per Vim if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, {
img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback({ contentType: 'image/png', base64: true, height: img.naturalHeight, width : img.naturalWidth, binary: canvas.toDataURL('image/png', '') }) }, false);
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback({ contentType: 'image/png', base64: true, height: img.naturalHeight, width : img.naturalWidth, binary: canvas.toDataURL('image/png', '') }) }, false);
$(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>');
$(containingList).append('<li class="empty">No choice groups defined.</li>');
$.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent(); $(selector).parent().remove(); if (!$(containingList).children().length) { $(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>'); } } else { $(selector).insertAfter('<span class="fail">An error occurred.</span>'); $("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); }); } }, "json");
autocommands.trigger(event, { url: url || buffer.URL });
autocommands.trigger(event, { url: defaultURL });
].forEach(function (command) { commands.add([command.name], command.description, // TODO: Perhaps this should take -args to pass to the command? function (args) { // Vim compatible if (args.length == 0) { liberator.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators liberator.assert(event != "*", "E217: Can't execute autocommands for ALL events"); liberator.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); liberator.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && liberator.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, { argCount: "*", // FIXME: kludged for proper error message should be "1". completer: function (context) completion.autocmdEvent(context) }); });
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this, a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
equals(view.get('layout').rotate, 45, "should set rotate");
view.set('layout', { rotateX: 0 }); equals(view.get('layout').rotate, 0, "should also work with 0");
test("sets rotate when rotateX is set", function(){ var view = SC.View.create({}); view.set('layout', { rotateX: 45 }); equals(view.get('layout').rotate, 45, "should set rotate");});
return function(link){
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){
return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }
})();
return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }
.addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ });
}, function(res){
.addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); });
$(function(){
$("#cancelUtrManager").click(function(){ $("#utrTemplateManager").hide(speed);
$(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); });
removeSession(); utrIntro(); manageEvents();
$(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); });
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
function () { tabs.select(0, false); },
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified then E488 if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); });
$.each(pending, function (i, e) { if (e == index) { pos = i; return false; } });
this._backend.loadSchema(schemaName, function (schema) { me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); });
}).addErrback(function(e){ console.log(e); });
args = args.map(function(arg){ return JSON.stringify(arg); }).join(',')
}).addErrback(function(e){ console.log(e); });
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
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])*?\*\
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
return $.map(c.slice(start, end), function (e) { return e.text; });
$.each(this._selected, function (i, e) { result.push(e.text); start += e.text.length; });
return $.map(c.slice(start, end), function (e) { return e.text; });
if(parent === doc){
if(parent === doc || !parent){
return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); } } })(elm);
function () { return; });
function () { document.commandDispatcher.rewindFocus(); });
function () { return; });
$.each(queries[index], function (i, q) {
(function (index) { pending.push(index); $.getJSON(me.DATA_DIR + me.encode(prefix) + me.SEPARATOR + me.encode(index) + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; $.each(queries[index], function (i, q) {
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.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); } }); });
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; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } }); })(k);
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.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); } }); });
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+ b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
function () { bookmarks.toggle(buffer.URL); });
return liberator.open(items.map(function (i) i.url), liberator.NEW_TAB);
function () { bookmarks.toggle(buffer.URL); });
Array.some(elem.childNodes, function (child) regex.test(child.alt))) {
.map(function (re) RegExp(re, "i"));
Array.some(elem.childNodes, function (child) regex.test(child.alt))) {
buffer.allFrames().map(function (frame) frame.document.pageIsFullyLoaded || 0)),
util.timeout(function () { statusline.updateBufferPosition(); statusline.updateZoomLevel(); commandline.clear(); }, 500);
buffer.allFrames().map(function (frame) frame.document.pageIsFullyLoaded || 0)),
dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3);
dirs.forEach(function (dir) { dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); sourceDirectory(dir); });
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
function (args) { tabs.list(args.literalArg); }, {
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified then E488 if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
$.each(pending, function (i, e) { if (e == index) { pos = i; 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(pending, function (i, e) { if (e == index) { pos = i; return false; } });
TBRL.Service.open(tab, req.content);
TBRL.Popup.open(tab, req.content);
getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); });
$(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(); } });
$("a.inline-cancel").live("click", function () { if ($(this).parent().hasClass("populated")) { $(this).parent().prev().show(); } $(this).parent().slideUp("fast", function () { $(this).remove(); }); return false; });
$(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(); } });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); });
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); dactyl.pluginFiles[file.path] = true; } catch (e) { dactyl.reportError(e); } } else if (file.isDirectory()) sourceDirectory(file); });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); });
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); });
Object.keys(val).forEach(function(k){ setter(k, val, target[key]); });
getSelected().addCallback(function(tab){ TBRL.Popup.open(tab, req.content); });
if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) {
if (e.keyCode == $.ui.keyCode.ENTER) {
$(ajaxbox.form).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { // we do NOT want to submit the form on ENTER. e.preventDefault(); } });
function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); },
function (args) { io.sourceFromRuntimePath(args, args.bang); },
function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); // TODO: add colon and remove column titles for pedantic Vim compatibility? },
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath});
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath });
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); });
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) {
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) {
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); });
return true; } });
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); });
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data }
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
var toggle = this.visTypeToggleElements.filter(function(el) { return el.visType == visType.type.value; } )[0];
var fieldset = this.visTypeFieldsetElements.filter(function(el) { return el.visType == visType.type.value; } )[0];
var toggle = this.visTypeToggleElements.filter(function(el) { return el.visType == visType.type.value; } )[0];
var p = phrase[q.start]; if (!p) { p = phrase[q.start] = [];
var a = phrase[q.start]; if (!a) { a = phrase[q.start] = [];
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.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); } }); });
if (!p[r.end]) p[r.end] = [r];
if (!a[r.end]) a[r.end] = [r];
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.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); } }); });
p[r.end].push(r);
a[r.end].push(r);
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.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); } }); });
(function($) { $.alerts = { verticalOffset: -75, horizontalOffset: 0, repositionOnResize: true, overlayOpacity: .01, overlayColor: '#FFF', draggable: false, okButton: '&nbsp;' + AtD.getLang('button_ok', "OK") + '&nbsp;', cancelButton: '&nbsp;' + AtD.getLang('button_cancel', "Cancel") + '&nbsp;', dialogClass: null, alert: function(message, title, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); }, confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, prompt: function(message, value, title, callback) { if( title == null ) title = 'Prompt'; $.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); }); }, _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( '<div id="popup_container">' + '<h1 id="popup_title"></h1>' + '<div id="popup_content">' + '<div id="popup_message"></div>' + '</div>' + '</div>'); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0 }); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth() }); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>'); $("#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'); }); break; case 'confirm': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#popup_ok").focus(); $("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); break; case 'prompt': $("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_prompt").width( $("#popup_message").width() ); $("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val ); }); $("#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'); }); if( value ) $("#popup_prompt").val(value); $("#popup_prompt").focus().select(); break; } if( $.alerts.draggable ) { try { $("#popup_container").draggable({ handle: $("#popup_title") }); $("#popup_title").css({ cursor: 'move' }); } catch(e) { } } }, _hide: function() { $("#popup_container").remove(); $.alerts._overlay('hide'); $.alerts._maintainPosition(false); }, _overlay: function(status) { switch( status ) { case 'show': $.alerts._overlay('hide'); $("BODY").append('<div id="popup_overlay"></div>'); $("#popup_overlay").css({ position: 'absolute', zIndex: 99998, top: '0px', left: '0px', width: '100%', height: $(document).height(), background: $.alerts.overlayColor, opacity: $.alerts.overlayOpacity }); break; case 'hide': $("#popup_overlay").remove(); break; } }, _reposition: function() { var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; if( top < 0 ) top = 0; if( left < 0 ) left = 0; if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); $("#popup_container").css({ top: top + 'px', left: left + 'px' }); $("#popup_overlay").height( $(document).height() ); }, _maintainPosition: function(status) { if( $.alerts.repositionOnResize ) { switch(status) { case true: $(window).bind('resize', $.alerts._reposition); break; case false: $(window).unbind('resize', $.alerts._reposition); break; } } } } jAlert = function(message, title, callback) { $.alerts.alert(message, title, callback); } jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback); }; jPrompt = function(message, value, title, callback) { $.alerts.prompt(message, value, title, callback); }; })(jQuery);
setTimeout(function() { AtD.suggestShow = false; }, 2);
(function($) { $.alerts = { // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/ repositionOnResize: true, // re-centers the dialog on window resize overlayOpacity: .01, // transparency level of overlay overlayColor: '#FFF', // base color of overlay draggable: false, // make the dialogs draggable (requires UI Draggables plugin) okButton: '&nbsp;' + AtD.getLang('button_ok', "OK") + '&nbsp;', // text for the OK button cancelButton: '&nbsp;' + AtD.getLang('button_cancel', "Cancel") + '&nbsp;', // text for the Cancel button dialogClass: null, // if specified, this class will be applied to all dialogs // Public methods alert: function(message, title, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); }, confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, prompt: function(message, value, title, callback) { if( title == null ) title = 'Prompt'; $.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); }); }, // Private methods _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( '<div id="popup_container">' + '<h1 id="popup_title"></h1>' + '<div id="popup_content">' + '<div id="popup_message"></div>' + '</div>' + '</div>'); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); // IE6 Fix var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0 }); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth() }); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>'); $("#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'); }); break; case 'confirm': $("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#popup_ok").focus(); $("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); break; case 'prompt': $("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_prompt").width( $("#popup_message").width() ); $("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val ); }); $("#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'); }); if( value ) $("#popup_prompt").val(value); $("#popup_prompt").focus().select(); break; } // Make draggable if( $.alerts.draggable ) { try { $("#popup_container").draggable({ handle: $("#popup_title") }); $("#popup_title").css({ cursor: 'move' }); } catch(e) { /* requires jQuery UI draggables */ } } }, _hide: function() { $("#popup_container").remove(); $.alerts._overlay('hide'); $.alerts._maintainPosition(false); }, _overlay: function(status) { switch( status ) { case 'show': $.alerts._overlay('hide'); $("BODY").append('<div id="popup_overlay"></div>'); $("#popup_overlay").css({ position: 'absolute', zIndex: 99998, top: '0px', left: '0px', width: '100%', height: $(document).height(), background: $.alerts.overlayColor, opacity: $.alerts.overlayOpacity }); break; case 'hide': $("#popup_overlay").remove(); break; } }, _reposition: function() { var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; if( top < 0 ) top = 0; if( left < 0 ) left = 0; // IE6 fix if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); $("#popup_container").css({ top: top + 'px', left: left + 'px' }); $("#popup_overlay").height( $(document).height() ); }, _maintainPosition: function(status) { if( $.alerts.repositionOnResize ) { switch(status) { case true: $(window).bind('resize', $.alerts._reposition); break; case false: $(window).unbind('resize', $.alerts._reposition); break; } } } } // Shortuct functions jAlert = function(message, title, callback) { $.alerts.alert(message, title, callback); } jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback); }; jPrompt = function(message, value, title, callback) { $.alerts.prompt(message, value, title, callback); }; })(jQuery);
var visBindingTypes = Report.bindingTypes.filter(function(bindingType) { return bindingType.visType.value == visType.type.value; } );
var variables = this.variables.filter(function(variable) { return variable.variable.value == name; } );
var visBindingTypes = Report.bindingTypes.filter(function(bindingType) { return bindingType.visType.value == visType.type.value; } );
let ranges = this.ranges.filter(function (r) r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0);
this.selections.forEach(function (selection) { selection.removeAllRanges(); });
let ranges = this.ranges.filter(function (r) r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0);
fileContents = fileContents.replace(/^(\s*)(\w+)(\s*:\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; });
(function(){ var names = "("; for(var param in buildUtil.baseMappings){ if(names != "("){ names += "|"; } names += param; } names += ")"; buildUtil.baseMappingRegExp = new RegExp("\\." + names + "\\W", "g"); })();
fileContents = fileContents.replace(/^(\s*)(\w+)(\s*:\s*function)\s*(\(.*)$/mg, function(str, p1, p2, p3, p4){ return p1+p2+p3+" "+buildUtil.generateSym(className+p2)+p4; });
function () { modes.push(modes.QUOTE); });
function (arg) { events.startRecording(arg); },
function () { modes.push(modes.QUOTE); });
$(document).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { e.preventDefault(); } });
$(ajaxbox.form).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { e.preventDefault(); } });
$(document).keydown(function(e) { if (e.keyCode == $.ui.keyCode.ESCAPE) { window.close(); } else if (e.keyCode == $.ui.keyCode.ENTER) { // we do NOT want to submit the form on ENTER. e.preventDefault(); } });
$$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; });
data.boards.each(function(board) { var slot = board.slot; board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); });
$$("form[chip=\"" + chip + "\"").each(function(el) { // Add some more form information el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; });
connect(toggle_detail, 'onclick', this, function(ev){ if(!addElementClass(toggle_detail, 'extended')){ removeElementClass(toggle_detail, 'extended'); } this.toggle(); });
Object.keys(this.savers).forEach(function(key){ this.ps[key] = this.savers[key].body(); }, this);
connect(toggle_detail, 'onclick', this, function(ev){ if(!addElementClass(toggle_detail, 'extended')){ removeElementClass(toggle_detail, 'extended'); } this.toggle(); });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); });
function (resp) { if (resp && resp.match(/^y(es)?$/i)) dactyl.open(urls, params, true); });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); });
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } });
self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } });
data.boards.each(function(board) { var slot = board.slot; board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); });
$$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); } });
data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); });
function () { editor.executeCommand("cmd_beginLine", 1); });
function () { editor.executeCommand("cmd_deleteToEndOfLine", 1); });
function () { editor.executeCommand("cmd_beginLine", 1); });
function (args) { map(args, mapmodes, false); },
function (args) { map(args, false); },
function (args) { map(args, mapmodes, false); },
return self.selectRegion(ctx).addCallback(function(region){
return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){
return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); });
case 'Element': return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); case 'View': return self.capture(win, getViewportPosition(), getViewDimensions()); case 'Page': return self.capture(win, {x:0, y:0}, getPageDimensions()); } return null; }).addCallback(function(file){
return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); });
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg});
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath});
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports.push(as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}); });
data.boards.each(function(board) { var slot = board.slot; board.chips.each(function(chip) { $(chip.name + "_label_" + slot).update(chip.text); if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); });
$$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; });
data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); });
function (args) { io.sourceFromRuntimePath(args, args.bang); }, {
function () { commandline.commandOutput( template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"], ([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); },
function (args) { io.sourceFromRuntimePath(args, args.bang); }, {
function (args) { if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, {
dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)),
function (args) { // Vim compatible if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, {
func({});
getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); func({}); });
function (args) { tabs.list(args.literalArg); }, {
function (args) { tabs.list(args[0] || ""); }, {
function (args) { tabs.list(args.literalArg); }, {
if((''+this.ps[key]) !== body) this.ps[key] = body;
if(key === 'body' && this.ps[key] !== body) delete ps['flavors']; this.ps[key] = body;
Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if((''+this.ps[key]) !== body) this.ps[key] = body; }, this);
function () { tabs.select(0, false); },
function (args) { let count = args.count; let arg = args[0]; if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, {
function () { tabs.select(0, false); },
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
chrome.tabs.getSelected(null, function(tab){ d.callback(tab); });
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
autocommands.trigger(event, { url: url || buffer.URL });
autocommands.trigger(event, { url: defaultURL });
function (args) { // Vim compatible if (args.length == 0) { liberator.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators liberator.assert(event != "*", "E217: Can't execute autocommands for ALL events"); liberator.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); liberator.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && liberator.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); // if no url arg is specified use the current buffer's URL autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, {
a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
return new DeferredList(values(ds)).addCallback(function(results){ var res = {}; for (var i = 0, len=results.length; i < len; i++) res[props[i]] = results[i]; return res; });
return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }
return new DeferredList(values(ds)).addCallback(function(results){ var res = {}; for (var i = 0, len=results.length; i < len; i++) res[props[i]] = results[i]; return res; });
}, function(res){ });
.addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : document.title, pageUrl : location.href }, ps) }, function(res){ }); });
}, function(res){ });
function (args) { tabs.list(args.literalArg); }, {
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
function (args) { tabs.list(args.literalArg); }, {
}, function(res){
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
}, function(res){ });
return ret; } })();
}, function(res){ });
return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { var key = decodeURIComponent(pair.shift()); var value = pair.length > 1 ? pair.join('=') : pair[0]; if (value != undefined) value = decodeURIComponent(value); if (key in hash) { if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; hash[key].push(value); } else hash[key] = value; } return hash; });
1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i==
return match[1].split(separator || '&').inject({ }, function(hash, pair) { if ((pair = pair.split('='))[0]) { var key = decodeURIComponent(pair.shift()); var value = pair.length > 1 ? pair.join('=') : pair[0]; if (value != undefined) value = decodeURIComponent(value); if (key in hash) { if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; hash[key].push(value); } else hash[key] = value; } return hash; });
(function () { var keyCodes = [ 192, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 109, 189, 107, 187, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 219, 221, 220, 65, 83, 68, 70, 71, 72, 74, 75, 76, 59, 186, 222, 90, 88, 67, 86, 66, 78, 77, 188, 190, 191, 32 ]; var lowerCase = "`1234567890--==qwertyuiop[]\\asdfghjkl;;\'zxcvbnm,./ "; var upperCase = "~!@#$%^&*()__++QWERTYUIOP{}|ASDFGHJKL::\"ZXCVBNM<>? "; var table = {}; $.each(keyCodes, function (i, keyCode) { table[keyCode] = [lowerCase.charAt(i), upperCase.charAt(i)]; }); KeyEvent._table = table; })();
return $.map(c.slice(start, end), function (e) { return e.text; });
(function () { var keyCodes = [ 192, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 109, 189, 107, 187, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 219, 221, 220, 65, 83, 68, 70, 71, 72, 74, 75, 76, 59, 186, 222, 90, 88, 67, 86, 66, 78, 77, 188, 190, 191, 32 ]; var lowerCase = "`1234567890--==qwertyuiop[]\\asdfghjkl;;\'zxcvbnm,./ "; var upperCase = "~!@#$%^&*()__++QWERTYUIOP{}|ASDFGHJKL::\"ZXCVBNM<>? "; var table = {}; $.each(keyCodes, function (i, keyCode) { table[keyCode] = [lowerCase.charAt(i), upperCase.charAt(i)]; }); KeyEvent._table = table;})();
if(this.ps[key] !== body)
if((''+this.ps[key]) !== body)
Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if(this.ps[key] !== body) this.ps[key] = body; }, this);
"E189: \"" + filename + "\" exists (add ! to override)");
"E189: " + filename.quote() + " exists (add ! to override)");
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = File(filename); dactyl.assert(!file.exists() || args.bang, "E189: \"" + filename + "\" exists (add ! to override)"); // TODO: Use a set/specifiable list here: let lines = [cmd.serial().map(commands.commandToString) for (cmd in commands) if (cmd.serial)]; lines = util.Array.flatten(lines); // source a user .pentadactylrc file lines.unshift('"' + dactyl.version + "\n"); // For the record, I think that adding this line is absurd. --Kris // I can't disagree. --djk lines.push(commands.commandToString({ command: "source", bang: true, arguments: [filename + ".local"] })); lines.push("\n\" vim: set ft=" + config.name.toLowerCase() + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX } }, {
dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing");
dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing");
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = File(filename); dactyl.assert(!file.exists() || args.bang, "E189: \"" + filename + "\" exists (add ! to override)"); // TODO: Use a set/specifiable list here: let lines = [cmd.serial().map(commands.commandToString) for (cmd in commands) if (cmd.serial)]; lines = util.Array.flatten(lines); // source a user .pentadactylrc file lines.unshift('"' + dactyl.version + "\n"); // For the record, I think that adding this line is absurd. --Kris // I can't disagree. --djk lines.push(commands.commandToString({ command: "source", bang: true, arguments: [filename + ".local"] })); lines.push("\n\" vim: set ft=" + config.name.toLowerCase() + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX } }, {
function (arg) { events.startRecording(arg); },
function () { modes.push(modes.PASS_THROUGH); });
function (arg) { events.startRecording(arg); },
$.each(data[q.ikey.join(" ")] || [], function (i, e) {
$.getJSON(me.DATA_DIR + me.encode(prefix) + me.SEPARATOR + me.encode(index) + me.JSON, null, function (data) { Logger.debug("fetched: " + index); 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 p[r.end].push(r); } });
}); 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; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } });
$.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); } });
MsgOpenNewTabForMessage();
OpenMessageInNewTab({shiftKey: options.getPref("mail.tabs.loadInBackground") });
function () { if (gDBView && gDBView.selection.count < 1) return void liberator.beep(); MsgOpenNewTabForMessage(); });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); });
<><dl>{ br + template.map(ary, function ([a, b]) <><dt>{a}</dt> <dd>{b}</dd></>, br) }
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); sourceDirectory(dir); });
options.withContext(function () { options.setPref("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) regex.test(child.alt))) {
options.withContext(function () { options.setPref("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 })); }); });
buffer.allFrames().forEach(function (frame) frame.document.pageIsFullyLoaded = val),
util.timeout(function () { statusline.updateUrl(); }, 100);
buffer.allFrames().forEach(function (frame) frame.document.pageIsFullyLoaded = val),
function (args) { tabs.list(args.literalArg); }, {
function (args) { dactyl.quit(false, args.bang); }, {
function (args) { tabs.list(args.literalArg); }, {
$.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(pending, function (i, e) { if (e == index) { pos = i; return false; } });
$.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; } } } });
TBRL.Service.open(tab, ps);
TBRL.Popup.open(tab, ps);
getSelected().addCallback(function(tab){ var ps = req.content; if(req.show){ TBRL.Service.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){
if (!silent) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":");
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 + ":"); }
io.withSavedValues(["readHeredoc", "sourcing"], function () { 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) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); dactyl.reportError(e, true); } } } });
$("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; });
$(this).parent().slideUp("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; });