rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
function (item) !item.item.collapsed);
function (toolbar) toolbar.collapsed = !toolbar.collapsed);
function (item) !item.item.collapsed);
}).addCallback(function(token){ return request(url, { sendContent: { 'form_key': token, 'bookmark[url]': ps.itemUrl, 'bookmark[title]': ps.item, 'bookmark[selection]': joinText([ps.body, ps.description]) } });
return request(this.URL + '/direct_messages/recipients_list?twttr=true').addCallback(function(res){ return map(function(pair){ return {id:pair[0], name:pair[1]}; }, JSON.parse('(' + res.responseText + ')'));
}).addCallback(function(token){ return request(url, { //denyRedirection: true, sendContent: { 'form_key': token, 'bookmark[url]': ps.itemUrl, 'bookmark[title]': ps.item, 'bookmark[selection]': joinText([ps.body, ps.description]) } }); });
function (args) { if (liberator.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else liberator.quit(false, args.bang); }, {
function (args) { Liberator.showHelpIndex("option-index", options, args.bang); }, {
function (args) { if (liberator.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else liberator.quit(false, args.bang); }, {
function () !atEnd(1), BEEP);
function () { Buffer.scrollVertical(body(), "lines", -1); },
function () !atEnd(1), BEEP);
function(proceed, element, attribute) { if (attribute === 'title') return element.title; return proceed(element, attribute); }
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])*?\*\
function(proceed, element, attribute) { if (attribute === 'title') return element.title; return proceed(element, attribute); }
function () { dactyl.open(util.readFromClipboard(), dactyl[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]); });
let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) { if (elem.readOnly || elem instanceof HTMLInputElement && ["file", "search", "text", "password"].indexOf(elem.type) < 0) return false; let computedStyle = util.computedStyle(elem); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; });
function () { dactyl.open(util.readFromClipboard(), dactyl[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]); });
let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]"];
let xpath = ["input", "textarea[not(@disabled) and not(@readonly)]"];
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { let computedStyle = util.computedStyle(match); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]); } },
let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { let computedStyle = util.computedStyle(match);
let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) { if (elem.readOnly || elem instanceof HTMLInputElement && ["text", "password", "file"].indexOf(elem.type) < 0) return false; let computedStyle = util.computedStyle(elem);
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { let computedStyle = util.computedStyle(match); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]); } },
buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]);
let elem = elements[util.Math.constrain(count, 1, elements.length) - 1]; elem.scrollIntoView(); buffer.focusElement(elem);
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { let computedStyle = util.computedStyle(match); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]); } },
fmmids.each(function(fmmid) { fakeForm.insert(new Element("input", {"name": "fmmid", "value": fmmid}));
registers.each(function(register) { fakeForm.insert(new Element("input", {"name": "reg", "value": register}));
fmmids.each(function(fmmid) { fakeForm.insert(new Element("input", {"name": "fmmid", "value": fmmid})); });
function (args) { let vbs = options.get("verbose"); let value = vbs.value; let setFrom = vbs.setFrom; try { vbs.set(args.count || 1); vbs.setFrom = null; liberator.execute(args[0], null, true); } finally { vbs.set(value); vbs.setFrom = setFrom; } }, {
function () { liberator.restart(); },
function (args) { let vbs = options.get("verbose"); let value = vbs.value; let setFrom = vbs.setFrom; try { vbs.set(args.count || 1); vbs.setFrom = null; liberator.execute(args[0], null, true); } finally { vbs.set(value); vbs.setFrom = setFrom; } }, {
function (args) { if (dactyl.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else dactyl.quit(false, args.bang); }, {
function (args) { Dactyl.showHelpIndex("option-index", options, args.bang); }, {
function (args) { if (dactyl.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else dactyl.quit(false, args.bang); }, {
remains = remains.filter(function (c) { let text = getText(c).toLowerCase(); if (text.indexOf(query) === 0) { matched.push(c); return false; } return true; });
function () { modules.hook.removeHook('KeySnailInitialized', arguments.callee); let displayHelpKey = []; for (let [k, act] in Iterator(actionKeys.selector)) { if (act === "prompt-display-keymap-help") displayHelpKey.push(k); } $("keysnail-prompt-selector-help-title") .setAttribute("value", modules.util.getLocaleString("promptSelectorKeymapHelpTitle", [displayHelpKey.join(", ")])); });
remains = remains.filter(function (c) { let text = getText(c).toLowerCase(); if (text.indexOf(query) === 0) { matched.push(c); return false; } return true; });
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]", "iframe"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { if (match instanceof HTMLIFrameElement && !Editor.windowIsEditable(match.contentWindow)) return false; let computedStyle = util.computedStyle(match); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]); } },
function () { buffer.viewSource(null, true); });
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']", "textarea[not(@disabled) and not(@readonly)]", "iframe"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (match) { if (match instanceof HTMLIFrameElement && !Editor.windowIsEditable(match.contentWindow)) return false; let computedStyle = util.computedStyle(match); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); buffer.focusElement(elements[util.Math.constrain(count, 1, elements.length) - 1]); } },
registers.each(function(register) { fakeForm.insert(new Element("input", {"name": "reg", "value": register}));
$$(".dcc_checkbox").each( function(e) { if (e.checked == true) { fmmids.push(e.readAttribute("fmmid")); }
registers.each(function(register) { fakeForm.insert(new Element("input", {"name": "reg", "value": register})); });
if (elem.readOnly || elem instanceof HTMLInputElement && ["text", "password", "file"].indexOf(elem.type) < 0)
if (elem.readOnly || elem instanceof HTMLInputElement && ["file", "search", "text", "password"].indexOf(elem.type) < 0)
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) { if (elem.readOnly || elem instanceof HTMLInputElement && ["text", "password", "file"].indexOf(elem.type) < 0) return false; let computedStyle = util.computedStyle(elem); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); let elem = elements[util.Math.constrain(count, 1, elements.length) - 1]; buffer.focusElement(elem); util.scrollIntoView(elem); } },
elem.scrollIntoView();
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) { if (elem.readOnly || elem instanceof HTMLInputElement && ["text", "password", "file"].indexOf(elem.type) < 0) return false; let computedStyle = util.computedStyle(elem); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); let elem = elements[util.Math.constrain(count, 1, elements.length) - 1]; elem.scrollIntoView(); buffer.focusElement(elem); } },
util.scrollIntoView(elem);
function (count) { if (count < 1 && buffer.lastInputField) buffer.focusElement(buffer.lastInputField); else { let xpath = ["input", "textarea[not(@disabled) and not(@readonly)]"]; let elements = [m for (m in util.evaluateXPath(xpath))].filter(function (elem) { if (elem.readOnly || elem instanceof HTMLInputElement && ["text", "password", "file"].indexOf(elem.type) < 0) return false; let computedStyle = util.computedStyle(elem); return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); liberator.assert(elements.length > 0); let elem = elements[util.Math.constrain(count, 1, elements.length) - 1]; elem.scrollIntoView(); buffer.focusElement(elem); } },
}).addCallback(function(res){ var msg = res.responseText.extract(/notification.setMessage\("(.*?)"\)/); if(msg) throw unescapeHTML(msg).trimTag(); });
return request(this.URL + '/account/settings').addCallback(function(res){ var html = res.responseText; if(~html.indexOf('login')) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); return { authenticity_token : html.extract(/authenticity_token.+value="(.+?)"/), siv : html.extract(/logout\?siv=(.+?)"/) } });
}).addCallback(function(res){ var msg = res.responseText.extract(/notification.setMessage\("(.*?)"\)/); if(msg) throw unescapeHTML(msg).trimTag(); });
context.filters.push(function (item) tokens.every( function (tok) contains(item.url, tok) || contains(item.title, tok)));
function (item, text) highlight.call(this, item, item.text, 0),
context.filters.push(function (item) tokens.every( function (tok) contains(item.url, tok) || contains(item.title, tok)));
function (count) { buffer.scrollToPercent(null, count != null ? count : 0); },
function () { buffer.scrollEnd(); });
function (count) { buffer.scrollToPercent(null, count != null ? count : 0); },
function (args) { Dactyl.showHelpIndex("option-index", options, args.bang); },
function (args) { if (dactyl.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else dactyl.quit(false, args.bang); }, {
function (args) { Dactyl.showHelpIndex("option-index", options, args.bang); },
function (toolbar) toolbar.collapsed = !toolbar.collapsed);
function (args) { let count = args.count; let special = args.bang; args = args.string; if (args[0] == ":") var method = function () liberator.execute(args, null, true); else method = liberator.eval("(function () {" + args + "})"); try { if (count > 1) { let each, eachUnits, totalUnits; let total = 0; for (let i in util.interruptibleRange(0, count, 500)) { let now = Date.now(); method(); total += Date.now() - now; } if (special) return; if (total / count >= 100) { each = total / 1000.0 / count; eachUnits = "sec"; } else { each = total / count; eachUnits = "msec"; } if (total >= 100) { total = total / 1000.0; totalUnits = "sec"; } else totalUnits = "msec"; let str = template.genericOutput("Code execution summary", <table> <tr><td>Executed:</td><td align="right"><span class="times-executed">{count}</span></td><td>times</td></tr> <tr><td>Average time:</td><td align="right"><span class="time-average">{each.toFixed(2)}</span></td><td>{eachUnits}</td></tr> <tr><td>Total time:</td><td align="right"><span class="time-total">{total.toFixed(2)}</span></td><td>{totalUnits}</td></tr> </table>); commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); } else { let beforeTime = Date.now(); method(); if (special) return; let afterTime = Date.now(); if (afterTime - beforeTime >= 100) liberator.echo("Total time: " + ((afterTime - beforeTime) / 1000.0).toFixed(2) + " sec"); else liberator.echo("Total time: " + (afterTime - beforeTime) + " msec"); } } catch (e) { liberator.echoerr(e); } }, {
function (toolbar) toolbar.collapsed = !toolbar.collapsed);
}).addCallback(function(res){ return res.responseXML; });
return map(function(pair){ return {id:pair[0], name:pair[1]}; }, JSON.parse('(' + res.responseText + ')'));
}).addCallback(function(res){ return res.responseXML; });
var haystack = sortStringValues(b);
var haystack = sortStringValues(this, b);
.define("less-than-or-equal", t.BOOLEAN, [ t.NODE_SET, t.NODE_SET ], function(a, b) { var haystack = sortStringValues(b); return !eachAsString(this, a, function() { var insertIndex = binarySearch(haystack, this); if (insertIndex < haystack.length || haystack[insertIndex] == this) return false; }); })
function () { liberator.restart(); },
function (args) { if (liberator.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else liberator.quit(false, args.bang); }, {
function () { liberator.restart(); },
function () { Buffer.scrollVertical(body(), "lines", -1); },
function () !atEnd(-1), BEEP);
function () { Buffer.scrollVertical(body(), "lines", -1); },
function(proceed, element) { element = $(element); try { element.offsetParent } catch(e) { return $(document.body) } var position = element.getStyle('position'); if (position !== 'static') return proceed(element); element.setStyle({ position: 'relative' }); var value = proceed(element); element.setStyle({ position: position }); return value; }
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(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])*?\*\
function(proceed, element) { element = $(element); // IE throws an error if element is not in document try { element.offsetParent } catch(e) { return $(document.body) } var position = element.getStyle('position'); if (position !== 'static') return proceed(element); element.setStyle({ position: 'relative' }); var value = proceed(element); element.setStyle({ position: position }); return value; }
STRING: ArgType("string", function (val) val),
return this.specs.some(function (spec) { let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/); return name.indexOf(head) == 0 && (head + (tail || "")).indexOf(name) == 0; });
STRING: ArgType("string", function (val) val),
headers, msInElevenMonths) && freshnessLifetimeGreaterThan(headers, msInAMonth);
headers, msInElevenMonths - 1) && freshnessLifetimeGreaterThan(headers, msInAMonth - 1);
function(url, headers, type) { // Add an Expires header. Use at least one year in the // future. return isCacheableResourceType(type) && !hasHeader(headers, 'Set-Cookie') && !freshnessLifetimeGreaterThan( headers, msInElevenMonths) && freshnessLifetimeGreaterThan(headers, msInAMonth); })
function (args) { let matches = args.string.match(/^([a-zA-Z0-9])(?:\s+(.+))?$/); if (!matches) liberator.echoerr("E488: Trailing characters"); else if (!matches[2]) quickmarks.add(matches[1], buffer.URL); else quickmarks.add(matches[1], matches[2]); },
marks = marks.filter(function (qmark) filter.indexOf(qmark) >= 0);
function (args) { let matches = args.string.match(/^([a-zA-Z0-9])(?:\s+(.+))?$/); if (!matches) liberator.echoerr("E488: Trailing characters"); else if (!matches[2]) quickmarks.add(matches[1], buffer.URL); else quickmarks.add(matches[1], matches[2]); },
equals(view.$('.sc-inner').css("width"), "50%", 'width should be 50%');
equals(view.$('.sc-inner')[0].style.width, "50%", 'width should be 50%');
test("basic max 50", function() { var view = pane.view('progress basic max 50'); ok(!view.$().hasClass('disabled'), 'should NOT have disabled class'); ok(view.$('.sc-inner'), 'should have sc-inner class'); equals(view.$('.sc-inner').css("width"), "50%", 'width should be 50%'); equals(view.$('.sc-inner').width(), 125, 'pixel width '); });
function () { events.onEscape(); });
dactyl.trapErrors(function () { commandline.onEvent(event); });
function () { events.onEscape(); });
bt_delete_security_group.target.bind('click',function(){ var id = c_list.currentChecked(); if( id ){ bt_delete_security_group.open(id); } return false;
bt_create_security_group.target.bind('click',function(){ bt_create_security_group.open();
bt_delete_security_group.target.bind('click',function(){ var id = c_list.currentChecked(); if( id ){ bt_delete_security_group.open(id); } return false; });
SC.RunLoop.end();
test("handles timing function array", function(){ view.animate('left', 100, { duration: 1, timing: [0.1, 0.2, 0.3, 0.4] }); equals(transitionFor(view), 'left 1s cubic-bezier(0.1, 0.2, 0.3, 0.4)', 'uses cubic-bezier timing'); });
return setTimeout(function() { try { f.apply(this, args); } catch(e) { } }, t)
return function() { if (!production && level >= this._level) { return this._listener.apply(this._listener, [type, this._name].concat(SLICE.call(arguments))); } return arguments[0]; }
return setTimeout(function() { try { f.apply(this, args); } catch(e) { // log? } }, t)
function (o) {
function (o, extended) {
function (o) { var s = "["; for (var i=0; i<o.length; i++) { s += repr(o[i]); if (i != o.length-1) { s += ", "; } } s += "]"; return s; }]];
s += repr(o[i]);
s += doctest.repr(o[i], extended);
function (o) { var s = "["; for (var i=0; i<o.length; i++) { s += repr(o[i]); if (i != o.length-1) { s += ", "; } } s += "]"; return s; }]];
bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds());
bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) $.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); });
bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); });
try { var force = dactyl.forceNewTab; dactyl.forceNewTab = true;
for (let i = 0; i < tabs.count; i++) { tabs.select(i);
function (args) { try { var force = dactyl.forceNewTab; dactyl.forceNewTab = true; dactyl.execute(args[0], null, true); } finally { dactyl.forceNewTab = force; } }, {
finally { dactyl.forceNewTab = force; }
function (args) { try { var force = dactyl.forceNewTab; dactyl.forceNewTab = true; dactyl.execute(args[0], null, true); } finally { dactyl.forceNewTab = force; } }, {
context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter));
memoize(args, i, function () self.evalled(arg));
context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter));
b.triggerAction();
b.triggerActionAfterDelay();
test('Test triggerAction only happens once', function(){ b.triggerAction(); SC.RunLoop.begin().end(); var assertions = function(){ equals(counter.get('value'), 1, "should only run action once"); start(); }; stop(); setTimeout(assertions, 300);});
setTimeout(assertions, 300);
setTimeout(assertions, 500);
test('Test triggerAction only happens once', function(){ b.triggerAction(); SC.RunLoop.begin().end(); var assertions = function(){ equals(counter.get('value'), 1, "should only run action once"); start(); }; stop(); setTimeout(assertions, 300);});
markup = $('<li><ul>' + getForm(trgt) + '</ul>' + data['row'] + '</li>');
markup = $('<li><ul class="item-container">' + getForm(trgt, null, data['add_side_url']) + '</ul>' + data['new_row'] + '</li>');
$("#side-groups").click(function () { trgt = this; $.post($(this).attr("rel"), {}, function (data) { if (data['success']) { markup = $('<li><ul>' + getForm(trgt) + '</ul>' + data['row'] + '</li>'); $("ul.group-wrap").append(markup); $("ul.group-wrap > li.empty").remove(); } }, "json"); return false; });
args.forEach(function (f) f && f.remove(false));
return this.withTempFiles(function (stdin, stdout, cmd) { if (input instanceof File) stdin = input; else if (input) stdin.write(input); let shell = File.expandPath(options["shell"]); if (util.OS.isWindows && !/sh/.test(options["shell"])) { command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path; var res = this.run(shell, options["shellcmdflag"].split(/\s+/).concat(command), true); } else { cmd.write("cd " + escape(this.cwd) + "\n" + ["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path), escape(shell), options["shellcmdflag"], escape(command)].join(" ")); res = this.run("/bin/sh", ["-e", cmd.path], true); } let output = stdout.read(); if (res > 0) output += "\nshell returned " + res; else if (output) output = output.replace(/^(.*)\n$/, "$1"); return output; }) || "";
args.forEach(function (f) f && f.remove(false));
[function (aIndex) {
function (data) { if (!data || !data.title) { display.echoStatusBar(M({ja: 'ブックマークが見つかりませんでした', en: "No bookmarks found"}), 2000); return; } var collection = []; var bookmarks = data.bookmarks; for (var i = 0; i < bookmarks.length; ++i) { var bookmark = bookmarks[i]; if (!bookmark.comment && (aArg == null)) continue; collection.push([iconGetter, bookmark.user, bookmark.tags.toString(), bookmark.comment, bookmark.timestamp]); } if (!collection.length) { display.echoStatusBar(M({ja: ((aArg == null) ? 'コメント付きの' : '') + 'ブックマークが見つかりませんでした', en: "No bookmarks found"}), 2000); return; } function getPermaLink(aRow) { var userLink = B_URL + aRow[HB_USER_NAME] + '/'; var ymd = aRow[HB_DATE].split(' ')[0]; return userLink + ymd.replace(/\ } prompt.selector( { message : "pattern:", collection : collection, flags : [ICON | IGNORE, 0, 0, 0, 0], style : ["color:blue;", "color:#3c5bff;", null, "color:#989898;"], header : ["User", "Tags", "Comment", "Date"], width : [15, 25, 45, 15], actions : [ [function (aIndex) { if (aIndex >= 0) { var url = getPermaLink(collection[aIndex]); openUILinkIn(url, "tab"); } }, M({ja: '選択中ユーザのブックマークコメントページを新しいタブで開く', en: "Open User Comment Page in new tab"}), "open-user-comment-page"], [function (aIndex) { if (aIndex >= 0) { command.setClipboardText(collection[aIndex][HB_COMMENT]); } }, M({ja: 'コメントをクリップボードにコピー', en: "Copy selected comment"}), "copy-comment,c"], [function (aIndex) {
[function (aIndex) { if (aIndex >= 0) { display.prettyPrint(collection[aIndex][HB_COMMENT], {timeout: 6000, fade: 300}); } },
M({ja: 'コメントを全文表示', en: "Display entire comment"}), "display-whole-comment,c"], [function (aIndex) { var matched; var comment = collection[aIndex][HB_COMMENT]; while ((matched = comment.match("(h?t?tps?|ftp)(: { var prefix = (matched[1] == "ftp") ? "ftp" : "http"; if (matched[1][matched[1].length - 1] == 's') prefix += "s"; gBrowser.loadOneTab(prefix + matched[2], null, null, null, false); comment.text = comment.text.slice(comment.text.indexOf(matched[2]) + matched[2].length); } }, M({ja: 'コメント中の URL を開く', en: 'Open URL in the comment'}), "open-url-in-comment,c"] ] } ); });
[function (aIndex) { if (aIndex >= 0) { display.prettyPrint(collection[aIndex][HB_COMMENT], {timeout: 6000, fade: 300}); } },
Event.observe(dragger, 'mouseout', function() {
Event.observe(dragger, 'mouseup', function() {
Event.observe(dragger, 'mouseout', function() { // unregister mouse move event handler Event.stopObserving(dragger, 'mousemove', mouseMoveHandler); });
function (args) { completion.listCompleter("macro", args[0]); }, {
function (args) { liberator.assert(!args.bang || !args.string, "E474: Invalid argument"); if (args.bang) events.deleteMacros(); else if (args.string) events.deleteMacros(args.string); else liberator.echoerr("E471: Argument required"); }, {
function (args) { completion.listCompleter("macro", args[0]); }, {
test("clicking on the checkbox will change toggle the value", function() {
test("isSelected should alter sel classname and sync with value property", function() {
test("clicking on the checkbox will change toggle the value", function() { ok(view.get('value'), 'precond - value should be YES'); view.mouseDown(); view.mouseUp(); ok(!view.get('value'), 'value should now be NO');});
ok(view.get('value'), 'precond - value should be YES'); view.mouseDown(); view.mouseUp(); ok(!view.get('value'), 'value should now be NO');
ok(view.get('isSelected'), 'isSelected should match value'); ok(view.$().hasClass('sel'), 'should have sel class'); SC.RunLoop.begin(); view.set('value', 0); SC.RunLoop.end(); ok(!view.get('isSelected'), 'isSelected should now be NO'); ok(!view.$().hasClass('sel'), 'should no longer have sel class'); equals(view.$().attr('aria-checked'), 'false', 'view should not be checked'); SC.RunLoop.begin(); view.set('isSelected', YES); SC.RunLoop.end(); ok(view.get('isSelected'), 'isSelected should match value'); ok(view.$().hasClass('sel'), 'should have sel class'); equals(view.$().attr('aria-checked'), 'true', 'aria-checked should be true');
test("clicking on the checkbox will change toggle the value", function() { ok(view.get('value'), 'precond - value should be YES'); view.mouseDown(); view.mouseUp(); ok(!view.get('value'), 'value should now be NO');});
this.map(nl, function(n) { var v; if (n.nodeType == 3) { v = n.nodeValue; var tokens = n.nodeValue.split(seps); var previous = ""; var doReplaces = []; iterator = new TokenIterator(tokens); while (iterator.hasNext()) { var token = iterator.next(); var current = errors['__' + token]; var defaults; if (current != undefined && current.pretoks != undefined) { defaults = current.defaults; current = current.pretoks['__' + previous]; var done = false; var prev, curr; prev = v.substr(0, iterator.getCount()); curr = v.substr(prev.length, v.length); var checkErrors = function(error) { if (error != undefined && !error.used && error.regexp.test(curr)) { var oldlen = curr.length; doReplaces.push([error.regexp, '<span class="'+error.type+'" pre="'+previous+'">$&</span>']); error.used = true; done = true; } }; if (current != undefined) { previous = previous + ' '; parent.map(current, checkErrors); } if (!done) { previous = ''; parent.map(defaults, checkErrors); } } previous = token; } if (doReplaces.length > 0) { newNode = n; for (var x = 0; x < doReplaces.length; x++) { var regexp = doReplaces[x][0], result = doReplaces[x][1]; var bringTheHurt = function(node) { if (node.nodeType == 3) { ecount++; if (parent.isIE() && node.nodeValue.length > 0 && node.nodeValue.substr(0, 1) == ' ') return parent.create('<span class="mceItemHidden">&nbsp;</span>' + node.nodeValue.substr(1, node.nodeValue.length - 1).replace(regexp, result), false); else return parent.create(node.nodeValue.replace(regexp, result), false); } else { var contents = parent.contents(node); for (var y = 0; y < contents.length; y++) { if (contents[y].nodeType == 3 && regexp.test(contents[y].nodeValue)) { var nnode; if (parent.isIE() && contents[y].nodeValue.length > 0 && contents[y].nodeValue.substr(0, 1) == ' ') nnode = parent.create('<span class="mceItemHidden">&nbsp;</span>' + contents[y].nodeValue.substr(1, contents[y].nodeValue.length - 1).replace(regexp, result), true); else nnode = parent.create(contents[y].nodeValue.replace(regexp, result), true); parent.replaceWith(contents[y], nnode); parent.removeParent(nnode); ecount++; return node; } } return node; } }; newNode = bringTheHurt(newNode); } parent.replaceWith(n, newNode); } }
this._walk(container_nodes, function(n) { if (n.nodeType == 3 && !parent.isMarkedNode(n)) nl.push(n);
this.map(nl, function(n) { var v; if (n.nodeType == 3) { v = n.nodeValue; /* we don't want to mangle the HTML so use the actual encoded string */ var tokens = n.nodeValue.split(seps); /* split on the unencoded string so we get access to quotes as " */ var previous = ""; var doReplaces = []; iterator = new TokenIterator(tokens); while (iterator.hasNext()) { var token = iterator.next(); var current = errors['__' + token]; var defaults; if (current != undefined && current.pretoks != undefined) { defaults = current.defaults; current = current.pretoks['__' + previous]; var done = false; var prev, curr; prev = v.substr(0, iterator.getCount()); curr = v.substr(prev.length, v.length); var checkErrors = function(error) { if (error != undefined && !error.used && error.regexp.test(curr)) { var oldlen = curr.length; doReplaces.push([error.regexp, '<span class="'+error.type+'" pre="'+previous+'">$&</span>']); error.used = true; done = true; } }; if (current != undefined) { previous = previous + ' '; parent.map(current, checkErrors); } if (!done) { previous = ''; parent.map(defaults, checkErrors); } } previous = token; } // end while /* do the actual replacements on this span */ if (doReplaces.length > 0) { newNode = n; for (var x = 0; x < doReplaces.length; x++) { var regexp = doReplaces[x][0], result = doReplaces[x][1]; /* it's assumed that this function is only being called on text nodes (nodeType == 3), the iterating is necessary because eventually the whole thing gets wrapped in an mceItemHidden span and from there it's necessary to handle each node individually. */ var bringTheHurt = function(node) { if (node.nodeType == 3) { ecount++; /* sometimes IE likes to ignore the space between two spans, solution is to insert a placeholder span with a non-breaking space. The markup removal code substitutes this span for a space later */ if (parent.isIE() && node.nodeValue.length > 0 && node.nodeValue.substr(0, 1) == ' ') return parent.create('<span class="mceItemHidden">&nbsp;</span>' + node.nodeValue.substr(1, node.nodeValue.length - 1).replace(regexp, result), false); else return parent.create(node.nodeValue.replace(regexp, result), false); } else { var contents = parent.contents(node); for (var y = 0; y < contents.length; y++) { if (contents[y].nodeType == 3 && regexp.test(contents[y].nodeValue)) { var nnode; if (parent.isIE() && contents[y].nodeValue.length > 0 && contents[y].nodeValue.substr(0, 1) == ' ') nnode = parent.create('<span class="mceItemHidden">&nbsp;</span>' + contents[y].nodeValue.substr(1, contents[y].nodeValue.length - 1).replace(regexp, result), true); else nnode = parent.create(contents[y].nodeValue.replace(regexp, result), true); parent.replaceWith(contents[y], nnode); parent.removeParent(nnode); ecount++; return node; /* we did a replacement so we can call it quits, errors only get used once */ } } return node; } }; newNode = bringTheHurt(newNode); } parent.replaceWith(n, newNode); } } });
obj.__defineGetter__(key, function () { delete obj[key]; obj[key] = getter(obj, key); return obj[key]; });
? function () { let elem; while ((elem = this.iterateNext())) yield elem; }
obj.__defineGetter__(key, function () { delete obj[key]; obj[key] = getter(obj, key); return obj[key]; });
url:DcmgrGUI.Util.getPagePath('/volumes/list/',check_id)
url:DcmgrGUI.Util.getPagePath('/volumes/show/',check_id)
$.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/volumes/list/',check_id) },true); });
.addCallback(function(content){ response.sendHeader(200, {'Content-Type' : 'text/plain', 'Content-Length' : content.length}); response.sendBody(content); response.finish(); })
.addErrback(function(){ renderError(response, 404, 'No such file, ' + path); });
.addCallback(function(content){ response.sendHeader(200, {'Content-Type' : 'text/plain', 'Content-Length' : content.length}); response.sendBody(content); response.finish(); })
c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); });
$.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/volumes/detail/',check_id) },true); });
c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); });
id: 'taberareloo_background'
id: 'taberareloo_background', style: TBRL.styles.div
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
id: 'taberareloo_list'
id: 'taberareloo_list', style: TBRL.styles.ol
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
'class': 'taberareloo_button'
'class': 'taberareloo_button', 'style': TBRL.styles.button
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
src: ext.ICON }), $N('span', null, ext.name)]);
src: ext.ICON, 'style': TBRL.styles.img }), $N('span', { 'style': TBRL.styles.span }, ext.name)]);
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
'class': 'taberareloo_item'
'class': 'taberareloo_item', 'style': TBRL.styles.li
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/);
let [, head, tail] = /([^[]+)(?:\[(.*)])?/.exec(spec);
return this.specs.some(function (spec) { let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/); return name.indexOf(head) == 0 && (head + (tail || "")).indexOf(name) == 0; });
dojoContents = dojoContents.replace(provideRegExp, function(s, p1){ if(p1){ var ret = ""; p1 = p1.slice(1, -1); var splits = p1.split("."); splits.forEach(function(i, idx, a){ var simpleShortName = a.slice(0, idx+1).join("."); var shortName = a[0]; for(var x=1; x<(idx+1); x++){ if(a[x].indexOf("-") >= 0){ shortName += '["'+a[x]+'"]'; }else{ shortName += "."+a[x]; } } if(!seenProvides[simpleShortName]){ seenProvides[simpleShortName] = true; if(idx == 0){ ret += 'if(typeof ' + shortName + '=="undefined"){' + shortName + '={};};'; }else{ ret += shortName+'='+shortName+'||{};'; } } if(idx == (a.length-1)){ ret += 'dojo._loadedModules["'+simpleShortName+'"] = '+shortName+';'; } }); return ret; }else{ return s; } });
dojo["eval"] = function(){ return true; }
dojoContents = dojoContents.replace(provideRegExp, function(s, p1){ if(p1){ var ret = ""; p1 = p1.slice(1, -1); // trim the " or ' chars var splits = p1.split("."); splits.forEach(function(i, idx, a){ var simpleShortName = a.slice(0, idx+1).join("."); var shortName = a[0]; for(var x=1; x<(idx+1); x++){ if(a[x].indexOf("-") >= 0){ shortName += '["'+a[x]+'"]'; }else{ shortName += "."+a[x]; } } // make sure that if, in a given module, we've already seen a // parent that we don't re-generate its stub detection if(!seenProvides[simpleShortName]){ seenProvides[simpleShortName] = true; if(idx == 0){ ret += 'if(typeof ' + shortName + '=="undefined"){' + shortName + '={};};'; }else{ ret += shortName+'='+shortName+'||{};'; } } // at the last one? if(idx == (a.length-1)){ // register in _loadedModules: ret += 'dojo._loadedModules["'+simpleShortName+'"] = '+shortName+';'; } }); return ret; }else{ return s; } });
bookmarks.list(args.join(" "), args["-tags"] || [], args.bang, args["-max"]);
bookmarks.list(args.join(" "), args["-tags"] || [], args.bang, args["-max"], { keyword: args["-keyword"], title: args["-title"] });
function (args) { bookmarks.list(args.join(" "), args["-tags"] || [], args.bang, args["-max"]); },
var toggleElement = this.visTypeToggleElements.filter(function(el) { return el.visType == this.visualizations[i].type.value; } )[0];
var toggleElement = this.visTypeToggleElements.filter(function(el) { return el.visType == visualization.type.value; } )[0];
var toggleElement = this.visTypeToggleElements.filter(function(el) { return el.visType == this.visualizations[i].type.value; } )[0];
e.disabled = false;
$$("input[type=\"checkbox\"]").each(function(e) { e.checked = false; e.observe("change", function(ev) { if (ev.element().checked && !$(ev.element().readAttribute("chip") + "_target").visible()) { $(ev.element().readAttribute("chip") + "_target").show() } else if (!ev.element().checked && $(ev.element().readAttribute("chip") + "_target").visible()) { // Make sure no other elements with that chip are checked before hiding var nChecked = false; $$("input[chip=\"" + ev.element().readAttribute("chip") + "\"]").each(function(el) { if (el.checked) { nChecked = true; throw $break; } }); // Hide the element if (!nChecked) $(ev.element().readAttribute("chip") + "_target").hide(); } }); });
connect(window, 'onDOMContentLoaded', window, function(ev){ getSelected().addCallback(function(tab){
getSelected().addCallback(function(tab){
connect(window, 'onDOMContentLoaded', window, function(ev){ getSelected().addCallback(function(tab){ if(isPopup && background.TBRL.Popup.contents[tab.url]){ main.callback(background.TBRL.Popup.contents[tab.url]); } else if(window.ps){ main.callback(window.ps); } else { getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); } });});
} else if(window.ps){ main.callback(window.ps); } else {
} else if(isPopup){
connect(window, 'onDOMContentLoaded', window, function(ev){ getSelected().addCallback(function(tab){ if(isPopup && background.TBRL.Popup.contents[tab.url]){ main.callback(background.TBRL.Popup.contents[tab.url]); } else if(window.ps){ main.callback(window.ps); } else { getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); } });});
let files = findHelpFile("all").map(function (doc) [f.value for (f in util.evaluateXPath("
array.flatten(files).forEach(function (file) { tagMap[file + ".xml"] = file; findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); });
let files = findHelpFile("all").map(function (doc) [f.value for (f in util.evaluateXPath("//dactyl:include/@href", doc))]);
self.element.find("[type='checkbox']").each(function(key,value){ var id = $(value).val(); if(self.checked_list[id]){ $(event.target).find("[type='checkbox']").each(function(){
$(event.target).find("[type='checkbox']").each(function(){
self.element.find("[type='checkbox']").each(function(key,value){ var id = $(value).val(); if(self.checked_list[id]){ $(event.target).find("[type='checkbox']").each(function(){ if($(this).val() === id){ $(this).attr('checked',true); } }) } })
} })
self.element.find("[type='checkbox']").each(function(key,value){ var id = $(value).val(); if(self.checked_list[id]){ $(event.target).find("[type='checkbox']").each(function(){ if($(this).val() === id){ $(this).attr('checked',true); } }) } })
commands.forEach(function (cmd) editor.executeCommand(cmd, 1)); modes.set(modes.INSERT, modes.TEXTAREA); });
if (typeof count != "number" || count < 1) count = 1; editor.executeCommand(textareaCommand, count); },
function (count) { commands.forEach(function (cmd) editor.executeCommand(cmd, 1)); modes.set(modes.INSERT, modes.TEXTAREA); });
post: args["-post"] || null,
post: args["-post"],
function (args) { let opts = { force: args.bang, starOnly: false, keyword: args["-keyword"] || null, post: args["-post"] || null, tags: args["-tags"] || [], title: args["-title"] || (args.length === 0 ? buffer.title : null), url: args.length === 0 ? buffer.URL : args[0] }; if (bookmarks.add(opts)) { let extra = (opts.title == opts.url) ? "" : " (" + opts.title + ")"; dactyl.echomsg({ domains: [util.getHost(opts.url)], message: "Added bookmark: " + opts.url + extra }, 1, commandline.FORCE_SINGLELINE); } else dactyl.echoerr("Exxx: Could not add bookmark " + opts.title.quote(), commandline.FORCE_SINGLELINE); }, {
$(this).find('#left_button').click(function(){ security_group.rightToLeft(); });
$(self).find('#left_button').click(function(){ security_group.rightToLeft(); });
$(this).find('#left_button').click(function(){ security_group.rightToLeft(); });
buffer.viewSource([elem.getAttribute("href"), Number(elem.getAttribute("line"))])
buffer.viewSource([elem.getAttribute("href"), Number(elem.getAttribute("line"))]);
dactyl.commands["buffer.viewSource"] = function (event) { let elem = event.originalTarget; buffer.viewSource([elem.getAttribute("href"), Number(elem.getAttribute("line"))]) };
return this.getForm(endpoint).addCallback(function(form){ return update({ type : form['post[type]'], item : ctx.title, itemUrl : ctx.href, favorite : { name : 'Tumblr', endpoint : endpoint, form : form } }, self.convertToParams(form)); });
return request(url+'/text').addCallback(function(res){ var textDoc = createHTML(res.responseText); var textForm = formContents($X(' delete textForm.preview_post; textForm.redirect_to = self.TUMBLR_URL+'dashboard'; return textForm; });
return this.getForm(endpoint).addCallback(function(form){ return update({ type : form['post[type]'], item : ctx.title, itemUrl : ctx.href, favorite : { name : 'Tumblr', endpoint : endpoint, form : form } }, self.convertToParams(form)); });
return this.withTempFiles(function (stdin, stdout, cmd) { if (input) stdin.write(input); if (dactyl.has("WINNT")) { command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path; var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true); } else { cmd.write("cd " + escape(this.cwd) + "\n" + ["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path), escape(options["shell"]), options["shellcmdflag"], escape(command)].join(" ")); res = this.run("/bin/sh", ["-e", cmd.path], true); } let output = stdout.read(); if (res > 0) output += "\nshell returned " + res; else if (output && output.indexOf("\n") == output.length - 1) output = output.substr(0, output.length - 1); return output; }) || "";
args.forEach(function (f) f.remove(false));
return this.withTempFiles(function (stdin, stdout, cmd) { if (input) stdin.write(input); // TODO: implement 'shellredir' if (dactyl.has("WINNT")) { command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path; var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true); } else { cmd.write("cd " + escape(this.cwd) + "\n" + ["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path), escape(options["shell"]), options["shellcmdflag"], escape(command)].join(" ")); res = this.run("/bin/sh", ["-e", cmd.path], true); } let output = stdout.read(); if (res > 0) output += "\nshell returned " + res; // if there is only one \n at the end, chop it off else if (output && output.indexOf("\n") == output.length - 1) output = output.substr(0, output.length - 1); return output; }) || "";
setTimeout(function(){ SC.Animatable.timeout(); }, SC.Animatable.interval);
SC.run(function() { this.inLoopAction(); }, this);
setTimeout(function(){ SC.Animatable.timeout(); }, SC.Animatable.interval);
c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); });
$.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/security_groups/detail/',check_id) },true); });
c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); });
dactyl.execute(args[0], null, true);
dactyl.execute(args[0] || "", null, true);
function (args) { for (let i = 0; i < tabs.count; i++) { tabs.select(i); dactyl.execute(args[0], null, true); } }, {
return this.withTempFiles(function (stdin, stdout, cmd) { if (input instanceof File) stdin = input; else if (input) stdin.write(input);
this.withSavedValues(["sourcing"], function () { this.sourcing = null; try { var file = util.getFile(filename) || io.File(filename);
return this.withTempFiles(function (stdin, stdout, cmd) { if (input instanceof File) stdin = input; else if (input) stdin.write(input); let shell = File.expandPath(options["shell"]); // TODO: implement 'shellredir' if (util.OS.isWindows && !/sh/.test(options["shell"])) { command = "cd /D " + this.cwd + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path; var res = this.run(shell, options["shellcmdflag"].split(/\s+/).concat(command), true); } else { cmd.write("cd " + escape(this.cwd) + "\n" + ["exec", ">" + escape(stdout.path), "2>&1", "<" + escape(stdin.path), escape(shell), options["shellcmdflag"], escape(command)].join(" ")); res = this.run("/bin/sh", ["-e", cmd.path], true); } let output = stdout.read(); if (res > 0) output += "\nshell returned " + res; else if (output) output = output.replace(/^(.*)\n$/, "$1"); return output; }) || "";
list_request.data = DcmgrGUI.Util.getPagenateData(c_list.page,c_list.maxrow)
list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
bt_refresh.element.bind('dcmgrGUI.refresh',function(){ c_list.page = c_pagenate.current_page; list_request.url = DcmgrGUI.Util.getPagePath('/snapshots/list/',c_list.page); list_request.data = DcmgrGUI.Util.getPagenateData(c_list.page,c_list.maxrow) c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/snapshots/show/',check_id) },true); }); });
dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); });
let special = args.bang; let count = args.count; let arg = args[0] || ""; if (arg) { let removed = 0; let matches = arg.match(/^(\d+):?/); if (matches) { config.removeTab(tabs.getTab(parseInt(matches[1], 10) - 1)); removed = 1; } else { let str = arg.toLowerCase(); let browsers = config.tabbrowser.browsers; for (let i = browsers.length - 1; i >= 0; i--) { let host, title, uri = browsers[i].currentURI.spec; if (browsers[i].currentURI.schemeIs("about")) { host = ""; title = "(Untitled)"; } else { host = browsers[i].currentURI.host; title = browsers[i].contentTitle; } [host, title, uri] = [host, title, uri].map(String.toLowerCase); if (host.indexOf(str) >= 0 || uri == str || (special && (title.indexOf(str) >= 0 || uri.indexOf(str) >= 0))) { config.removeTab(tabs.getTab(i)); removed++; } } } if (removed > 0) dactyl.echomsg(removed + " fewer tab(s)", 9); else dactyl.echoerr("E94: No matching tab for " + arg); } else tabs.remove(tabs.getTab(), Math.max(count, 1), special);
function (args) { dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); }); }, {
function (o) { var s = "["; for (var i=0; i<o.length; i++) { s += doctest.repr(o[i]); if (i != o.length-1) { s += ", "; }
[function (o) { var typ = typeof o; if ((typ != 'object' && ! (type == 'function' && typeof o.item == 'function')) || o === null || typeof o.length != 'number' || o.nodeType === 3) { return false;
function (o) { var s = "["; for (var i=0; i<o.length; i++) { s += doctest.repr(o[i]); if (i != o.length-1) { s += ", "; } } s += "]"; return s; }]];
s += "]"; return s; }]];
return true; },
function (o) { var s = "["; for (var i=0; i<o.length; i++) { s += doctest.repr(o[i]); if (i != o.length-1) { s += ", "; } } s += "]"; return s; }]];
function () { commandline.open(":", "tabopen ", modes.EX); });
function () { commandline.open("", "tabopen ", modes.EX); });
function () { commandline.open(":", "tabopen ", modes.EX); });
a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
Ci.nsIFilePicker.modeGetFolder);
Components.interfaces.nsIFilePicker.modeGetFolder);
function() { var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select a directory to store optomized results', Ci.nsIFilePicker.modeGetFolder); // Set the start directory to the user's desktop dir, if it was // found above. var desktopDir = outputDirOptions['Desktop']['file']; if (desktopDir) { fp.displayDirectory = desktopDir; } if (fp.show() != Ci.nsIFilePicker.returnOK) { // User canceled. Don't change the pref. return; } PAGESPEED.Utils.setOutputDir(fp.file); },
if (fp.show() != Ci.nsIFilePicker.returnOK) {
if (fp.show() != Components.interfaces.nsIFilePicker.returnOK) {
function() { var fp = PAGESPEED.Utils.CCIN( '@mozilla.org/filepicker;1', 'nsIFilePicker'); fp.init(window, 'Select a directory to store optomized results', Ci.nsIFilePicker.modeGetFolder); // Set the start directory to the user's desktop dir, if it was // found above. var desktopDir = outputDirOptions['Desktop']['file']; if (desktopDir) { fp.displayDirectory = desktopDir; } if (fp.show() != Ci.nsIFilePicker.returnOK) { // User canceled. Don't change the pref. return; } PAGESPEED.Utils.setOutputDir(fp.file); },
for (let i = 0; i < tabs.count; i++) { tabs.select(i);
try { var force = dactyl.forceNewTab; dactyl.forceNewTab = true;
function (args) { for (let i = 0; i < tabs.count; i++) { tabs.select(i); dactyl.execute(args[0], null, true); } }, {
finally { dactyl.forceNewTab = force; }
function (args) { for (let i = 0; i < tabs.count; i++) { tabs.select(i); dactyl.execute(args[0], null, true); } }, {
return request(link).addCallback(function(res){ var text = res.responseText; var doc = createHTML(res.responseText); ctx.href = link; var m = text.match(/<title(?:\s[^>]+?)?>([\S\s]*?)<\/title\s*>/i); ctx.title = ((m)? m[1] : '').replace(/[\n\r]/g, ''); return self.extractByPage(ctx, doc);
return this.getForm(endpoint).addCallback(function(form){ return update({ type : form['post[type]'], item : ctx.title, itemUrl : ctx.href, favorite : { name : 'Tumblr', endpoint : endpoint, form : form } }, self.convertToParams(form));
return request(link).addCallback(function(res){ var text = res.responseText; var doc = createHTML(res.responseText); ctx.href = link; var m = text.match(/<title(?:\s[^>]+?)?>([\S\s]*?)<\/title\s*>/i); ctx.title = ((m)? m[1] : '').replace(/[\n\r]/g, ''); return self.extractByPage(ctx, doc); });
(function (index) { pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + 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(q, function (k, e) { if (e.end == b[i]) { r = {ikey: e.ikey.concat([kw]), start: e.start, end: b[j]}; me._registerQuery(r); if (r.ikey.length < maxKeyLength) s.push(r);
(function (index) { //Logger.debug("pending: " + index); pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.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, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 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(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } });
(function (index) { //Logger.debug("pending: " + index); pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.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, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } }); })(k);
var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } }); })(k);
(function (index) { //Logger.debug("pending: " + index); pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.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, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } }); })(k);
.addCallback(function(ps){ TBRL.openQuickPostForm(ps);
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); }
.addCallback(function(ps){ TBRL.openQuickPostForm(ps); });
test("invokes render() passing context & firstTime", function() {
test("adds hidden class if view isVisible = NO", function() {
test("invokes render() passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; var view = SC.View.create({ render: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 1, 'did invoke render()'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 1, 'did invoke render()');});
var runCount = 0; var context, isFirstTime ; var view = SC.View.create({ render: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }) ;
var view = SC.View.create() ; var context ;
test("invokes render() passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; var view = SC.View.create({ render: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 1, 'did invoke render()'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 1, 'did invoke render()');});
isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 1, 'did invoke render()'); runCount = 0 ;
view.set('isVisible', YES); view.prepareContext(context, YES); ok(!context.hasClass('hidden'), 'should NOT have hidden class');
test("invokes render() passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; var view = SC.View.create({ render: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 1, 'did invoke render()'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 1, 'did invoke render()');});