rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
fn.call(context.exports, context); | fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;(function(){" + moduleDef.src + "\n}).call(this)}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn.call(context.exports, context); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath, ENV.name == 'browser' ? e : ''); } } throw e; } }; |
ENV.log("ERROR LOADING", moduleDef.filePath, ENV.name == 'browser' ? e : ''); | ENV.log("ERROR LOADING", moduleDef.filePath); | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;(function(){" + moduleDef.src + "\n}).call(this)}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn.call(context.exports, context); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath, ENV.name == 'browser' ? e : ''); } } throw e; } }; |
var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); | var code = "(function(_){with(_){delete _;return function $$" + moduleDef.friendlyPath.replace(/[\/.]/g, '_') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.path); | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath);// if (ENV.name == 'browser') {// ENV.log(moduleDef.filePath + ':', e.message, "\n\n", e.stack.replace(new RegExp(resolveRelative(ENV.getCwd() + ENV.getPath() + '/jsio.js'), 'g'), ''));// } } } throw e; } }; |
fn.name = moduleDef.path; | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath);// if (ENV.name == 'browser') {// ENV.log(moduleDef.filePath + ':', e.message, "\n\n", e.stack.replace(new RegExp(resolveRelative(ENV.getCwd() + ENV.getPath() + '/jsio.js'), 'g'), ''));// } } } throw e; } }; |
|
ENV.log("Stack overflow in", moduleDef.filePath, ':', e); | ENV.log("Stack overflow in", moduleDef.friendlyPath, ':', e); | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath);// if (ENV.name == 'browser') {// ENV.log(moduleDef.filePath + ':', e.message, "\n\n", e.stack.replace(new RegExp(resolveRelative(ENV.getCwd() + ENV.getPath() + '/jsio.js'), 'g'), ''));// } } } throw e; } }; |
ENV.log("ERROR LOADING", moduleDef.filePath); | ENV.log("ERROR LOADING", moduleDef.friendlyPath); | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath);// if (ENV.name == 'browser') {// ENV.log(moduleDef.filePath + ':', e.message, "\n\n", e.stack.replace(new RegExp(resolveRelative(ENV.getCwd() + ENV.getPath() + '/jsio.js'), 'g'), ''));// } } } throw e; } }; |
var code = "(function(_){with(_){delete _;return function " + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; | var code = "(function(_){with(_){delete _;return function $$" + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; | function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;return function " + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn = fn(context); fn.name = moduleDef.path; fn.call(context.exports); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath);// if (ENV.name == 'browser') {// ENV.log(moduleDef.filePath + ':', e.message, "\n\n", e.stack.replace(new RegExp(resolveRelative(ENV.getCwd() + ENV.getPath() + '/jsio.js'), 'g'), ''));// } } } throw e; } }; |
if (!silent) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); | if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } | execute: function (string, tokens, silent, args, sourcing) { io.withSavedValues(["readHeredoc", "sourcing"], function () { this.sourcing = update({}, sourcing); args = update({ setFrom: this.sourcing.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); dactyl.reportError(e, true); } } } }); }, |
args = update({ setFrom: this.file }, args || {}); | args = update({ setFrom: this.sourcing.file }, args || {}); | execute: function (string, tokens, silent, args, sourcing) { io.withSavedValues(["readHeredoc", "sourcing"], function () { this.sourcing = update({}, sourcing); args = update({ setFrom: this.file }, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent) { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); dactyl.reportError(e, true); } } } }); }, |
execute: function (str, modifiers, silent, sourcing) { | execute: function (str, modifiers, silent) { | execute: function (str, modifiers, silent, sourcing) { // skip comments and blank lines if (/^\s*("|$)/.test(str)) return; modifiers = modifiers || {}; for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { if (command === null) throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString); if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); io.withSavedValues(["sourcing"], function () { io.sourcing = sourcing || io.sourcing; command.execute(args, modifiers); }); } }, |
io.withSavedValues(["sourcing"], function () { io.sourcing = sourcing || io.sourcing; command.execute(args, modifiers); }); | command.execute(args, modifiers); | execute: function (str, modifiers, silent, sourcing) { // skip comments and blank lines if (/^\s*("|$)/.test(str)) return; modifiers = modifiers || {}; for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { if (command === null) throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString); if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); io.withSavedValues(["sourcing"], function () { io.sourcing = sourcing || io.sourcing; command.execute(args, modifiers); }); } }, |
sourcing = sourcing || { file: "[Command Line]", line: 1 }; | sourcing = sourcing || this.sourcing || { file: "[Command Line]", line: 1 }; | execute: function (string, tokens, silent, args, sourcing) { io.withSavedValues(["readHeredoc", "sourcing"], function () { sourcing = sourcing || { file: "[Command Line]", line: 1 }; this.sourcing = update({}, sourcing); args = update({}, args || {}); if (tokens) string = commands.replaceTokens(string, tokens); let lines = string.split(/\r\n|[\r\n]/); this.readHeredoc = function (end) { let res = []; this.sourcing.line++; while (++i < lines.length) { if (lines[i] === end) return res.join("\n"); res.push(lines[i]); } dactyl.assert(false, "Unexpected end of file waiting for " + end); }; for (var i = 0; i < lines.length && !this.sourcing.finished; i++) { // Deal with editors from Silly OSs. let line = lines[i].replace(/\r$/, ""); this.sourcing.line = sourcing.line + i; // Process escaped new lines while (i < lines.length && /^\s*\\/.test(lines[i + 1])) line += "\n" + lines[++i].replace(/^\s*\\/, ""); try { dactyl.execute(line, args); } catch (e) { if (!silent || silent === "loud") { if (silent !== "loud") e.message = this.sourcing.file + ":" + this.sourcing.line + ": " + e.message; else { dactyl.echoerr("Error detected while processing " + this.sourcing.file); dactyl.echomsg("line\t" + this.sourcing.line + ":"); } dactyl.reportError(e, true); } } } }); }, |
if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); | execute: function (str, modifiers, silent) { // skip comments and blank lines if (/^\s*("|$)/.test(str)) return; modifiers = modifiers || {}; for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { if (command === null) throw FailedAssertion("E492: Not a " + config.appName + " command: " + args.commandString); if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); command.execute(args, modifiers); } }, |
|
execute: function() { this.callback(this); }, | 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])*?\*\ | execute: function() { this.callback(this); }, |
if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) { dactyl.beep(); return false; } | dactyl.assert(controller && controller.supportsCommand(cmd) && controller.isCommandEnabled(cmd)); | executeCommand: function (cmd, count) { let controller = Editor.getController(); if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) { dactyl.beep(); return false; } if (typeof count != "number" || count < 1) count = 1; let didCommand = false; while (count--) { // some commands need this try/catch workaround, because a cmd_charPrevious triggered // at the beginning of the textarea, would hang the doCommand() // good thing is, we need this code anyway for proper beeping try { controller.doCommand(cmd); didCommand = true; } catch (e) { if (!didCommand) dactyl.beep(); return false; } } return true; }, |
if (!didCommand) dactyl.beep(); return false; | dactyl.assert(didCommand); break; | executeCommand: function (cmd, count) { let controller = Editor.getController(); if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) { dactyl.beep(); return false; } if (typeof count != "number" || count < 1) count = 1; let didCommand = false; while (count--) { // some commands need this try/catch workaround, because a cmd_charPrevious triggered // at the beginning of the textarea, would hang the doCommand() // good thing is, we need this code anyway for proper beeping try { controller.doCommand(cmd); didCommand = true; } catch (e) { if (!didCommand) dactyl.beep(); return false; } } return true; }, |
return true; | executeCommand: function (cmd, count) { let controller = Editor.getController(); if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) { dactyl.beep(); return false; } if (typeof count != "number" || count < 1) count = 1; let didCommand = false; while (count--) { // some commands need this try/catch workaround, because a cmd_charPrevious triggered // at the beginning of the textarea, would hang the doCommand() // good thing is, we need this code anyway for proper beeping try { controller.doCommand(cmd); didCommand = true; } catch (e) { if (!didCommand) dactyl.beep(); return false; } } return true; }, |
|
function executeCommand(str) { | function executeCommand(str, prefixArg) { | function executeCommand(str) { let parsed = parseCommand(str, true); if (parsed.cmd) { let left = str.slice(parsed.queryStart); let [args, state] = completer.utils.lex(left); if (parsed.cmd in commands) { let command = commands[parsed.cmd]; let extra = { bang : parsed.bang, state : state, left : left, whole : str }; if (command.extra.options) { let parseResult = parseOptions(args, command.extra.options); if (parseResult.errorMsg) { } else { args = parseResult.args; extra.options = parseResult.options; } } // check for argCount if (typeof command.extra.argCount !== "undefined") { let [valid, msg] = validateArgumentsCount(args.length, command.extra.argCount); if (!valid) { display.echoStatusBar(msg); return; } } command.callback(args, extra); } } } |
whole : str | whole : str, count : prefixArg | function executeCommand(str) { let parsed = parseCommand(str, true); if (parsed.cmd) { let left = str.slice(parsed.queryStart); let [args, state] = completer.utils.lex(left); if (parsed.cmd in commands) { let command = commands[parsed.cmd]; let extra = { bang : parsed.bang, state : state, left : left, whole : str }; if (command.extra.options) { let parseResult = parseOptions(args, command.extra.options); if (parseResult.errorMsg) { } else { args = parseResult.args; extra.options = parseResult.options; } } // check for argCount if (typeof command.extra.argCount !== "undefined") { let [valid, msg] = validateArgumentsCount(args.length, command.extra.argCount); if (!valid) { display.echoStatusBar(msg); return; } } command.callback(args, extra); } } } |
let foundWord = text.substring(0, currStart).replace(RegExp("^(.|\\n)*?\\s*(" + abbreviations._match + ")$", "m"), "$2"); | let foundWord = text.substring(0, currStart).replace(/.*\n/gm, '').match(RegExp('(' + abbreviations._match + ')$'), ''); | expandAbbreviation: function (mode) { let textbox = Editor.getEditor(); if (!textbox) return false; let text = textbox.value; let currStart = textbox.selectionStart; let currEnd = textbox.selectionEnd; let foundWord = text.substring(0, currStart).replace(RegExp("^(.|\\n)*?\\s*(" + abbreviations._match + ")$", "m"), "$2"); // get last word \b word boundary if (!foundWord) return true; let abbrev = abbreviations.get(mode, foundWord); if (abbrev) { let len = foundWord.length; let abbrText = abbrev.text; text = text.substring(0, currStart - len) + abbrText + text.substring(currStart); textbox.value = text; textbox.selectionStart = currStart - len + abbrText.length; textbox.selectionEnd = currEnd - len + abbrText.length; } return true; }, |
foundWord = foundWord[0]; | expandAbbreviation: function (mode) { let textbox = Editor.getEditor(); if (!textbox) return false; let text = textbox.value; let currStart = textbox.selectionStart; let currEnd = textbox.selectionEnd; let foundWord = text.substring(0, currStart).replace(RegExp("^(.|\\n)*?\\s*(" + abbreviations._match + ")$", "m"), "$2"); // get last word \b word boundary if (!foundWord) return true; let abbrev = abbreviations.get(mode, foundWord); if (abbrev) { let len = foundWord.length; let abbrText = abbrev.text; text = text.substring(0, currStart - len) + abbrText + text.substring(currStart); textbox.value = text; textbox.selectionStart = currStart - len + abbrText.length; textbox.selectionEnd = currEnd - len + abbrText.length; } return true; }, |
|
expandable: function(options) { options = $.extend({ duration: 'normal', interval: 750, within: 1, by: 2, init: false }, options); return this.filter('textarea').each(function() { var $this = $(this).css({ display: 'block', overflow: 'hidden' }), minHeight = $this.height(), interval, heightDiff = this.offsetHeight - minHeight, rowSize = ( parseInt($this.css('lineHeight'), 10) || parseInt($this.css('fontSize'), 10) ), $div = $('<div style="position:absolute;top:-999px;left:-999px;border-color:#000;border-style:solid;overflow-x:hidden;visibility:hidden;z-index:0;" />').appendTo('body'); $.each('borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth paddingTop paddingRight paddingBottom paddingLeft fontSize fontFamily fontWeight fontStyle fontStretch fontVariant wordSpacing lineHeight width'.split(' '), function(i,prop) { $div.css(prop, $this.css(prop)); }); $this .bind('keypress', function(event) { if ( event.keyCode == '13' ) check(); }) .bind('focus blur', function(event) { if ( event.type == 'blur' ) clearInterval( interval ); if ( event.type == 'focus' ) interval = setInterval(check, options.interval); }); | expandable: function(givenOptions) { var options = $.extend({ duration: 'normal', interval: 750, within: 1, by: 2, init: false }, givenOptions); return this.filter('textarea').each(function() { var $this = $(this).css({ display: 'block', overflow: 'hidden' }), minHeight = $this.height(), heightDiff = this.offsetHeight - minHeight, rowSize = ( parseInt($this.css('lineHeight'), 10) || parseInt($this.css('fontSize'), 10) ), $mirror = $('<div style="position:absolute;top:-999px;left:-999px;border-color:#000;border-style:solid;overflow-x:hidden;visibility:hidden;z-index:0;white-space: pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;" />').appendTo('body'), interval; $.each('borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth paddingTop paddingRight paddingBottom paddingLeft fontSize fontFamily fontWeight fontStyle fontStretch fontVariant wordSpacing lineHeight width'.split(' '), function(i,prop) { $mirror.css(prop, $this.css(prop)); }); $this .bind('keypress', function(event) { if ( event.keyCode == '13' ) check(); }) .bind('focus blur', function(event) { if ( event.type == 'blur' ) clearInterval( interval ); if ( event.type == 'focus' ) interval = setInterval(check, options.interval); }); | expandable: function(options) { options = $.extend({ duration: 'normal', interval: 750, within: 1, by: 2, init: false }, options); return this.filter('textarea').each(function() { var $this = $(this).css({ display: 'block', overflow: 'hidden' }), minHeight = $this.height(), interval, heightDiff = this.offsetHeight - minHeight, rowSize = ( parseInt($this.css('lineHeight'), 10) || parseInt($this.css('fontSize'), 10) ), $div = $('<div style="position:absolute;top:-999px;left:-999px;border-color:#000;border-style:solid;overflow-x:hidden;visibility:hidden;z-index:0;" />').appendTo('body'); $.each('borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth paddingTop paddingRight paddingBottom paddingLeft fontSize fontFamily fontWeight fontStyle fontStretch fontVariant wordSpacing lineHeight width'.split(' '), function(i,prop) { $div.css(prop, $this.css(prop)); }); $this .bind('keypress', function(event) { if ( event.keyCode == '13' ) check(); }) .bind('focus blur', function(event) { if ( event.type == 'blur' ) clearInterval( interval ); if ( event.type == 'focus' ) interval = setInterval(check, options.interval); }); function check() { var text = $this.val(), newHeight, height, usedHeight, usedRows, availableRows; $div.html( text.replace(/\n/g, ' <br>').replace(/<(\/?)scrip/g,'<$1scirp') ); height = $this[0].offsetHeight - heightDiff; usedHeight = $div[0].offsetHeight - heightDiff; usedRows = Math.floor(usedHeight / rowSize); availableRows = Math.floor((height / rowSize) - usedRows); if ( availableRows <= options.within ) { newHeight = rowSize * (usedRows + Math.max(availableRows, 0) + options.by); $this.stop().animate({ height: newHeight }, options.duration); } else if ( availableRows > options.by + options.within ) { newHeight = Math.max( height - (rowSize * (availableRows - (options.by + options.within))), minHeight ); $this.stop().animate({ height: newHeight }, options.duration); } }; if ( options.init ) check(); }).end(); } |
function check() { var text = $this.val(), newHeight, height, usedHeight, usedRows, availableRows; $div.html( text.replace(/\n/g, ' <br>').replace(/<(\/?)scrip/g,'<$1scirp') ); height = $this[0].offsetHeight - heightDiff; usedHeight = $div[0].offsetHeight - heightDiff; usedRows = Math.floor(usedHeight / rowSize); availableRows = Math.floor((height / rowSize) - usedRows); if ( availableRows <= options.within ) { newHeight = rowSize * (usedRows + Math.max(availableRows, 0) + options.by); $this.stop().animate({ height: newHeight }, options.duration); } else if ( availableRows > options.by + options.within ) { newHeight = Math.max( height - (rowSize * (availableRows - (options.by + options.within))), minHeight ); $this.stop().animate({ height: newHeight }, options.duration); } }; if ( options.init ) check(); }).end(); } | function check() { var text = $this.val(), newHeight, height, usedHeight, usedRows, availableRows; $mirror.html( encodeHTML(text).replace(/\n/g, ' <br>') ); height = $this[0].offsetHeight - heightDiff; usedHeight = $mirror[0].offsetHeight - heightDiff; usedRows = Math.floor(usedHeight / rowSize); availableRows = Math.floor((height / rowSize) - usedRows); if ( availableRows <= options.within ) { newHeight = rowSize * (usedRows + Math.max(availableRows, 0) + options.by); $this.stop().animate({ height: newHeight }, options.duration); } else if ( availableRows > options.by + options.within ) { newHeight = Math.max( height - (rowSize * (availableRows - (options.by + options.within))), minHeight ); $this.stop().animate({ height: newHeight }, options.duration); } }; if ( options.init ) check(); }).end(); } | expandable: function(options) { options = $.extend({ duration: 'normal', interval: 750, within: 1, by: 2, init: false }, options); return this.filter('textarea').each(function() { var $this = $(this).css({ display: 'block', overflow: 'hidden' }), minHeight = $this.height(), interval, heightDiff = this.offsetHeight - minHeight, rowSize = ( parseInt($this.css('lineHeight'), 10) || parseInt($this.css('fontSize'), 10) ), $div = $('<div style="position:absolute;top:-999px;left:-999px;border-color:#000;border-style:solid;overflow-x:hidden;visibility:hidden;z-index:0;" />').appendTo('body'); $.each('borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth paddingTop paddingRight paddingBottom paddingLeft fontSize fontFamily fontWeight fontStyle fontStretch fontVariant wordSpacing lineHeight width'.split(' '), function(i,prop) { $div.css(prop, $this.css(prop)); }); $this .bind('keypress', function(event) { if ( event.keyCode == '13' ) check(); }) .bind('focus blur', function(event) { if ( event.type == 'blur' ) clearInterval( interval ); if ( event.type == 'focus' ) interval = setInterval(check, options.interval); }); function check() { var text = $this.val(), newHeight, height, usedHeight, usedRows, availableRows; $div.html( text.replace(/\n/g, ' <br>').replace(/<(\/?)scrip/g,'<$1scirp') ); height = $this[0].offsetHeight - heightDiff; usedHeight = $div[0].offsetHeight - heightDiff; usedRows = Math.floor(usedHeight / rowSize); availableRows = Math.floor((height / rowSize) - usedRows); if ( availableRows <= options.within ) { newHeight = rowSize * (usedRows + Math.max(availableRows, 0) + options.by); $this.stop().animate({ height: newHeight }, options.duration); } else if ( availableRows > options.by + options.within ) { newHeight = Math.max( height - (rowSize * (availableRows - (options.by + options.within))), minHeight ); $this.stop().animate({ height: newHeight }, options.duration); } }; if ( options.init ) check(); }).end(); } |
if (srcTable[moduleDef.filePath]) { | if (srcTable[moduleDef.path]) { | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
srcTable[moduleDef.filePath] = true; | srcTable[moduleDef.path] = true; | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
var self = moduleDef.filePath; | var self = moduleDef.path; | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
var match = jsioAddPath.exec(src); | var match = jsioAddPath.exec(moduleDef.src); | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
run(moduleDef.path, cmd, opts, inlineOpts); | run(moduleDef, cmd, opts, inlineOpts); | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); | var dynamicImports = opts.dynamicImports[cmd]; if (!dynamicImports) { logger.info('Dynamic import ' + cmd + ': <nothing>'); continue; } else if (JS.isArray(dynamicImports)) { for (var j = 0, line; line = dynamicImports[j]; ++j) { logger.info('Dynamic import ' + cmd + ': ' + line); run(moduleDef, line, opts, inlineOpts); } } else { logger.info('Dynamic import ' + cmd + ': ' + dynamicImports); run(moduleDef, dynamicImports, opts, inlineOpts); } | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); | srcTable[moduleDef.path] = JS.shallowCopy(moduleDef); | exports = function(path, moduleDef, opts) { opts = opts || {}; // prevent double import if (srcTable[moduleDef.filePath]) { moduleDef.src = ''; return; } srcTable[moduleDef.filePath] = true; var self = moduleDef.filePath; logger.info('> compiling', self, 'at path', path); if (opts.path) { if (JS.isArray(opts.path)) { for (var i = 0, len = opts.path.length; i < len; ++i) { JSIO.addPath(opts.path); } } else if (typeof opts.path == 'string') { JSIO.addPath(opts.path); } } if (opts.autoDetectPaths) { jsioAddPath.lastIndex = 0; logger.info('detecting paths for', self); while (true) { var match = jsioAddPath.exec(src); if (!match) { break; } logger.info('found path ' + match[1]); try { JSIO.addPath(eval(match[1])); } catch(e) { logger.warn('failed to add path ' + match[1]); } } } jsioNormal.lastIndex = 0; while (true) { var match = jsioNormal.exec(moduleDef.src); if (!match) { break; } logger.info('detected', match[0]) var cmd = match[1], inlineOpts = match[2] ? match[2].substring(1) : ''; try { inlineOpts = eval(inlineOpts); } catch(e) { logger.warn('could not parse opts for jsio in', self + ':', inlineOpts); inlineOpts = {}; } run(moduleDef.path, cmd, opts, inlineOpts); } jsioDynamic.lastIndex = 0; while(true) { var match = jsioDynamic.exec(moduleDef.src); if (!match) { break; } var cmd = match[1], inlineOpts = match[2] || ''; if (opts.dynamicImports && cmd in opts.dynamicImports) { run(moduleDef.path, opts.dynamicImports[cmd], opts, inlineOpts); } else { logger.error('Missing: import definition\nConstant', cmd, 'for DYNAMIC_IMPORT_' + cmd, ' was not provided to the compiler'); } } srcTable[moduleDef.filePath] = JS.shallowCopy(moduleDef); moduleDef.src = '';} |
exports = function(src) { return src.replace(importExpr, '$1jsio("$2");'); | exports = function(path, moduleDef, opts) { moduleDef.src = moduleDef.src.replace(importExpr, '$1jsio("$2");'); | exports = function(src) { return src.replace(importExpr, '$1jsio("$2");');} |
result.prototype.baseThemeClass = this; | result.themes = {}; result.baseTheme = this; | extend: function() { var result = SC.Object.extend.apply(this, arguments); result.prototype.baseThemeClass = this; result.prototype.themeClass = result; // a convenience. result.renderers = result.prototype; // make a renderers object so you don't keep typing .prototype.whatever return result; }, |
if (value instanceof Function && !value.superclass && (value !== (cur=this[key]))) { | if (value instanceof Function && !value.base && (value !== (cur=this[key]))) { | extend: function(ext) { var ret = SC.mixin(SC.beget(this), ext), key, value, cur; ret.superclass = this; for(key in ret) { value = ret[key]; if (value instanceof Function && !value.superclass && (value !== (cur=this[key]))) { value.base = cur; } } return ret; }, |
if (last && last.theme) { | if (last && !SC.none(last.theme)) { | extend: function() { var last = arguments[arguments.length - 1]; if (last && last.theme) { last.themeName = last.theme; delete last.theme; } return SC.Object.extend.apply(this, arguments); }, |
c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]= o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange", | function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)|| c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded", | c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange", |
Object.extend = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination; }; | 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 = function(destination, source) { for (var property in source) destination[property] = source[property]; return destination;}; |
function extended() options.extendedhinttags; | function extended() options["extendedhinttags"]; | function extended() options.extendedhinttags; |
context.keys = { text: "name", description: "description", icon: "icon" }, context.completions = liberator.extensions; | context.keys = { text: "name", description: "description", icon: "iconURL" }, context.incomplete = true; AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; }); | completion.extension = function extension(context) { context.title = ["Extension"]; context.anchored = false; context.keys = { text: "name", description: "description", icon: "icon" }, context.completions = liberator.extensions; }; |
return this.getForm(endpoint).addCallback(function(form){ | return this.getForm(ctx, endpoint).addCallback(function(form){ | extractByEndpoint : function(ctx, endpoint){ var self = this; return this.getForm(endpoint).addCallback(function(form){ return update({ type : form['post[type]'], item : ctx.title, itemUrl : ctx.href, favorite : { name : 'Tumblr', endpoint : endpoint, form : form } }, self.convertToParams(form)); }); }, |
return this.extractByEndpoint(ctx, unescapeHTML(this.getFrameUrl(doc)).replace(/.+&pid=(.*)&rk=(.*)/, this.TUMBLR_URL+'reblog/$1/$2')); | var m = unescapeHTML(this.getFrameUrl(doc)).match(/.+&pid=([^&]*)&rk=([^&]*)/); return this.extractByEndpoint(ctx, this.TUMBLR_URL + 'reblog/' + m[1] + '/' + m[2]); | extractByPage : function(ctx, doc){ return this.extractByEndpoint(ctx, unescapeHTML(this.getFrameUrl(doc)).replace(/.+&pid=(.*)&rk=(.*)/, this.TUMBLR_URL+'reblog/$1/$2')); }, |
extractScripts: function() { var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); }, | 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])*?\*\ | extractScripts: function() { var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); }, |
equals(g2, 'ARG2', 'arg2') ; | equals(g2, 'ARG2', 'arg2') ; equals(target, o, 'target') ; | var f = function f() { if (!fired && --tries >= 0) { setTimeout(f, 100) ; return ; } equals(YES, fired, 'did not fire') ; equals(g1, 'ARG1', 'arg1') ; equals(g2, 'ARG2', 'arg2') ; window.start() ; // starts the test runner } ; |
null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop=== | c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; | null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop=== |
var that = this, func = f ; f = function() { return func.apply(that, args.slice(1)); } ; | var func = f ; f = function() { return func.apply(this, args.slice(1)); } ; | var f = this; if (arguments.length > 2) { var args = SC.$A(arguments).slice(2,arguments.length); args.unshift(target); // f = f.bind.apply(f, args) ; var that = this, func = f ; f = function() { return func.apply(that, args.slice(1)); } ; |
cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; | if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", | cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; |
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), | "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, | c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), |
let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; | var wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; | feedkeys: function (keys, noremap, quiet, mode) { let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { for (let type in values(["keydown", "keyup", "keypress"])) { let evt = this.feedingEvent = update({}, evt_obj, { type: type }); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; evt.dactylMode = mode; let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt); if (!evt_obj.dactylString && !evt_obj.dactylShift && !mode) events.dispatch(dactyl.focusedElement || buffer.focusedFrame, event); else events.onKeyPress(event); } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.replaying && !this.waitForPageLoad()) break; } } catch (e) { util.reportError(e); } finally { this.feedingEvent = null; this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) events.dispatch(evt.originalTarget, evt); } } }, |
try { | feedkeys: function (keys, noremap, quiet, mode) { let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { for (let type in values(["keydown", "keyup", "keypress"])) { let evt = this.feedingEvent = update({}, evt_obj, { type: type }); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; evt.dactylMode = mode; let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt); if (!evt_obj.dactylString && !evt_obj.dactylShift && !mode) events.dispatch(dactyl.focusedElement || buffer.focusedFrame, event); else events.onKeyPress(event); } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.replaying && !this.waitForPageLoad()) break; } } catch (e) { util.reportError(e); } finally { this.feedingEvent = null; this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) events.dispatch(evt.originalTarget, evt); } } }, |
|
evt.target.dispatchEvent(evt); | events.dispatch(evt.target, evt); | feedkeys: function (keys, noremap, quiet) { let doc = window.document; let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { for (let type in values(["keydown", "keyup", "keypress"])) { let evt = this.feedingEvent = update({}, evt_obj, { type: type }); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; if (!evt_obj.dactylString && !evt_obj.dactylShift) window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils) .sendKeyEvent(type, evt.keyCode, evt.charCode, evt.modifiers); else { // A special hack for dactyl-specific key names. evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> events.onKeyPress(evt); break; } } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } finally { this.feedingEvent = null; this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) evt.target.dispatchEvent(evt); } } }, |
delete evt_obj.type; | feedkeys: function (keys, noremap, quiet) { let doc = window.document; let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { delete evt_obj.type; for (let type in values(["keydown", "keyup", "keypress"])) { let elem = dactyl.focus || buffer.focusedFrame; let evt = events.create(doc, type, evt_obj); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; // A special hack for dactyl-specific key names. if (!evt_obj.dactylString && !evt_obj.dactylShift) elem.dispatchEvent(evt); else { evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> events.onKeyPress(evt); break; } } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } finally { this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) evt.target.dispatchEvent(evt); } } }, |
|
let evt = events.create(doc, type, evt_obj); | let evt = this.feedingEvent = update({}, evt_obj, { type: type }); | feedkeys: function (keys, noremap, quiet) { let doc = window.document; let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { delete evt_obj.type; for (let type in values(["keydown", "keyup", "keypress"])) { let elem = dactyl.focus || buffer.focusedFrame; let evt = events.create(doc, type, evt_obj); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; // A special hack for dactyl-specific key names. if (!evt_obj.dactylString && !evt_obj.dactylShift) elem.dispatchEvent(evt); else { evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> events.onKeyPress(evt); break; } } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } finally { this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) evt.target.dispatchEvent(evt); } } }, |
elem.dispatchEvent(evt); else { | window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils) .sendKeyEvent(type, evt.keyCode, evt.charCode, evt.modifiers); else { | feedkeys: function (keys, noremap, quiet) { let doc = window.document; let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { delete evt_obj.type; for (let type in values(["keydown", "keyup", "keypress"])) { let elem = dactyl.focus || buffer.focusedFrame; let evt = events.create(doc, type, evt_obj); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; // A special hack for dactyl-specific key names. if (!evt_obj.dactylString && !evt_obj.dactylShift) elem.dispatchEvent(evt); else { evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> events.onKeyPress(evt); break; } } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } finally { this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) evt.target.dispatchEvent(evt); } } }, |
this.feedingEvent = null; | feedkeys: function (keys, noremap, quiet) { let doc = window.document; let view = window.document.defaultView; let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { delete evt_obj.type; for (let type in values(["keydown", "keyup", "keypress"])) { let elem = dactyl.focus || buffer.focusedFrame; let evt = events.create(doc, type, evt_obj); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; // A special hack for dactyl-specific key names. if (!evt_obj.dactylString && !evt_obj.dactylShift) elem.dispatchEvent(evt); else { evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop> evt.dactylShift = evt_obj.dactylShift; // for untypeable shift keys e.g. <S-1> events.onKeyPress(evt); break; } } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } finally { this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) evt.target.dispatchEvent(evt); } } }, |
|
events.dispatch(dactyl.focus || buffer.focusedFrame, event); | events.dispatch(dactyl.focusedElement || buffer.focusedFrame, event); | feedkeys: function (keys, noremap, quiet) { let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; try { util.threadYield(1, true); for (let [, evt_obj] in Iterator(events.fromString(keys))) { for (let type in values(["keydown", "keyup", "keypress"])) { let evt = this.feedingEvent = update({}, evt_obj, { type: type }); if (isObject(noremap)) update(evt, noremap); else evt.noremap = !!noremap; evt.isMacro = true; let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt); if (!evt_obj.dactylString && !evt_obj.dactylShift) events.dispatch(dactyl.focus || buffer.focusedFrame, event); else events.onKeyPress(event); } if (!this.feedingKeys) break; // Stop feeding keys if page loading failed. if (modes.isReplaying && !this.waitForPageLoad()) break; } } catch (e) { util.reportError(e); } finally { this.feedingEvent = null; this.feedingKeys = wasFeeding; if (quiet) commandline.quiet = wasQuiet; if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; for (let [, evt] in Iterator(duringFeed)) events.dispatch(evt.target, evt); } } }, |
try { return fs.readFileSync(path); } catch(e) {} | try { return fs.readFileSync(path, 'utf8'); } catch(e) {} | this.fetch = function(path) { try { return fs.readFileSync(path); } catch(e) {} return false; } |
this.fetch = function(filePath) { try { return fs.readFileSync(filePath); } catch(e) {} | this.fetch = function(path) { try { return fs.readFileSync(path); } catch(e) {} | this.fetch = function(filePath) { try { return fs.readFileSync(filePath); } catch(e) {} return false; } |
log(ext.name); try{ maybeDeferred(ext.extract(TBRL.ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ console.log(e); }); }catch(e){} | var ctx = TBRL.ctx; TBRL.field_delete(); return TBRL.share(ctx, ext, true); } else { TBRL.field_delete(); return succeed(); | field_clicked: function(ev){ var button = $X('./ancestor-or-self::button[@class="taberareloo_button"]', ev.target)[0]; if(button){ var index = TBRL.buttons.indexOf(button); var ext = TBRL.exts[index]; log(ext.name); try{ maybeDeferred(ext.extract(TBRL.ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ console.log(e); }); }catch(e){} } TBRL.field_delete(); }, |
TBRL.field_delete(); | field_clicked: function(ev){ var button = $X('./ancestor-or-self::button[@class="taberareloo_button"]', ev.target)[0]; if(button){ var index = TBRL.buttons.indexOf(button); var ext = TBRL.exts[index]; log(ext.name); try{ maybeDeferred(ext.extract(TBRL.ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ console.log(e); }); }catch(e){} } TBRL.field_delete(); }, |
|
completion.file = function file(context, full, dir) { | completion.file = function file(context, args, full, dir) { | completion.file = function file(context, full, dir) { // dir == "" is expanded inside readDirectory to the current dir [dir] = (dir || context.filter).match(/^(?:.*[\/\\])?/); if (!full) context.advance(dir.length); context.title = [full ? "Path" : "Filename", "Type"]; context.keys = { text: !full ? "leafName" : function (f) dir + f.leafName, description: function (f) f.isDirectory() ? "Directory" : "File", isdir: function (f) f.isDirectory(), icon: function (f) f.isDirectory() ? "resource://gre/res/html/folder.png" : "moz-icon://" + f.leafName }; context.compare = function (a, b) b.isdir - a.isdir || String.localeCompare(a.text, b.text); if (options["wildignore"]) { let wig = options.get("wildignore"); context.filters.push(function ({ item }) item.isDirectory() || !wig.getKey(this.name)); } // context.background = true; context.key = dir; context.generate = function generate_file() { try { return io.File(dir).readDirectory(); } catch (e) {} return []; }; }; |
context.match = function (str) { let filter = this.filter; if (!filter) return true; if (this.ignoreCase) { filter = filter.toLowerCase(); str = str.toLowerCase(); } return str.substr(0, filter.length) === filter; }; | completion.file = function file(context, full) { // dir == "" is expanded inside readDirectory to the current dir let [dir] = context.filter.match(/^(?:.*[\/\\])?/); if (!full) context.advance(dir.length); context.title = [full ? "Path" : "Filename", "Type"]; context.keys = { text: !full ? "leafName" : function (f) dir + f.leafName, description: function (f) f.isDirectory() ? "Directory" : "File", isdir: function (f) f.isDirectory(), icon: function (f) f.isDirectory() ? "resource://gre/res/html/folder.png" : "moz-icon://" + f.leafName }; context.compare = function (a, b) b.isdir - a.isdir || String.localeCompare(a.text, b.text); // context.background = true; context.key = dir; context.generate = function generate_file() { try { return File(dir).readDirectory(); } catch (e) {} return []; }; }; |
|
console.log(fieldname); | function fileClick(e) { try { var image = e.target; if (!$(image).is('img')) { if (!$(image).is('a')) { image = $(image).parent(); } image = $(image).find('img'); } var fieldname = $('body').attr('widget_field_id'); fieldname = fieldname.replace('_link', ''); console.log(fieldname); $('#' + fieldname).val($(image).parent('a').attr('rel')).change(); $('#' + fieldname + '_image .imgselected').html($(image).parent().html()); $('#' + fieldname + '_image a.mediatorWidgetFormMediaSelect').html('Replace'); } catch (exception) { return false; } $(document).trigger('close.facebox') return false; } |
|
console.log(fieldname); | function fileClick(e) {//console.log('file clicked'); try { var image = e.target; if (!$(image).is('img')) { if (!$(image).is('a')) { image = $(image).parent(); } image = $(image).find('img'); }//console.log('image : ' + image); var fieldname = $('body').attr('widget_field_id');//console.log('fieldname : ' + fieldname); fieldname = fieldname.replace('_link', '');//console.log('fieldname : ' + fieldname); $('#' + fieldname).val($(image).parent('a').attr('rel')).change(); $('#' + fieldname + '_image .imgselected').html($(image).parent().html()); $('#' + fieldname + '_image a.mediatorWidgetFormMediaSelect').html('Replace'); } catch (exception) { return false; } $(document).trigger('close.facebox') return false; } |
|
filter: function ({ item: e }) e.enabled | filter: function ({ item: e }) !e.userDisabled | filter: function ({ item: e }) e.enabled } |
for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length- 1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, | for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, | for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, |
let str = this.bootstrap(pattern); | let str = this.bootstrap(pattern, backwards); | find: function (pattern, backwards) { let str = this.bootstrap(pattern); if (!this.rangeFind.search(str)) this.timeout(function () { dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0); return this.rangeFind.found; }, |
(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[]; for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length- | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length- | (E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length- |
if (jQuery._isBuffering <= 0) return jQuery.fn._jqb_originalFind.call(this, selector); | if (jQuery._isBuffering <= 0 && !this.isBuffered) return jQuery.fn._jqb_originalFind.call(this, selector); | jQuery.fn.find = function(selector) { // if we are not currently buffering, don't bother with this crap. if (jQuery._isBuffering <= 0) return jQuery.fn._jqb_originalFind.call(this, selector); var ret = jQuery.buffer(), length = 0; for ( var i = 0, l = this.length; i < l; i++ ) { length = ret.length; jQuery.find( selector, this[i], ret ); if ( i > 0 ) { // Make sure that the results are unique for ( var n = length; n < ret.length; n++ ) { for ( var r = 0; r < length; r++ ) { if ( ret[r] === ret[n] ) { ret.splice(n--, 1); break; } } } } } return ret; }; |
else if (this.rangeFind.wrapped) { | else if (this.rangeFind.wrapped) | findAgain: function (reverse) { if (!this.rangeFind) this.find(this.lastSearchPattern); else if (!this.rangeFind.search(null, reverse)) dactyl.echoerr("E486: Pattern not found: " + this.lastSearchPattern); else if (this.rangeFind.wrapped) { // hack needed, because wrapping causes a "scroll" event which clears // our command line this.setTimeout(function () { let msg = this.rangeFind.backward ? "search hit TOP, continuing at BOTTOM" : "search hit BOTTOM, continuing at TOP"; commandline.echo(msg, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES); }, 0); } else commandline.echo((this.rangeFind.backward ? "?" : "/") + this.lastSearchPattern, null, commandline.FORCE_SINGLELINE); if (options["hlsearch"]) this.highlight(); this.rangeFind.focus(); }, |
commandline.echo(msg, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES); | commandline.echo(msg, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES | commandline.FORCE_SINGLELINE); | findAgain: function (reverse) { if (!this.rangeFind) this.find(this.lastSearchPattern); else if (!this.rangeFind.search(null, reverse)) dactyl.echoerr("E486: Pattern not found: " + this.lastSearchPattern); else if (this.rangeFind.wrapped) { // hack needed, because wrapping causes a "scroll" event which clears // our command line this.setTimeout(function () { let msg = this.rangeFind.backward ? "search hit TOP, continuing at BOTTOM" : "search hit BOTTOM, continuing at TOP"; commandline.echo(msg, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES); }, 0); } else commandline.echo((this.rangeFind.backward ? "?" : "/") + this.lastSearchPattern, null, commandline.FORCE_SINGLELINE); if (options["hlsearch"]) this.highlight(); this.rangeFind.focus(); }, |
} | findAgain: function (reverse) { if (!this.rangeFind) this.find(this.lastSearchPattern); else if (!this.rangeFind.search(null, reverse)) dactyl.echoerr("E486: Pattern not found: " + this.lastSearchPattern); else if (this.rangeFind.wrapped) { // hack needed, because wrapping causes a "scroll" event which clears // our command line this.setTimeout(function () { let msg = this.rangeFind.backward ? "search hit TOP, continuing at BOTTOM" : "search hit BOTTOM, continuing at TOP"; commandline.echo(msg, commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES); }, 0); } else commandline.echo((this.rangeFind.backward ? "?" : "/") + this.lastSearchPattern, null, commandline.FORCE_SINGLELINE); if (options["hlsearch"]) this.highlight(); this.rangeFind.focus(); }, |
|
findChildElements: function(element, expressions) { expressions = Selector.split(expressions.join(',')); var results = [], h = Selector.handlers; for (var i = 0, l = expressions.length, selector; i < l; i++) { selector = new Selector(expressions[i].strip()); h.concat(results, selector.findElements(element)); } return (l > 1) ? h.unique(results) : results; } | 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])*?\*\ | findChildElements: function(element, expressions) { expressions = Selector.split(expressions.join(',')); var results = [], h = Selector.handlers; for (var i = 0, l = expressions.length, selector; i < l; i++) { selector = new Selector(expressions[i].strip()); h.concat(results, selector.findElements(element)); } return (l > 1) ? h.unique(results) : results; } |
switch(SC.typeOf(value)) { | switch(type) { | function findClassNames() { if (SC._object_foundObjectClassNames) return ; SC._object_foundObjectClassNames = true ; var seen = [] ; var detectedSC = false; var searchObject = function(root, object, levels) { levels-- ; // not the fastest, but safe if (seen.indexOf(object) >= 0) return ; seen.push(object) ; for(var key in object) { if (key == '__scope__') continue ; if (key == 'superclass') continue ; if (key == '__SC__') key = 'SC' ; if (!key.match(/^[A-Z0-9]/)) continue ; if (key == 'SC') { if (detectedSC) continue; detectedSC = true; } var path = (root) ? [root,key].join('.') : key ; var value = object[key] ; switch(SC.typeOf(value)) { case SC.T_CLASS: if (!value._object_className) value._object_className = path; if (levels>=0) searchObject(path, value, levels) ; break ; case SC.T_OBJECT: if (levels>=0) searchObject(path, value, levels) ; break ; case SC.T_HASH: if (((root) || (path==='SC')) && (levels>=0)) searchObject(path, value, levels) ; break ; default: break; } } } ; // Fix for IE 7 and 8 in order to detect the SC global variable. When you create // a global variable in IE, it is not added to the window object like in other // browsers. Therefore the searchObject method will not pick it up. So we have to // update the window object to have a reference to the global variable. And // doing window['SC'] does not work since the global variable already exists. For // any object that you create that is used act as a namespace, be sure to create it // like so: // // window.MyApp = window.MyApp || SC.Object.create({ ... }) // window['__SC__'] = SC; searchObject(null, window, 2) ;} |
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); }, | 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])*?\*\ | 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); }, |
findElements: function(root) { root = root || document; var e = this.expression, results; switch (this.mode) { case 'selectorsAPI': if (root !== document) { var oldId = root.id, id = $(root).identify(); e = "#" + id + " " + e; } results = $A(root.querySelectorAll(e)).map(Element.extend); root.id = oldId; return results; case 'xpath': return document._getElementsByXPath(this.xpath, root); default: return this.matcher(root); } }, | 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])*?\*\ | findElements: function(root) { root = root || document; var e = this.expression, results; switch (this.mode) { case 'selectorsAPI': // querySelectorAll queries document-wide, then filters to descendants // of the context element. That's not what we want. // Add an explicit context to the selector if necessary. if (root !== document) { var oldId = root.id, id = $(root).identify(); e = "#" + id + " " + e; } results = $A(root.querySelectorAll(e)).map(Element.extend); root.id = oldId; return results; case 'xpath': return document._getElementsByXPath(this.xpath, root); default: return this.matcher(root); } }, |
findFirstElement: function(form) { var elements = $(form).getElements().findAll(function(element) { return 'hidden' != element.type && !element.disabled; }); var firstByIndex = elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >= 0; }).sortBy(function(element) { return element.tabIndex }).first(); 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])*?\*\ | findFirstElement: function(form) { var elements = $(form).getElements().findAll(function(element) { return 'hidden' != element.type && !element.disabled; }); var firstByIndex = elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >= 0; }).sortBy(function(element) { return element.tabIndex }).first(); return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); }); }, |
if (topic in services.get("dactyl:").FILE_MAP) | if (!unchunked && topic in services.get("dactyl:").FILE_MAP) | findHelp: function (topic, unchunked) { if (topic in services.get("dactyl:").FILE_MAP) return topic; unchunked = !!unchunked; let items = completion._runCompleter("help", topic, null, unchunked).items; let partialMatch = null; function format(item) item.description + "#" + encodeURIComponent(item.text); for (let [i, item] in Iterator(items)) { if (item.text == topic) return format(item); else if (!partialMatch && topic) partialMatch = item; } if (partialMatch) return format(partialMatch); return null; }, |
if (typeof name == "number") | if (isinstance(name, Number)) | function findMode(name) { if (typeof name == "number") return name; for (let mode in modes.mainModes) if (name == mode.char || name == mode.name.toLowerCase()) return mode.mask; return null; } |
function findModule(possibilities) { | function findModule(possibilities, opts) { | function findModule(possibilities) { var src; for (var i = 0, possible; possible = possibilities[i]; ++i) { var path = possible.filePath, cachedVersion = sourceCache[path]; if (cachedVersion) { return cachedVersion; } /*if (/^\.\//.test(path)) { // remove one path segment for each dot from the cwd path = addEndSlash(ENV.getCwd()) + path; }*/ src = ENV.fetch(path); if (src !== false) { possible.src = src; return possible; } } return false; } |
var path = possible.filePath, | var path = possible.path, | function findModule(possibilities) { var src; for (var i = 0, possible; possible = possibilities[i]; ++i) { var path = possible.filePath, cachedVersion = sourceCache[path]; if (cachedVersion) { return cachedVersion; } /*if (/^\.\//.test(path)) { // remove one path segment for each dot from the cwd path = addEndSlash(ENV.getCwd()) + path; }*/ src = ENV.fetch(path); if (src !== false) { possible.src = src; return possible; } } return false; } |
if (cachedVersion) { return cachedVersion; } | if (cachedVersion && !opts.reload) { return cachedVersion; } | function findModule(possibilities) { var src; for (var i = 0, possible; possible = possibilities[i]; ++i) { var path = possible.filePath, cachedVersion = sourceCache[path]; if (cachedVersion) { return cachedVersion; } /*if (/^\.\//.test(path)) { // remove one path segment for each dot from the cwd path = addEndSlash(ENV.getCwd()) + path; }*/ src = ENV.fetch(path); if (src !== false) { possible.src = src; return possible; } } return false; } |
if (cachedVersion && !opts.reload) { return cachedVersion; } | if (cachedVersion) { possible.src = cachedVersion.src; return possible; } | function findModule(possibilities, opts) { var src; for (var i = 0, possible; possible = possibilities[i]; ++i) { var path = possible.path, cachedVersion = sourceCache[path]; if (cachedVersion && !opts.reload) { return cachedVersion; } /*if (/^\.\//.test(path)) { // remove one path segment for each dot from the cwd path = addEndSlash(ENV.getCwd()) + path; }*/ src = ENV.fetch(path); if (src !== false) { possible.src = src; return possible; } else { failedFetch[path] = true; } } return false; } |
src = ENV.fetch(possible.filePath); | var path = possible.filePath, cachedVersion = sourceCache[path]; if (cachedVersion) { return cachedVersion; } src = ENV.fetch(path); | function findModule(possibilities) { var src; for (var i = 0, possible; possible = possibilities[i]; ++i) { src = ENV.fetch(possible.filePath); if (src !== false) { possible.src = src; return possible; } } return false; } |
if (pattern.hostnameExact) | if (pattern.hostnameExact || (url.hostname.length == 0)) | findPatternForUrl : function(url) { for(var i = 0 ;i < this.urlPatterns.length ; i++ ) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = true; } else { var pos = url.hostname.indexOf(pattern.hostname); if ((pos > -1) && (pos + pattern.hostname.length == url.hostname.length)) { hostMatch = true; } } if (hostMatch && (pattern.pathnamePrefix && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return i; } } return -1; }, |
if (url.hostname == pattern.hostname) | if (pattern.hostname == url.hostname) { | findPatternForUrl : function(url) { for(var i = 0 ;i < this.urlPatterns.length ; i++ ) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = true; } else { var pos = url.hostname.indexOf(pattern.hostname); if ((pos > -1) && (pos + pattern.hostname.length == url.hostname.length)) { hostMatch = true; } } if (hostMatch && (pattern.pathnamePrefix && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return i; } } return -1; }, |
(pattern.pathnamePrefix && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) | ((pattern.pathnamePrefix && (url.pathname == pattern.pathname)) || (url.pathname.indexOf(pattern.pathname) == 0))) | findPatternForUrl : function(url) { for(var i = 0 ;i < this.urlPatterns.length ; i++ ) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = true; } else { var pos = url.hostname.indexOf(pattern.hostname); if ((pos > -1) && (pos + pattern.hostname.length == url.hostname.length)) { hostMatch = true; } } if (hostMatch && (pattern.pathnamePrefix && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return i; } } return -1; }, |
r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0); | r.window == win && RangeFind.contains(r.range, range)); | findRange: function (range) { let doc = range.startContainer.ownerDocument; let win = doc.defaultView; let ranges = this.ranges.filter(function (r) r.window == win && r.range.compareBoundaryPoints(Range.START_TO_END, range) >= 0 && r.range.compareBoundaryPoints(Range.END_TO_START, range) <= 0); if (this.backward) return ranges[ranges.length - 1]; return ranges[0]; }, |
let r = doc.createRange(); r.selectNode(elem); if (range.compareBoundaryPoints(Range.START_TO_END, r) >= 0 && range.compareBoundaryPoints(Range.END_TO_START, r) <= 0) | let r = RangeFind.nodeRange(elem); if (RangeFind.contains(range, r)) | findSubRanges: function (range) { let doc = range.startContainer.ownerDocument; for (let elem in util.evaluateXPath(this.elementPath, doc)) { let r = doc.createRange(); r.selectNode(elem); if (range.compareBoundaryPoints(Range.START_TO_END, r) >= 0 && range.compareBoundaryPoints(Range.END_TO_START, r) <= 0) yield r; } }, |
if (doctest._AbortCalled) { logWarn('Abort() called'); return; } | var finishThisRun = function () { self.finishRun(example); self.runParsed(parsed, index+1, finishedCallback); }; |
|
stop(ev); var item = this.getCurrentItem(); if(!item) return null; var sel = createFlavoredString(window.getSelection()); var ctx = update({ document : document, window : window, selection : (!!sel.raw)? sel : null, target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http: 'http: 'http: 'http: 'http: '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; | if(!('selectionStart' in ev.target && ev.target.disabled !== true)){ var item = this.getCurrentItem(); if(!item) return null; stop(ev); var sel = createFlavoredString(window.getSelection()); var ctx = update({ document : document, window : window, selection : (!!sel.raw)? sel : null, target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http: 'http: 'http: 'http: 'http: '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; } addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); | fire : function(ev){ var key = keyString(ev); if(key !== this.key) return null; stop(ev); var item = this.getCurrentItem(); if(!item) return null; var sel = createFlavoredString(window.getSelection()); var ctx = update({ document : document, window : window, selection : (!!sel.raw)? sel : null, target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http://ffffound.com', 'http://www.bighappyfunhouse.com', 'http://f.hatena.ne.jp', 'http://lpcoverlover.com', 'http://www.chicksnbreasts.com', '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; } addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); }, |
addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); | fire : function(ev){ var key = keyString(ev); if(key !== this.key) return null; stop(ev); var item = this.getCurrentItem(); if(!item) return null; var sel = createFlavoredString(window.getSelection()); var ctx = update({ document : document, window : window, selection : (!!sel.raw)? sel : null, target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http://ffffound.com', 'http://www.bighappyfunhouse.com', 'http://f.hatena.ne.jp', 'http://lpcoverlover.com', 'http://www.chicksnbreasts.com', '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; } addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); }, |
|
selection : createFlavoredString(window.getSelection()), | selection : (!!sel.raw) sel : null, | fire : function(ev){ var key = keyString(ev); if(key !== this.key) return null; stop(ev); var item = this.getCurrentItem(); if(!item) return null; var ctx = update({ document : document, window : window, selection : createFlavoredString(window.getSelection()), target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http://ffffound.com', 'http://www.bighappyfunhouse.com', 'http://f.hatena.ne.jp', 'http://lpcoverlover.com', 'http://www.chicksnbreasts.com', '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; } addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); }, |
selection : window.getSelection(), | selection : createFlavoredString(window.getSelection()), | fire : function(ev){ var key = keyString(ev); if(key !== this.key) return null; stop(ev); var item = this.getCurrentItem(); if(!item) return null; var ctx = update({ document : document, window : window, selection : window.getSelection(), target : item.target, event : {}, title : null, mouse : null, menu : null }, window.location); if([ 'flickr.com/', 'http://ffffound.com', 'http://www.bighappyfunhouse.com', 'http://f.hatena.ne.jp', 'http://lpcoverlover.com', 'http://www.chicksnbreasts.com', '1eb46a2f1f83c340eee10cd49c144625'].some(function(pattern){ return item.feed.channel.link.indexOf(pattern) != -1; })){ ctx.onImage = true; ctx.target = $X('./descendant::img[0]', item.body)[0]; } addElementClass(item.parent, 'TBRL_posted'); var ext = Extractors.check(ctx)[0]; return TBRL.share(ctx, ext, ext.name.match(/^Link /)); }, |
var selector = ''; $.each(AjaxHooks.updatedDomIds, function() { selector += '#' + this + ','; }); | var selector = AjaxHooks.updatedDomIds.join(','); | firePostAjax: function() { if (AjaxHooks.updatedDomIds.length) { // Select the updated elements by ID. var selector = ''; $.each(AjaxHooks.updatedDomIds, function() { selector += '#' + this + ','; }); // Invoke the callbacks passing the elements. var updatedDomElements = $(selector); $.each(AjaxHooks.postAjaxCallbacks, function() { this(updatedDomElements); }); // Clean up the list of updated IDs. AjaxHooks.updatedDomIds = []; } } |
first: function() { return this[0]; }, | Ext.DomHelper=function(){var m=null;var g=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var b=/^table|tbody|tr|td$/i;var a=function(w){if(typeof w=="string"){return w}var q="";if(Ext.isArray(w)){for(var u=0,r=w.length;u<r;u++){q+=a(w[u])}return q}if(!w.tag){w.tag="div"}q+="<"+w.tag;for(var p in w){if(p=="tag"||p=="children"||p=="cn"||p=="html"||typeof w[p]=="function"){continue}if(p=="style"){var v=w.style;if(typeof v=="function"){v=v.call()}if(typeof v=="string"){q+=' style="'+v+'"'}else{if(typeof v=="object"){q+=' style="';for(var t in v){if(typeof v[t]!="function"){q+=t+":"+v[t]+";"}}q+='"'}}}else{if(p=="cls"){q+=' class="'+w.cls+'"'}else{if(p=="htmlFor"){q+=' for="'+w.htmlFor+'"'}else{q+=" "+p+'="'+w[p]+'"'}}}}if(g.test(w.tag)){q+="/>"}else{q+=">";var x=w.children||w.cn;if(x){q+=a(x)}else{if(w.html){q+=w.html}}q+="</"+w.tag+">"}return q};var n=function(v,q){var u;if(Ext.isArray(v)){u=document.createDocumentFragment();for(var t=0,r=v.length;t<r;t++){n(v[t],u)}}else{if(typeof v=="string"){u=document.createTextNode(v)}else{u=document.createElement(v.tag||"div");var s=!!u.setAttribute;for(var p in v){if(p=="tag"||p=="children"||p=="cn"||p=="html"||p=="style"||typeof v[p]=="function"){continue}if(p=="cls"){u.className=v.cls}else{if(s){u.setAttribute(p,v[p])}else{u[p]=v[p]}}}Ext.DomHelper.applyStyles(u,v.style);var w=v.children||v.cn;if(w){n(w,u)}else{if(v.html){u.innerHTML=v.html}}}}if(q){q.appendChild(u)}return u};var j=function(u,r,q,t){m.innerHTML=[r,q,t].join("");var o=-1,p=m;while(++o<u){p=p.firstChild}return p};var k="<table>",e="</table>",c=k+"<tbody>",l="</tbody>"+e,i=c+"<tr>",d="</tr>"+l;var h=function(o,p,r,q){if(!m){m=document.createElement("div")}var s;var t=null;if(o=="td"){if(p=="afterbegin"||p=="beforeend"){return}if(p=="beforebegin"){t=r;r=r.parentNode}else{t=r.nextSibling;r=r.parentNode}s=j(4,i,q,d)}else{if(o=="tr"){if(p=="beforebegin"){t=r;r=r.parentNode;s=j(3,c,q,l)}else{if(p=="afterend"){t=r.nextSibling;r=r.parentNode;s=j(3,c,q,l)}else{if(p=="afterbegin"){t=r.firstChild}s=j(4,i,q,d)}}}else{if(o=="tbody"){if(p=="beforebegin"){t=r;r=r.parentNode;s=j(2,k,q,e)}else{if(p=="afterend"){t=r.nextSibling;r=r.parentNode;s=j(2,k,q,e)}else{if(p=="afterbegin"){t=r.firstChild}s=j(3,c,q,l)}}}else{if(p=="beforebegin"||p=="afterend"){return}if(p=="afterbegin"){t=r.firstChild}s=j(2,k,q,e)}}}r.insertBefore(s,t);return s};return{useDom:false,markup:function(p){return a(p)},applyStyles:function(q,r){if(r){q=Ext.fly(q);if(typeof r=="string"){var p=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var s;while((s=p.exec(r))!=null){q.setStyle(s[1],s[2])}}else{if(typeof r=="object"){for(var o in r){q.setStyle(o,r[o])}}else{if(typeof r=="function"){Ext.DomHelper.applyStyles(q,r.call())}}}}},insertHtml:function(q,s,r){q=q.toLowerCase();if(s.insertAdjacentHTML){if(b.test(s.tagName)){var p;if(p=h(s.tagName.toLowerCase(),q,s,r)){return p}}switch(q){case"beforebegin":s.insertAdjacentHTML("BeforeBegin",r);return s.previousSibling;case"afterbegin":s.insertAdjacentHTML("AfterBegin",r);return s.firstChild;case"beforeend":s.insertAdjacentHTML("BeforeEnd",r);return s.lastChild;case"afterend":s.insertAdjacentHTML("AfterEnd",r);return s.nextSibling}throw'Illegal insertion point -> "'+q+'"'}var o=s.ownerDocument.createRange();var t;switch(q){case"beforebegin":o.setStartBefore(s);t=o.createContextualFragment(r);s.parentNode.insertBefore(t,s);return s.previousSibling;case"afterbegin":if(s.firstChild){o.setStartBefore(s.firstChild);t=o.createContextualFragment(r);s.insertBefore(t,s.firstChild);return s.firstChild}else{s.innerHTML=r;return s.firstChild}case"beforeend":if(s.lastChild){o.setStartAfter(s.lastChild);t=o.createContextualFragment(r);s.appendChild(t);return s.lastChild}else{s.innerHTML=r;return s.lastChild}case"afterend":o.setStartAfter(s);t=o.createContextualFragment(r);s.parentNode.insertBefore(t,s.nextSibling);return s.nextSibling}throw'Illegal insertion point -> "'+q+'"'},insertBefore:function(p,r,q){return this.doInsert(p,r,q,"beforeBegin")},insertAfter:function(p,r,q){return this.doInsert(p,r,q,"afterEnd","nextSibling")},insertFirst:function(p,r,q){return this.doInsert(p,r,q,"afterBegin","firstChild")},doInsert:function(s,u,t,v,r){s=Ext.getDom(s);var q;if(this.useDom){q=n(u,null);(r==="firstChild"?s:s.parentNode).insertBefore(q,r?s[r]:s)}else{var p=a(u);q=this.insertHtml(v,s,p)}return t?Ext.get(q,true):q},append:function(r,t,s){r=Ext.getDom(r);var q;if(this.useDom){q=n(t,null);r.appendChild(q)}else{var p=a(t);q=this.insertHtml("beforeEnd",r,p)}return s?Ext.get(q,true):q},overwrite:function(p,r,q){p=Ext.getDom(p);p.innerHTML=a(r);return q?Ext.get(p.firstChild,true):p.firstChild},createTemplate:function(q){var p=a(q);return new Ext.Template(p)}}}();Ext.Template=function(g){var c=arguments;if(Ext.isArray(g)){g=g.join("")}else{if(c.length>1){var d=[];for(var e=0,b=c.length;e<b;e++){if(typeof c[e]=="object"){Ext.apply(this,c[e])}else{d[d.length]=c[e]}}g=d.join("")}}this.html=g;if(this.compiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(b){if(this.compiled){return this.compiled(b)}var a=this.disableFormats!==true;var e=Ext.util.Format,c=this;var d=function(h,k,o,j){if(o&&a){if(o.substr(0,5)=="this."){return c.call(o.substr(5),b[k],b)}else{if(j){var n=/^\s*['"](.*)["']\s*$/;j=j.split(",");for(var l=0,g=j.length;l<g;l++){j[l]=j[l].replace(n,"$1")}j=[b[k]].concat(j)}else{j=[b[k]]}return e[o].apply(e,j)}}else{return b[k]!==undefined?b[k]:""}};return this.html.replace(this.re,d)},set:function(a,b){this.html=a;this.compiled=null;if(b){this.compile()}return this},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isGecko){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this},call:function(c,b,a){return this[c](b,a)},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=window.ActiveXObject?true:false;eval("var batch = 30803;");var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}var d=++key;for(var i=0;i<len1;i++){c1[i]._qdiff=d}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;var lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var a=this.events[arguments[0].toLowerCase()];if(typeof a=="object"){return a.fire.apply(a,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(a,c,b,h){if(typeof a=="object"){h=a;for(var g in h){if(this.filterOptRe.test(g)){continue}if(typeof h[g]=="function"){this.addListener(g,h[g],h.scope,h)}else{this.addListener(g,h[g].fn,h[g].scope,h[g])}}return}h=(!h||typeof h=="boolean")?{}:h;a=a.toLowerCase();var d=this.events[a]||true;if(typeof d=="boolean"){d=new Ext.util.Event(this,a);this.events[a]=d}d.addListener(c,b,h)},removeListener:function(a,c,b){var d=this.events[a.toLowerCase()];if(typeof d=="object"){d.removeListener(c,b)}},purgeListeners:function(){for(var a in this.events){if(typeof this.events[a]=="object"){this.events[a].clearListeners()}}},relayEvents:function(g,d){var e=function(h){return function(){return this.fireEvent.apply(this,Ext.combine(h,Array.prototype.slice.call(arguments,0)))}};for(var c=0,a=d.length;c<a;c++){var b=d[c];if(!this.events[b]){this.events[b]=true}g.on(b,e(b),this)}},addEvents:function(e){if(!this.events){this.events={}}if(typeof e=="string"){for(var d=0,b=arguments,c;c=b[d];d++){if(!this.events[b[d]]){this.events[b[d]]=true}}}else{Ext.applyIf(this.events,e)}},hasListener:function(a){var b=this.events[a];return typeof b=="object"&&b.listeners.length>0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(i){if(!this.methodEvents){this.methodEvents={}}var h=this.methodEvents[i];if(!h){h={};this.methodEvents[i]=h;h.originalFn=this[i];h.methodName=i;h.before=[];h.after=[];var c,b,d;var g=this;var a=function(k,j,e){if((b=k.apply(j||g,e))!==undefined){if(typeof b==="object"){if(b.returnValue!==undefined){c=b.returnValue}else{c=b}if(b.cancel===true){d=true}}else{if(b===false){d=true}else{c=b}}}};this[i]=function(){c=b=undefined;d=false;var j=Array.prototype.slice.call(arguments,0);for(var k=0,e=h.before.length;k<e;k++){a(h.before[k].fn,h.before[k].scope,j);if(d){return c}}if((b=h.originalFn.apply(g,j))!==undefined){c=b}for(var k=0,e=h.after.length;k<e;k++){a(h.after[k].fn,h.after[k].scope,j);if(d){return c}}return c}}return h},beforeMethod:function(d,b,a){var c=this.getMethodEvent(d);c.before.push({fn:b,scope:a})},afterMethod:function(d,b,a){var c=this.getMethodEvent(d);c.after.push({fn:b,scope:a})},removeMethodListener:function(h,d,c){var g=this.getMethodEvent(h);for(var b=0,a=g.before.length;b<a;b++){if(g.before[b].fn==d&&g.before[b].scope==c){g.before.splice(b,1);return}}for(var b=0,a=g.after.length;b<a;b++){if(g.after[b].fn==d&&g.after[b].scope==c){g.after.splice(b,1);return}}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(c,b,a){c.fireEvent=c.fireEvent.createInterceptor(b,a)};Ext.util.Observable.releaseCapture=function(a){a.fireEvent=Ext.util.Observable.prototype.fireEvent};(function(){var b=function(g,i,e){var d=new Ext.util.DelayedTask();return function(){d.delay(i.buffer,g,e,Array.prototype.slice.call(arguments,0))}};var c=function(i,j,g,d){return function(){j.removeListener(g,d);return i.apply(d,arguments)}};var a=function(e,g,d){return function(){var h=Array.prototype.slice.call(arguments,0);setTimeout(function(){e.apply(d,h)},g.delay||10)}};Ext.util.Event=function(e,d){this.name=d;this.obj=e;this.listeners=[]};Ext.util.Event.prototype={addListener:function(h,g,e){g=g||this.obj;if(!this.isListening(h,g)){var d=this.createListener(h,g,e);if(!this.firing){this.listeners.push(d)}else{this.listeners=this.listeners.slice(0);this.listeners.push(d)}}},createListener:function(i,g,j){j=j||{};g=g||this.obj;var d={fn:i,scope:g,options:j};var e=i;if(j.delay){e=a(e,j,g)}if(j.single){e=c(e,this,i,g)}if(j.buffer){e=b(e,j,g)}d.fireFn=e;return d},findListener:function(k,j){j=j||this.obj;var g=this.listeners;for(var h=0,d=g.length;h<d;h++){var e=g[h];if(e.fn==k&&e.scope==j){return h}}return -1},isListening:function(e,d){return this.findListener(e,d)!=-1},removeListener:function(g,e){var d;if((d=this.findListener(g,e))!=-1){if(!this.firing){this.listeners.splice(d,1)}else{this.listeners=this.listeners.slice(0);this.listeners.splice(d,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var g=this.listeners,k,d=g.length;if(d>0){this.firing=true;var h=Array.prototype.slice.call(arguments,0);for(var j=0;j<d;j++){var e=g[j];if(e.fireFn.apply(e.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();Ext.EventManager=function(){var w,p,l=false;var m,v,g,r;var o=Ext.lib.Event;var q=Ext.lib.Dom;var a="Ext";var i={};var n=function(C,y,B,A,z){var E=Ext.id(C);if(!i[E]){i[E]={}}var D=i[E];if(!D[y]){D[y]=[]}var x=D[y];x.push({id:E,ename:y,fn:B,wrap:A,scope:z});o.on(C,y,A);if(y=="mousewheel"&&C.addEventListener){C.addEventListener("DOMMouseScroll",A,false);o.on(window,"unload",function(){C.removeEventListener("DOMMouseScroll",A,false)})}if(y=="mousedown"&&C==document){Ext.EventManager.stoppedMouseDownEvent.addListener(A)}};var h=function(z,B,F,H){z=Ext.getDom(z);var x=Ext.id(z),G=i[x],y;if(G){var D=G[B],A;if(D){for(var C=0,E=D.length;C<E;C++){A=D[C];if(A.fn==F&&(!H||A.scope==H)){y=A.wrap;o.un(z,B,y);D.splice(C,1);break}}}}if(B=="mousewheel"&&z.addEventListener&&y){z.removeEventListener("DOMMouseScroll",y,false)}if(B=="mousedown"&&z==document&&y){Ext.EventManager.stoppedMouseDownEvent.removeListener(y)}};var d=function(B){B=Ext.getDom(B);var D=Ext.id(B),C=i[D],y;if(C){for(var A in C){if(C.hasOwnProperty(A)){y=C[A];for(var z=0,x=y.length;z<x;z++){o.un(B,A,y[z].wrap);y[z]=null}}C[A]=null}delete i[D]}};var c=function(){if(!l){l=true;Ext.isReady=true;if(p){clearInterval(p)}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",c,false)}if(Ext.isIE){var x=document.getElementById("ie-deferred-loader");if(x){x.onreadystatechange=null;x.parentNode.removeChild(x)}}if(w){w.fire();w.clearListeners()}}};var b=function(){w=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",c,false)}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src=" | first: function() { return this[0]; }, |
firstDescendant: function(element) { element = $(element).firstChild; while (element && element.nodeType != 1) element = element.nextSibling; return $(element); }, | 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])*?\*\ | firstDescendant: function(element) { element = $(element).firstChild; while (element && element.nodeType != 1) element = element.nextSibling; return $(element); }, |
if(this.get('canSelectGroups')) return objects.get('firstObject'); | firstSelectableObject: function() { var objects = this.get('arrangedObjects'), indexes, len, idx = 0; if (!objects) return null; // fast track indexes = objects.contentGroupIndexes(null, objects); len = objects.get('length'); while(indexes.contains(idx) && (idx<len)) idx++; return idx>=len ? null : objects.objectAt(idx); }.property() |
|
this._hideOverflow(); | fitPositionToScreen: function(preferredPosition, picker, anchor) { // get window rect. //if(this._prefPosX && this._prefPosY) var wsize = SC.RootResponder.responder.computeWindowSize(), wret = { x: 0, y: 0, width: wsize.width, height: wsize.height } ; picker.x = preferredPosition.x ; picker.y = preferredPosition.y ; if(this.preferType) { switch(this.preferType) { case SC.PICKER_MENU: // apply menu re-position rule picker = this.fitPositionToScreenMenu(wret, picker, this.get('isSubMenu')) ; break; case SC.PICKER_MENU_POINTER: this.setupPointer(anchor); picker = this.fitPositionToScreenMenuPointer(wret, picker, anchor); break; case SC.PICKER_POINTER: // apply pointer re-position rule this.setupPointer(anchor); picker = this.fitPositionToScreenPointer(wret, picker, anchor) ; break; case SC.PICKER_FIXED: // skip fitPositionToScreen break; default: break; } } else { // apply default re-position rule picker = this.fitPositionToScreenDefault(wret, picker, anchor) ; } this.displayDidChange(); this._hideOverflow(); return picker ; }, |
|
props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement|| s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&& a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a, | fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this, | props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a, |
flowPositionView: function(idx, item, x, y) { var spacing = item._scfl_cachedFlowSpacing, size = item._scfl_cachedCalculatedFlowSize; var last = this._scfl_itemLayouts[SC.guidFor(item)]; | flowPositionView: function(idx, item, x, y, width, height) { var last = this._scfl_itemLayouts[SC.guidFor(item)], spacing = item._scfl_cachedSpacing; | flowPositionView: function(idx, item, x, y) { var spacing = item._scfl_cachedFlowSpacing, size = item._scfl_cachedCalculatedFlowSize; var last = this._scfl_itemLayouts[SC.guidFor(item)]; var l = { left: x + spacing.left, top: y + spacing.top, width: size.width, height: size.height }; // we must set this first, or it will think it has to update layout again, and again, and again // and we get a crash. this._scfl_itemLayouts[SC.guidFor(item)] = l; // Also, never set if the same. We only want to compare layout properties, though if (last && last.left == l.left && last.top == l.top && last.width == l.width && last.height == l.height ) { return; } item.set('layout', l); }, |
top: y + spacing.top, width: size.width, height: size.height | top: y + spacing.top | flowPositionView: function(idx, item, x, y) { var spacing = item._scfl_cachedFlowSpacing, size = item._scfl_cachedCalculatedFlowSize; var last = this._scfl_itemLayouts[SC.guidFor(item)]; var l = { left: x + spacing.left, top: y + spacing.top, width: size.width, height: size.height }; // we must set this first, or it will think it has to update layout again, and again, and again // and we get a crash. this._scfl_itemLayouts[SC.guidFor(item)] = l; // Also, never set if the same. We only want to compare layout properties, though if (last && last.left == l.left && last.top == l.top && last.width == l.width && last.height == l.height ) { return; } item.set('layout', l); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.