rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
})).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res);
}).addCallback(function(res){ return res[hash].longUrl;
})).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); return text; });
return text; });
})).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); return text; });
return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); });
util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, false); services.get("environment").set("MY_" + config.idName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.cwd); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); } catch (e) { dactyl.reportError(e, true); } for (let option in values(options.needInit)) option.initValue(); if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) {
dactyl.commandLineOptions.postCommands.forEach(function (cmd) {
util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, false); services.get("environment").set("MY_" + config.idName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.cwd); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); } catch (e) { dactyl.reportError(e, true); } // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in values(options.needInit)) option.initValue(); if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, false); services.get("environment").set("MY_" + config.idName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.cwd); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); } catch (e) { dactyl.reportError(e, true); } // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in values(options.needInit)) option.initValue(); if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
function (count) { buffer.fullZoom = count > 1 ? count : 100; },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) },
function (count) { buffer.fullZoom = count > 1 ? count : 100; },
return request(url).addCallback(function(res) { var doc = createHTML(res.responseText); var form = $X(' if(form.action === '/bookmarklet/account/login'){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } else { return formContents(form); }
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value;
return request(url).addCallback(function(res) { var doc = createHTML(res.responseText); var form = $X('//form', doc)[0]; if(form.action === '/bookmarklet/account/login'){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } else { return formContents(form); } });
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res);
}).addCallback(function(res){ res = JSON.parse('(' + res.responseText + ')'); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results;
zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); });
Event.Methods = (function() { var isButton; if (Prototype.Browser.IE) { var buttonMap = { 0: 1, 1: 4, 2: 2 }; isButton = function(event, code) { return event.button == buttonMap[code]; }; } else if (Prototype.Browser.WebKit) { isButton = function(event, code) { switch (code) { case 0: return event.which == 1 && !event.metaKey; case 1: return event.which == 1 && event.metaKey; default: return false; } }; } else { isButton = function(event, code) { return event.which ? (event.which === code + 1) : (event.button === code); }; } return { isLeftClick: function(event) { return isButton(event, 0) }, isMiddleClick: function(event) { return isButton(event, 1) }, isRightClick: function(event) { return isButton(event, 2) }, element: function(event) { event = Event.extend(event); var node = event.target, type = event.type, currentTarget = event.currentTarget; if (currentTarget && currentTarget.tagName) { if (type === 'load' || type === 'error' || (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' && currentTarget.type === 'radio')) node = currentTarget; } if (node.nodeType == Node.TEXT_NODE) node = node.parentNode; return Element.extend(node); }, findElement: function(event, expression) { var element = Event.element(event); if (!expression) return element; var elements = [element].concat(element.ancestors()); return Selector.findElement(elements, expression, 0); }, pointer: function(event) { var docElement = document.documentElement, body = document.body || { scrollLeft: 0, scrollTop: 0 }; return { x: event.pageX || (event.clientX + (docElement.scrollLeft || body.scrollLeft) - (docElement.clientLeft || 0)), y: event.pageY || (event.clientY + (docElement.scrollTop || body.scrollTop) - (docElement.clientTop || 0)) }; }, pointerX: function(event) { return Event.pointer(event).x }, pointerY: function(event) { return Event.pointer(event).y }, stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped = true; } }; })();
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])*?\*\
Event.Methods = (function() { var isButton; if (Prototype.Browser.IE) { var buttonMap = { 0: 1, 1: 4, 2: 2 }; isButton = function(event, code) { return event.button == buttonMap[code]; }; } else if (Prototype.Browser.WebKit) { isButton = function(event, code) { switch (code) { case 0: return event.which == 1 && !event.metaKey; case 1: return event.which == 1 && event.metaKey; default: return false; } }; } else { isButton = function(event, code) { return event.which ? (event.which === code + 1) : (event.button === code); }; } return { isLeftClick: function(event) { return isButton(event, 0) }, isMiddleClick: function(event) { return isButton(event, 1) }, isRightClick: function(event) { return isButton(event, 2) }, element: function(event) { event = Event.extend(event); var node = event.target, type = event.type, currentTarget = event.currentTarget; if (currentTarget && currentTarget.tagName) { // Firefox screws up the "click" event when moving between radio buttons // via arrow keys. It also screws up the "load" and "error" events on images, // reporting the document as the target instead of the original image. if (type === 'load' || type === 'error' || (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' && currentTarget.type === 'radio')) node = currentTarget; } if (node.nodeType == Node.TEXT_NODE) node = node.parentNode; return Element.extend(node); }, findElement: function(event, expression) { var element = Event.element(event); if (!expression) return element; var elements = [element].concat(element.ancestors()); return Selector.findElement(elements, expression, 0); }, pointer: function(event) { var docElement = document.documentElement, body = document.body || { scrollLeft: 0, scrollTop: 0 }; return { x: event.pageX || (event.clientX + (docElement.scrollLeft || body.scrollLeft) - (docElement.clientLeft || 0)), y: event.pageY || (event.clientY + (docElement.scrollTop || body.scrollTop) - (docElement.clientTop || 0)) }; }, pointerX: function(event) { return Event.pointer(event).x }, pointerY: function(event) { return Event.pointer(event).y }, stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped = true; } };})();
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value;
return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: form });
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value; });
io.source(localRCFile.path, true);
io.source(localRCFile.path, false);
util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, false); services.get("environment").set("MY_" + config.idName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.cwd); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); } catch (e) { dactyl.reportError(e, true); } // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in values(options.needInit)) option.initValue(); if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === m.name) || (m.check && m.check(ps))) return true; });
return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){
return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === m.name) || (m.check && m.check(ps))) return true; });
Event.extend = (function() { var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] = Event.Methods[name].methodize(); return m; }); if (Prototype.Browser.IE) { Object.extend(methods, { stopPropagation: function() { this.cancelBubble = true }, preventDefault: function() { this.returnValue = false }, inspect: function() { return "[object Event]" } }); return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype = Prototype.emptyFunction; var pointer = Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); }; } else { Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__']; Object.extend(Event.prototype, methods); return Prototype.K; } })();
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])*?\*\
Event.extend = (function() { var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] = Event.Methods[name].methodize(); return m; }); if (Prototype.Browser.IE) { Object.extend(methods, { stopPropagation: function() { this.cancelBubble = true }, preventDefault: function() { this.returnValue = false }, inspect: function() { return "[object Event]" } }); return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype = Prototype.emptyFunction; var pointer = Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); }; } else { Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__']; Object.extend(Event.prototype, methods); return Prototype.K; }})();
return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: form });
d.addCallback(function(res) { var doc = createHTML(res.responseText); if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X(' throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); }
return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: form }); });
return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps) === 'default';
})).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); return text;
return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps) === 'default'; });
var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] = Event.Methods[name].methodize(); return m; });
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])*?\*\
var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { m[name] = Event.Methods[name].methodize(); return m; });
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) },
function (count) { buffer.zoomOut(Math.max(count, 1) * 3, true); },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) },
function (args) { Buffer.setZoom(args.count > 1 ? count : 100, false); },
function (args) { Buffer.setZoom(args.count > 1 ? args.count : 100, false); },
function (args) { Buffer.setZoom(args.count > 1 ? count : 100, false); },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true); },
function (count) { buffer.zoomOut(Math.max(count, 1) * 3, true); },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true); },
d.addCallback(function(res) {
return request(this.LINK).addCallback(function(res){
d.addCallback(function(res) { var doc = createHTML(res.responseText); if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X('
if(!($X('descendant::div[contains(concat(" ",normalize-space(@class)," ")," userbox ")]', doc)[0])){
d.addCallback(function(res) { var doc = createHTML(res.responseText); if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
var form = formContents($X('descendant::form[@action="/gists"]', doc)[0]); var content; switch(ps.type){ case 'regular': content = ps.description; break; case 'quote': content = joinText([ps.body, '', ps.itemUrl, '', ps.description], '\n\n'); break; } form['file_contents[gistfile1]'] = content; form['file_name[gistfile1]'] = ps.item; delete form['action_button']; return request(self.LINK+'gists', { sendContent: form });
d.addCallback(function(res) { var doc = createHTML(res.responseText); if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps); return val === undefined || /default|enabled/.test(val); });
zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); });
return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps); return val === undefined || /default|enabled/.test(val); });
this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0);
template.map(util.range(0, options["maxitems"] * 2), function (i) <div highlight="CompItem NonText"> <li>~</li> </div>)
this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0);
return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype = Prototype.emptyFunction; var pointer = Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); };
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
return function(event) { if (!event) return false; if (event._extendedByPrototype) return event; event._extendedByPrototype = Prototype.emptyFunction; var pointer = Event.pointer(event); Object.extend(event, { target: event.srcElement, relatedTarget: Event.relatedTarget(event), pageX: pointer.x, pageY: pointer.y }); return Object.extend(event, methods); };
function (count) { buffer.showPageInfo(false); },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) },
function (count) { buffer.showPageInfo(false); },
function (count) { buffer.showPageInfo(false); },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true); },
function (count) { buffer.showPageInfo(false); },
return request(this.LINK).addCallback(function(res){ var doc = createHTML(res.responseText); if(!($X('descendant::div[contains(concat(" ",normalize-space(@class)," ")," userbox ")]', doc)[0])){
return request(this.TOKEN_URL, { headers : { 'Accept': 'application/json' }}).addCallback(function(res) { var data = JSON.parse(res.responseText); if (!data['apiToken']) { delete self['apiToken'];
return request(this.LINK).addCallback(function(res){ var doc = createHTML(res.responseText); if(!($X('descendant::div[contains(concat(" ",normalize-space(@class)," ")," userbox ")]', doc)[0])){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } var form = formContents($X('descendant::form[@action="/gists"]', doc)[0]); var content; switch(ps.type){ case 'regular': content = ps.description; break; case 'quote': content = joinText([ps.body, '', ps.itemUrl, '', ps.description], '\n\n'); break; } form['file_contents[gistfile1]'] = content; form['file_name[gistfile1]'] = ps.item; // public delete form['action_button']; return request(self.LINK+'gists', { sendContent: form }); });
var form = formContents($X('descendant::form[@action="/gists"]', doc)[0]); var content; switch(ps.type){ case 'regular': content = ps.description; break; case 'quote': content = joinText([ps.body, '', ps.itemUrl, '', ps.description], '\n\n'); break; } form['file_contents[gistfile1]'] = content; form['file_name[gistfile1]'] = ps.item; delete form['action_button']; return request(self.LINK+'gists', { sendContent: form });
self.apiToken = data['apiToken']; return self.apiToken;
return request(this.LINK).addCallback(function(res){ var doc = createHTML(res.responseText); if(!($X('descendant::div[contains(concat(" ",normalize-space(@class)," ")," userbox ")]', doc)[0])){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } var form = formContents($X('descendant::form[@action="/gists"]', doc)[0]); var content; switch(ps.type){ case 'regular': content = ps.description; break; case 'quote': content = joinText([ps.body, '', ps.itemUrl, '', ps.description], '\n\n'); break; } form['file_contents[gistfile1]'] = content; form['file_name[gistfile1]'] = ps.item; // public delete form['action_button']; return request(self.LINK+'gists', { sendContent: form }); });
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === m.name) || (m.check && m.check(ps))) return true; });
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
Object.extend(Event, (function() { var cache = Event.cache; function getEventID(element) { if (element._prototypeEventID) return element._prototypeEventID[0]; arguments.callee.id = arguments.callee.id || 1; return element._prototypeEventID = [++arguments.callee.id]; } function getDOMEventName(eventName) { if (eventName && eventName.include(':')) return "dataavailable"; return eventName; } function getCacheForID(id) { return cache[id] = cache[id] || { }; } function getWrappersForEventName(id, eventName) { var c = getCacheForID(id); return c[eventName] = c[eventName] || []; } function createWrapper(element, eventName, handler) { var id = getEventID(element); var c = getWrappersForEventName(id, eventName); if (c.pluck("handler").include(handler)) return false; var wrapper = function(event) { if (!Event || !Event.extend || (event.eventName && event.eventName != eventName)) return false; Event.extend(event); handler.call(element, event); }; wrapper.handler = handler; c.push(wrapper); return wrapper; } function findWrapper(id, eventName, handler) { var c = getWrappersForEventName(id, eventName); return c.find(function(wrapper) { return wrapper.handler == handler }); } function destroyWrapper(id, eventName, handler) { var c = getCacheForID(id); if (!c[eventName]) return false; c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); } function destroyCache() { for (var id in cache) for (var eventName in cache[id]) cache[id][eventName] = null; } if (window.attachEvent) { window.attachEvent("onunload", destroyCache); } if (Prototype.Browser.WebKit) { window.addEventListener('unload', Prototype.emptyFunction, false); } return { observe: function(element, eventName, handler) { element = $(element); var name = getDOMEventName(eventName); var wrapper = createWrapper(element, eventName, handler); if (!wrapper) return element; if (element.addEventListener) { element.addEventListener(name, wrapper, false); } else { element.attachEvent("on" + name, wrapper); } return element; }, stopObserving: function(element, eventName, handler) { element = $(element); var id = getEventID(element), name = getDOMEventName(eventName); if (!handler && eventName) { getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); }); return element; } else if (!eventName) { Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); }); return element; } var wrapper = findWrapper(id, eventName, handler); if (!wrapper) return element; if (element.removeEventListener) { element.removeEventListener(name, wrapper, false); } else { element.detachEvent("on" + name, wrapper); } destroyWrapper(id, eventName, handler); return element; }, fire: function(element, eventName, memo) { element = $(element); if (element == document && document.createEvent && !element.dispatchEvent) element = document.documentElement; var event; if (document.createEvent) { event = document.createEvent("HTMLEvents"); event.initEvent("dataavailable", true, true); } else { event = document.createEventObject(); event.eventType = "ondataavailable"; } event.eventName = eventName; event.memo = memo || { }; if (document.createEvent) { element.dispatchEvent(event); } else { element.fireEvent(event.eventType, event); } return Event.extend(event); } }; })());
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])*?\*\
Object.extend(Event, (function() { var cache = Event.cache; function getEventID(element) { if (element._prototypeEventID) return element._prototypeEventID[0]; arguments.callee.id = arguments.callee.id || 1; return element._prototypeEventID = [++arguments.callee.id]; } function getDOMEventName(eventName) { if (eventName && eventName.include(':')) return "dataavailable"; return eventName; } function getCacheForID(id) { return cache[id] = cache[id] || { }; } function getWrappersForEventName(id, eventName) { var c = getCacheForID(id); return c[eventName] = c[eventName] || []; } function createWrapper(element, eventName, handler) { var id = getEventID(element); var c = getWrappersForEventName(id, eventName); if (c.pluck("handler").include(handler)) return false; var wrapper = function(event) { if (!Event || !Event.extend || (event.eventName && event.eventName != eventName)) return false; Event.extend(event); handler.call(element, event); }; wrapper.handler = handler; c.push(wrapper); return wrapper; } function findWrapper(id, eventName, handler) { var c = getWrappersForEventName(id, eventName); return c.find(function(wrapper) { return wrapper.handler == handler }); } function destroyWrapper(id, eventName, handler) { var c = getCacheForID(id); if (!c[eventName]) return false; c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); } function destroyCache() { for (var id in cache) for (var eventName in cache[id]) cache[id][eventName] = null; } // Internet Explorer needs to remove event handlers on page unload // in order to avoid memory leaks. if (window.attachEvent) { window.attachEvent("onunload", destroyCache); } // Safari has a dummy event handler on page unload so that it won't // use its bfcache. Safari <= 3.1 has an issue with restoring the "document" // object when page is returned to via the back button using its bfcache. if (Prototype.Browser.WebKit) { window.addEventListener('unload', Prototype.emptyFunction, false); } return { observe: function(element, eventName, handler) { element = $(element); var name = getDOMEventName(eventName); var wrapper = createWrapper(element, eventName, handler); if (!wrapper) return element; if (element.addEventListener) { element.addEventListener(name, wrapper, false); } else { element.attachEvent("on" + name, wrapper); } return element; }, stopObserving: function(element, eventName, handler) { element = $(element); var id = getEventID(element), name = getDOMEventName(eventName); if (!handler && eventName) { getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); }); return element; } else if (!eventName) { Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); }); return element; } var wrapper = findWrapper(id, eventName, handler); if (!wrapper) return element; if (element.removeEventListener) { element.removeEventListener(name, wrapper, false); } else { element.detachEvent("on" + name, wrapper); } destroyWrapper(id, eventName, handler); return element; }, fire: function(element, eventName, memo) { element = $(element); if (element == document && document.createEvent && !element.dispatchEvent) element = document.documentElement; var event; if (document.createEvent) { event = document.createEvent("HTMLEvents"); event.initEvent("dataavailable", true, true); } else { event = document.createEventObject(); event.eventType = "ondataavailable"; } event.eventName = eventName; event.memo = memo || { }; if (document.createEvent) { element.dispatchEvent(event); } else { element.fireEvent(event.eventType, event); } return Event.extend(event); } };})());
return request(this.HOME_URL).addCallback(function(res) { var login = res.responseText.extract(/(span class="logout")/); if (!login) {
return request(this.TOKEN_URL, { headers : { 'Accept': 'application/json' }}).addCallback(function(res) { var data = JSON.parse(res.responseText); if (!data['apiToken']) { delete self['apiToken'];
return request(this.HOME_URL).addCallback(function(res) { var login = res.responseText.extract(/(span class="logout")/); if (!login) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return true; });
return true;
self.apiToken = data['apiToken']; return self.apiToken;
return request(this.HOME_URL).addCallback(function(res) { var login = res.responseText.extract(/(span class="logout")/); if (!login) { throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } return true; });
return request(this.TOKEN_URL, { headers : { 'Accept': 'application/json' }}).addCallback(function(res) { var data = JSON.parse(res.responseText); if (!data['apiToken']) { delete self['apiToken']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } self.apiToken = data['apiToken']; return self.apiToken;
return this.getToken().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "¥n", true), ps);
return request(this.TOKEN_URL, { headers : { 'Accept': 'application/json' }}).addCallback(function(res) { var data = JSON.parse(res.responseText); if (!data['apiToken']) { delete self['apiToken']; throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } self.apiToken = data['apiToken']; return self.apiToken; });
e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&& B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; });
return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps) === 'default'; });
return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; });
return c.find(function(wrapper) { return wrapper.handler == handler });
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
return c.find(function(wrapper) { return wrapper.handler == handler });
return this.checkAuth().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "\n", true), ps);
return this.getToken().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "¥n", true), ps);
return this.checkAuth().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "\n", true), ps); });
return this.getToken().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "¥n", true), ps); });
).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type === 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json', 'Api-Token': self.apiToken }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); })
return this.getToken().addCallback(function(ok) { return self.update(joinText([ps.body, ps.description], "¥n", true), ps); });
addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; });
return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps); return val === undefined || /default|enabled/.test(val); });
addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; });
getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); });
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])*?\*\
getWrappersForEventName(id, eventName).each(function(wrapper) { element.stopObserving(eventName, wrapper.handler); });
if (ps.type == 'photo') {
if (ps.type === 'photo') {
).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type == 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json' }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); })
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json'
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json', 'Api-Token': self.apiToken
).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type == 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json' }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); })
).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type === 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json', 'Api-Token': self.apiToken }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); })
}).addCallback(function(res){ });
).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type === 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json', 'Api-Token': self.apiToken }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); })
}).addErrback(function(e){ alert('Multiple Tumblelog'+ ': ' + (e.message.status ? '\n' + ('HTTP Status Code ' + e.message.status).indent(4) : '\n' + e.message.indent(4))); });
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
}).addErrback(function(e){ alert('Multiple Tumblelog'+ ': ' + (e.message.status ? '\n' + ('HTTP Status Code ' + e.message.status).indent(4) : '\n' + e.message.indent(4))); });
Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); });
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])*?\*\
Object.keys(getCacheForID(id)).each(function(eventName) { element.stopObserving(eventName); });
this.execute(args[0] || "", null, true);
commands.execute(args[0] || "", null, true);
dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); });
equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
test("changing value from full -> negative number", function() { var view = pane.view('progress basic value 100'); SC.RunLoop.begin(); view.set('value', 100); SC.RunLoop.end(); SC.RunLoop.begin(); view.set('value', -10); SC.RunLoop.end(); equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'); var assertions = function(){ equals(view.$('.sc-inner').width(), 0, 'pixel width '); start(); }; stop(); setTimeout(assertions, 200);});
function (arg) { quickmarks.jumpTo(arg, /\bquickmark\b/.test(options["activate"]) ? dactyl.NEW_TAB : dactyl.NEW_BACKGROUND_TAB); },
function (arg) { quickmarks.jumpTo(arg, { from: "quickmark", where: dactyl.NEW_TAB }); },
function (arg) { quickmarks.jumpTo(arg, /\bquickmark\b/.test(options["activate"]) ? dactyl.NEW_TAB : dactyl.NEW_BACKGROUND_TAB); },
if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true);
if (arg || count > 0) { let index; if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; }
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim 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); }, {
dactyl.echoerr("E488: Trailing characters");
index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep();
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim 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); }, {
else if (count > 0) tabs.select("-" + count, true);
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim 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); }, {
tabs.select("-1", true);
tabs.select("+1", true);
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim 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); }, {
return binaryRequest(url, opt).addCallback(function(res){ var binary = res.responseText; var charset = null; var header = res.getResponseHeader('Content-Type'); if(header) charset = getCharset(header); if(!charset) charset = getEncoding(binary); if(!charset) charset = 'utf-8'; return request(url, update({ charset: 'text/html; charset='+charset, }, opt)); });
posters.forEach(function(p){ try{ ds[p.name] = (ps.favorite && RegExp('^' + ps.favorite.name + '(\\s|$)').test(p.name))? p.favor(ps) : p.post(ps); } catch(e){ ds[p.name] = fail(e); } });
return binaryRequest(url, opt).addCallback(function(res){ var binary = res.responseText; var charset = null; var header = res.getResponseHeader('Content-Type'); if(header) charset = getCharset(header); if(!charset) charset = getEncoding(binary); if(!charset) charset = 'utf-8'; return request(url, update({ charset: 'text/html; charset='+charset, }, opt)); });
console.log("START");
this.all.forEach(function(service){ var icon = service.icon; var link = service.link; service = $A(service); servicename = service[0]; self.elements[servicename] = {}; var children = []; if(link){ children.push($N('a', { href: link, target: '_blank' }, $N('img', { src: icon, class: 'service_icon' }))); } else { children.push($N('img', { src: icon, class: 'service_icon' })); } children.push($N('p', { class: 'service_text' }, service[0]+'')); service[0] = $N('td', null, children); var ELMS = Services.ELMS; for(var i = 1, len = service.length; i < len; ++i)(function(item, index){ if(item){ var container = ELMS.container.cloneNode(false); var button = ELMS[item].cloneNode(false); var status = item; container.appendChild(button); service[index] = $N('td', null, [container]); self.elements[servicename][Services.TYPES[index-1]] = button; connect(service[index], 'onclick', service[index], function(ev){ removeElementClass(button, status); if(status === 'enabled'){ status = 'disabled'; } else if(status === 'disabled'){ status = 'default'; } else { status = 'enabled'; } addElementClass(button, status); }); dragger.register(container, { start: function(ev) { console.log("START"); this.status = status; removeElementClass(table, 'normal'); addElementClass(table, status); }, end: function(ev) { this.status = null; removeElementClass(table, status); addElementClass(table, 'normal'); console.log("END"); } }); dragger.dragging(container, function(ev) { if (this.src !== container) { status = this.status; button.setAttribute('class', 'button '+status); } }); } else { self.elements[servicename][Services.TYPES[index-1]] = null; service[index] = $N('td'); } })(service[i], i); var tr = $N('tr', { class: 'service', id: servicename }, service); df.appendChild(tr); });
console.log("END");
this.all.forEach(function(service){ var icon = service.icon; var link = service.link; service = $A(service); servicename = service[0]; self.elements[servicename] = {}; var children = []; if(link){ children.push($N('a', { href: link, target: '_blank' }, $N('img', { src: icon, class: 'service_icon' }))); } else { children.push($N('img', { src: icon, class: 'service_icon' })); } children.push($N('p', { class: 'service_text' }, service[0]+'')); service[0] = $N('td', null, children); var ELMS = Services.ELMS; for(var i = 1, len = service.length; i < len; ++i)(function(item, index){ if(item){ var container = ELMS.container.cloneNode(false); var button = ELMS[item].cloneNode(false); var status = item; container.appendChild(button); service[index] = $N('td', null, [container]); self.elements[servicename][Services.TYPES[index-1]] = button; connect(service[index], 'onclick', service[index], function(ev){ removeElementClass(button, status); if(status === 'enabled'){ status = 'disabled'; } else if(status === 'disabled'){ status = 'default'; } else { status = 'enabled'; } addElementClass(button, status); }); dragger.register(container, { start: function(ev) { console.log("START"); this.status = status; removeElementClass(table, 'normal'); addElementClass(table, status); }, end: function(ev) { this.status = null; removeElementClass(table, status); addElementClass(table, 'normal'); console.log("END"); } }); dragger.dragging(container, function(ev) { if (this.src !== container) { status = this.status; button.setAttribute('class', 'button '+status); } }); } else { self.elements[servicename][Services.TYPES[index-1]] = null; service[index] = $N('td'); } })(service[i], i); var tr = $N('tr', { class: 'service', id: servicename }, service); df.appendChild(tr); });
$(this).parent().slideUp("fast", function () { $(this).remove(); });
$("a.delete-group").live("click", function () { c = confirm('Are you sure you want to delete this group? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(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"); } return false; });
$(this).parent().slideUp("fast", function () { $(this).remove(); });
findHelpFile(file).forEach(function (doc) {
util.Array.flatten(files).forEach(function (file) { findHelpFile(file).forEach(function (doc) {
findHelpFile(file).forEach(function (doc) { addTags(file, doc); });
});
findHelpFile(file).forEach(function (doc) { addTags(file, doc); });
this.Data.ajax_getData('usersReq', _Settings.dataURL, {}, getData, function(){});
this.Data.ajax_getData('usersReq', _Settings.dataURL, _Settings.dataURL_params(this.Data), getData, function(){});
this.Data.ajax_getData('usersReq', _Settings.dataURL, {}, getData, function(){});
rangefinder._found = false; rangefinder.onSubmit(buffer.getCurrentWord(), false);
rangefinder.find(buffer.getCurrentWord(), false); rangefinder.findAgain();
function () { rangefinder._found = false; rangefinder.onSubmit(buffer.getCurrentWord(), false); });
var log = exports.log;
var Logger = exports.Class(function() { this.init = function(name, level) { this._name = name; this._level = level || logging.DEBUG; } this.setLevel = function(level) { this._level = level; } var slice = Array.prototype.slice; function makeLogFunction(level, type) { return function() { if (!production && level >= this._level) { log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); } return arguments[0]; } } this.debug = makeLogFunction(logging.DEBUG, "DEBUG"); this.log = makeLogFunction(logging.LOG, "LOG"); this.info = makeLogFunction(logging.INFO, "INFO"); this.warn = makeLogFunction(logging.WARN, "WARN"); this.error = makeLogFunction(logging.ERROR, "ERROR"); });
function () { dactyl.echomsg(io.getCurrentDirectory().path); },
function () { dactyl.echomsg(io.cwd); },
function () { dactyl.echomsg(io.getCurrentDirectory().path); },
jsio.addCmd(function(context, path, request, opts, imports) {
jsio.addCmd(function(context, request, opts, imports) {
jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*(from|external)\s+([\w.$]+)\s+(import|grab)\s+(.*)$/); if(match) { imports.push({ from: resolveRelativePath(match[2], path), external: match[1] == 'external', grab: match[3] == 'grab', 'import': {} }); match[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]['import'][item] = as || item; }); return true; } });
from: resolveRelativePath(match[2], path), external: match[1] == 'external', grab: match[3] == 'grab',
from: match[2], dontAddBase: match[1] == 'external', dontUseExports: match[3] == 'grab' || match[1] == 'external',
jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*(from|external)\s+([\w.$]+)\s+(import|grab)\s+(.*)$/); if(match) { imports.push({ from: resolveRelativePath(match[2], path), external: match[1] == 'external', grab: match[3] == 'grab', 'import': {} }); match[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]['import'][item] = as || item; }); return true; } });
rows.each(function(row_obj) { if (skip < int_start_row) { skip++; return; } else { row_obj.setStyle({display: 'none'});
arr_iframe_id.each(function(str_iframe_id) { var iframeObj = $(str_iframe_id); if (iframeObj) { var iframesNum = iframes.length; if (iframesNum < 1) { iframes[0] = iframeObj; } else { iframes[iframes.length] = iframeObj; } iframeObj.src = iframeObj.src + '&block=true';
rows.each(function(row_obj) { if (skip < int_start_row) { skip++; return; } else { row_obj.setStyle({display: 'none'}); } });
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*(from|external)\s+([\w.$]+)\s+(import|grab)\s+(.*)$/); if(match) { imports.push({ from: match[2], dontAddBase: match[1] == 'external', dontUseExports: match[3] == 'grab' || match[1] == 'external', 'import': {} }); match[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]['import'][item] = as || item; }); return true; } });
ctx.require = ENV.require ? ENV.require : function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); };
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*(from|external)\s+([\w.$]+)\s+(import|grab)\s+(.*)$/); if(match) { imports.push({ from: match[2], dontAddBase: match[1] == 'external', dontUseExports: match[3] == 'grab' || match[1] == 'external', 'import': {} }); match[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]['import'][item] = as || item; }); return true; } });
this.element.find("[type='radio']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ var c_detail = new DcmgrGUI.Detail({ element_id:$('<div></div>'), template_id:params.template_id }); c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data)); } }); c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ $('#detail').html(''); } });
$.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state);
this.element.find("[type='radio']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ var c_detail = new DcmgrGUI.Detail({ element_id:$('<div></div>'), template_id:params.template_id }); c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } //initialize if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data)); } }); c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ $('#detail').html(''); } }); });
var bindingTypeResults = Report.dataTypes.results.bindings.filter(function(el) { return el.bindingType == bindingType; } )
var bindingTypeDataTypes = Report.dataTypes.results.bindings.filter(function(el) { return el.bindingType.value == bindingType.type.value; } )
var bindingTypeResults = Report.dataTypes.results.bindings.filter(function(el) { return el.bindingType == bindingType; } )
me._registerQuery(r);
me._registerQuery(queries, r);
$.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); } });
this._level = level || logging.DEBUG;
this._level = level || logging.LOG;
var Logger = exports.Class(function() { this.init = function(name, level) { this._name = name; this._level = level || logging.DEBUG; } this.setLevel = function(level) { this._level = level; } var slice = Array.prototype.slice; var log = exports.log; function makeLogFunction(level, type) { return function() { if (!production && level >= this._level) { log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); } return arguments[0]; } } this.debug = makeLogFunction(logging.DEBUG, "DEBUG"); this.log = makeLogFunction(logging.LOG, "LOG"); this.info = makeLogFunction(logging.INFO, "INFO"); this.warn = makeLogFunction(logging.WARN, "WARN"); this.error = makeLogFunction(logging.ERROR, "ERROR"); });
log.apply(log, [type, this._name].concat(slice.call(arguments, 0)));
return log.apply(log, [type, this._name].concat(slice.call(arguments, 0)));
var Logger = exports.Class(function() { this.init = function(name, level) { this._name = name; this._level = level || logging.DEBUG; } this.setLevel = function(level) { this._level = level; } var slice = Array.prototype.slice; var log = exports.log; function makeLogFunction(level, type) { return function() { if (!production && level >= this._level) { log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); } return arguments[0]; } } this.debug = makeLogFunction(logging.DEBUG, "DEBUG"); this.log = makeLogFunction(logging.LOG, "LOG"); this.info = makeLogFunction(logging.INFO, "INFO"); this.warn = makeLogFunction(logging.WARN, "WARN"); this.error = makeLogFunction(logging.ERROR, "ERROR"); });
setTimeout(function() { jQuery("body").bind("click", function() { if (!AtD.suggestShow) jQuery('#suggestmenu').fadeOut(200); }); }, 1);
(function(sugg) { suggest.append('<a onclick="AtD.useSuggestion(\'' + sugg.replace(/'/, '\\\'') + '\');">' + sugg + '</a>'); })(errorDescription["suggestions"][i]);
setTimeout(function() { jQuery("body").bind("click", function() { if (!AtD.suggestShow) jQuery('#suggestmenu').fadeOut(200); }); }, 1);
var bindingVariables = this.variables.filter(function(variable) { return variable.binding.value == binding.binding.value; } );
function(visualization) { visualization.hasSufficientColumns = Visualization.prototype.hasSufficientColumns; return !visualization.hasSufficientColumns(); });
var bindingVariables = this.variables.filter(function(variable) { return variable.binding.value == binding.binding.value; } );
.addListener('body', function (chunk) { body.push(chunk); })
.addListener('complete', function () { promise.emitSuccess(body.join('')); });
.addListener('body', function (chunk) { body.push(chunk); // body += chunk })
/\bquickmark\b/.test(options["activate"]) ?
options.get("activate").has("all", "quickmark") ?
function (arg) { quickmarks.jumpTo(arg, /\bquickmark\b/.test(options["activate"]) ? liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB); },
return fileContents.replace(buildUtil.cssImportRegExp, function(fullMatch, urlStart, importFileName, urlEnd, mediaTypes){ if(mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) != "all")){ return fullMatch;
return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true;
return fileContents.replace(buildUtil.cssImportRegExp, function(fullMatch, urlStart, importFileName, urlEnd, mediaTypes){ //Only process media type "all" or empty media type rules. if(mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) != "all")){ return fullMatch; } importFileName = buildUtil.cleanCssUrlQuotes(importFileName); //Ignore the file import if it is part of an ignore list. if(cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") != -1){ return fullMatch; } //Make sure we have a unix path for the rest of the operation. importFileName = importFileName.replace(buildUtil.backSlashRegExp, "/"); try{ //if a relative path, then tack on the filePath. //If it is not a relative path, then the readFile below will fail, //and we will just skip that import. var fullImportFileName = importFileName.charAt(0) == "/" ? importFileName : filePath + importFileName; var importContents = fileUtil.readFile(fullImportFileName); //Make sure to flatten any nested imports. importContents = buildUtil.flattenCss(fullImportFileName, importContents); //Make the full import path var importEndIndex = importFileName.lastIndexOf("/"); //Make a file path based on the last slash. //If no slash, so must be just a file name. Use empty string then. var importPath = (importEndIndex != -1) ? importFileName.substring(0, importEndIndex + 1) : ""; //Modify URL paths to match the path represented by this file. importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); //Only do the work for relative URLs. Skip things that start with / or have //a protocol. var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ //It is a relative URL, tack on the path prefix urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } //Collapse .. and . var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; }); return importContents; }catch(e){ logger.trace(fileName + "\n Cannot inline css import, skipping: " + importFileName); return fullMatch; } });
importFileName = buildUtil.cleanCssUrlQuotes(importFileName); if(cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") != -1){ return fullMatch;
filePath = buildUtil.makeResourceUri(parts[6], parts[9], srcRoot, prefixes); resourceNsName = parts[6] + ':' + parts[9]; if(!filePath || buildUtil.isValueInArray(resourceNsName, skiplist)){ logger.trace(" skipping " + filePath); }else{ logger.trace(" " + filePath); var jsEscapedContent = buildUtil.jsEscape(fileUtil.readFile(filePath)); if(jsEscapedContent){ if(matchString.indexOf("dojo.cache") != -1){ var endContent = parts[11]; if(!endContent){ endContent = jsEscapedContent; }else{ var braceIndex = endContent.indexOf("{"); if(braceIndex != -1){ endContent = endContent.substring(0, braceIndex + 1) + 'value: ' + jsEscapedContent + ',' + endContent.substring(braceIndex + 1, endContent.length); } } matchString = 'dojo.cache("' + parts[6] + '", "' + parts[9] + '", ' + endContent + ')'; }else{ if(parts[3] == "templatePath"){ matchString = "templateString" + parts[4] + jsEscapedContent; }else{ var assignSeparator = parts[4]; var statementSeparator = ","; var statementPrefix = ""; if(assignSeparator == "="){ statementSeparator = ";"; statementPrefix = "this."; } matchString = "templateCssString" + assignSeparator + jsEscapedContent + statementSeparator + statementPrefix + parts[0]; } } }
return fileContents.replace(buildUtil.cssImportRegExp, function(fullMatch, urlStart, importFileName, urlEnd, mediaTypes){ //Only process media type "all" or empty media type rules. if(mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) != "all")){ return fullMatch; } importFileName = buildUtil.cleanCssUrlQuotes(importFileName); //Ignore the file import if it is part of an ignore list. if(cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") != -1){ return fullMatch; } //Make sure we have a unix path for the rest of the operation. importFileName = importFileName.replace(buildUtil.backSlashRegExp, "/"); try{ //if a relative path, then tack on the filePath. //If it is not a relative path, then the readFile below will fail, //and we will just skip that import. var fullImportFileName = importFileName.charAt(0) == "/" ? importFileName : filePath + importFileName; var importContents = fileUtil.readFile(fullImportFileName); //Make sure to flatten any nested imports. importContents = buildUtil.flattenCss(fullImportFileName, importContents); //Make the full import path var importEndIndex = importFileName.lastIndexOf("/"); //Make a file path based on the last slash. //If no slash, so must be just a file name. Use empty string then. var importPath = (importEndIndex != -1) ? importFileName.substring(0, importEndIndex + 1) : ""; //Modify URL paths to match the path represented by this file. importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); //Only do the work for relative URLs. Skip things that start with / or have //a protocol. var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ //It is a relative URL, tack on the path prefix urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } //Collapse .. and . var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; }); return importContents; }catch(e){ logger.trace(fileName + "\n Cannot inline css import, skipping: " + importFileName); return fullMatch; } });
importFileName = importFileName.replace(buildUtil.backSlashRegExp, "/"); try{ var fullImportFileName = importFileName.charAt(0) == "/" ? importFileName : filePath + importFileName; var importContents = fileUtil.readFile(fullImportFileName); importContents = buildUtil.flattenCss(fullImportFileName, importContents); var importEndIndex = importFileName.lastIndexOf("/"); var importPath = (importEndIndex != -1) ? importFileName.substring(0, importEndIndex + 1) : ""; importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; }); return importContents; }catch(e){ logger.trace(fileName + "\n Cannot inline css import, skipping: " + importFileName); return fullMatch; }
return matchString;
return fileContents.replace(buildUtil.cssImportRegExp, function(fullMatch, urlStart, importFileName, urlEnd, mediaTypes){ //Only process media type "all" or empty media type rules. if(mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) != "all")){ return fullMatch; } importFileName = buildUtil.cleanCssUrlQuotes(importFileName); //Ignore the file import if it is part of an ignore list. if(cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") != -1){ return fullMatch; } //Make sure we have a unix path for the rest of the operation. importFileName = importFileName.replace(buildUtil.backSlashRegExp, "/"); try{ //if a relative path, then tack on the filePath. //If it is not a relative path, then the readFile below will fail, //and we will just skip that import. var fullImportFileName = importFileName.charAt(0) == "/" ? importFileName : filePath + importFileName; var importContents = fileUtil.readFile(fullImportFileName); //Make sure to flatten any nested imports. importContents = buildUtil.flattenCss(fullImportFileName, importContents); //Make the full import path var importEndIndex = importFileName.lastIndexOf("/"); //Make a file path based on the last slash. //If no slash, so must be just a file name. Use empty string then. var importPath = (importEndIndex != -1) ? importFileName.substring(0, importEndIndex + 1) : ""; //Modify URL paths to match the path represented by this file. importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); //Only do the work for relative URLs. Skip things that start with / or have //a protocol. var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ //It is a relative URL, tack on the path prefix urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } //Collapse .. and . var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; }); return importContents; }catch(e){ logger.trace(fileName + "\n Cannot inline css import, skipping: " + importFileName); return fullMatch; } });
function () { document.commandDispatcher.advanceFocus(); });
function () { modes.push(modes.PASS_THROUGH); });
function () { document.commandDispatcher.advanceFocus(); });
e.observe("click", function(event) { $$(".upload").each(function(el) { el.disabled = true;
var chip = e.readAttribute("chip"); e.observe("click", function(ev) { uploading = true; $$(".form_hidden").invoke("remove"); var form = $(chip + "_form"); var crateEle = new Element("input", {"class": "form_hidden", name: "crate", value: crateNumber, type: "hidden"}); form.insert(crateEle); var boardEle = new Element("input", {"class": "form_hidden", name: "board", value: boardType, type: "hidden"}); form.insert(boardEle); var chipEle = new Element("input", {"class": "form_hidden", name: "chip", value: chip, type: "hidden"}); form.insert(chipEle); $$("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); }
$$(".upload").each(function(e) { // Disable all upload buttons to begin with. The updater will enable them. e.disabled = true; e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); var chip = e.readAttribute("chip"); // Then do the upload $$("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; }); }); });
var chip = e.readAttribute("chip"); $$("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; }); });
$$(".upload").each(function(e) { // Disable all upload buttons to begin with. The updater will enable them. e.disabled = true; e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); var chip = e.readAttribute("chip"); // Then do the upload $$("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; }); }); });
main.addCallback(function(ps){ form = new Form(ps); });
connect(window, 'onunload', this, function(ev){ if(!this.posted && isPopup){ this.save(); } });
main.addCallback(function(ps){ form = new Form(ps);});
$.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state);
this.element.find("[type='radio']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ var c_detail = new DcmgrGUI.Detail({ element_id:$('<div></div>'), template_id:params.template_id }); c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data)); } }); c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ $('#detail').html(''); } });
$.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state); });
uploading = true;
$$(".upload").each(function(e) { // Disable all upload buttons to begin with. The updater will enable them. e.disabled = true; var chip = e.readAttribute("chip"); // Intercept clicks, add form data and disable buttons appropriately. e.observe("click", function(ev) { // Make sure the updater knows that we are uploading uploading = true; $$(".form_hidden").invoke("remove"); var form = $(chip + "_form"); var crateEle = new Element("input", {"class": "form_hidden", name: "crate", value: crateNumber, type: "hidden"}); form.insert(crateEle); var boardEle = new Element("input", {"class": "form_hidden", name: "board", value: boardType, type: "hidden"}); form.insert(boardEle); var chipEle = new Element("input", {"class": "form_hidden", name: "chip", value: chip, type: "hidden"}); form.insert(chipEle); $$("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); } }); var broadcast = $("broadcast_" + chip).checked ? 1 : 0; var broadcastEle = new Element("input", {"class": "form_hidden", name: "broadcast", value: broadcast, type: "hidden"}); form.insert(broadcastEle); form.submit(); }); });
function () { editor.executeCommand("cmd_deleteWordBackward", 1); });
function (motion, count) { editor.executeCommandWithMotion(key, motion, count); },
function () { editor.executeCommand("cmd_deleteWordBackward", 1); });
return request(embedUrl, {charset : 'utf-8'}).addCallback(function(res){ var doc = createHTML(res.responseText);
return request(ctx.href).addCallback(function(res){ ctx.title = res.responseText.extract(/<title.*?>([\s\S]*?)<\/title>/im).replace(/[\n\r]/g, '').trim() || createURI(itemUrl).fileName;
return request(embedUrl, {charset : 'utf-8'}).addCallback(function(res){ var doc = createHTML(res.responseText); return { type : 'video', item : ctx.title, itemUrl : ctx.href, body : $X('//input[@name="script_code"]/@value', doc)[0] }; });
type : 'video',
type : 'photo',
return request(embedUrl, {charset : 'utf-8'}).addCallback(function(res){ var doc = createHTML(res.responseText); return { type : 'video', item : ctx.title, itemUrl : ctx.href, body : $X('//input[@name="script_code"]/@value', doc)[0] }; });
itemUrl : ctx.href, body : $X(' };
itemUrl : itemUrl }
return request(embedUrl, {charset : 'utf-8'}).addCallback(function(res){ var doc = createHTML(res.responseText); return { type : 'video', item : ctx.title, itemUrl : ctx.href, body : $X('//input[@name="script_code"]/@value', doc)[0] }; });
$$("form[chip=\"" + e.readAttribute("chip") + "\"").invoke("submit");
$$("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; });
$$(".upload").each(function(e) { // Disable all upload buttons to begin with. The updater will enable them. e.disabled = true; e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); // Then do the upload $$("form[chip=\"" + e.readAttribute("chip") + "\"").invoke("submit"); }); });
function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; },
function () { dactyl.echomsg(io.cwd); },
function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; },
{ var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' );
{ var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content;
YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } // If state is selected: get the old value for checking it later if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option>&nbsp;</option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); } } }); });
Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option>&nbsp;</option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); }
if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } if ( !oldStateValue ) { if( country_node.get('id') == 'country' && Y.Node.get( '#hidden_state' ) ) { var oldStateValue = Y.Node.get( '#hidden_state' ).get( 'value' ); } else if ( country_node.get('id') == 's_country' && Y.Node.get( '#hidden_s_state' ) ) { var oldStateValue = Y.Node.get( '#hidden_s_state' ).get( 'value' ); } } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option>&nbsp;</option>' ); subdivision_node.appendChild(node); var index = 0; for (i in data ) { index++; if (oldStateValue == i) { var stateSelected = index; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if ( typeof( stateSelected ) != 'undefined' ) { subdivision_node.set( 'selectedIndex', stateSelected ); } else { subdivision_node.set('selectedIndex', 0); } }); }
YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } // If state is selected: get the old value for checking it later if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option>&nbsp;</option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); } } }); });
let validEvents = config.autocommands.map(function (event) event[0]);
dactyl.assert(events.every(function (event) validEvents.indexOf(event) >= 0),
let validEvents = config.autocommands.map(function (event) event[0]);
args = args[0];
dactyl.dump(args); args = args[0] || "";
function (args) { args = args[0]; // ignore invalid qmark characters unless there are no valid qmark chars dactyl.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching " + args.quote()); let filter = args.replace(/[^a-zA-Z0-9]/g, ""); quickmarks.list(filter); }, {
function () tabs.select("$", false),
dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); });
function () tabs.select("$", false),
$(quickeditor).parent().replaceWith('<div class="content">' + html + '</div>');
$(quickeditor).parent().replaceWith('<div class="content text-content">' + html + '</div>');
$(quickeditor).parent().children('.submit-buttons').children('[name=submit]').click(function() { $(this).parent().hide(); // Ajax time $.ajax({ type: "POST", url: $(quickeditor).parent().attr('action'), data: $(quickeditor).parent().serialize() + '&submit=1', success: function(html){ $(quickeditor).parent().replaceWith('<div class="content">' + html + '</div>'); } }); // Do not redirect return false; });