rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
}) }, desc)); | return pop.superapply(this, arguments); } }); this._mainModes = [this.NONE]; this._lastMode = 0; this._modeMap = {}; this.boundProperties = {}; this.addMode("NORMAL", { char: "n", display: function () null }); this.addMode("INSERT", { char: "i", input: true, ownsFocus: true }); this.addMode("VISUAL", { char: "v", ownsFocus: true, display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : "") }, { leave: function (stack, newMode) { if (newMode.main == modes.CARET) { let selection = window.content.getSelection(); if (selection && !selection.isCollapsed) selection.collapseToStart(); } else editor.unselectText(); } }); this.addMode("COMMAND_LINE", { char: "c", input: true, display: function () modes.extended & modes.OUTPUT_MULTILINE ? null : this.disp }); this.addMode("CARET", {}, { get pref() prefs.get("accessibility.browsewithcaret"), set pref(val) prefs.set("accessibility.browsewithcaret", val), enter: function (stack) { if (stack.pop && !this.pref) modes.pop(); else if (!stack.pop && !this.pref) this.pref = true; }, leave: function (stack) { if (!stack.push && this.pref) this.pref = false; } }); this.addMode("TEXT_EDIT", { char: "t", ownsFocus: true }); this.addMode("EMBED", { input: true, ownsFocus: true }); this.addMode("PASS_THROUGH"); this.addMode("QUOTE", { display: function () modes.getStack(1).main == modes.PASS_THROUGH ? (modes.getStack(2).mainMode.display() || modes.getStack(2).mainMode.name) + " (next)" : "PASS THROUGH (next)" }); this.addMode("EX", true); this.addMode("HINTS", true); this.addMode("INPUT_MULTILINE", true); this.addMode("OUTPUT_MULTILINE", true); this.addMode("SEARCH_FORWARD", true); this.addMode("SEARCH_BACKWARD", true); this.addMode("MENU", true); this.addMode("LINE", true); this.addMode("PROMPT", true); this.push(this.NORMAL, 0, { enter: function (stack, prev) { if (prefs.get("accessibility.browsewithcaret")) prefs.set("accessibility.browsewithcaret", false); statusline.updateUrl(); if (prev.mainMode.input || prev.mainMode.ownsFocus) dactyl.focusContent(true); if (prev.main === modes.NORMAL) { dactyl.focusContent(true); let selection = window.content.getSelection(); if (selection && !selection.isCollapsed) selection.collapseToStart(); } } }); }, | init: function (prop) update(this, { get: function () { if (desc.get) var val = desc.get.call(this, value); return val === undefined ? value : val; }, set: function (val) { modes.save(id, this, prop); if (desc.set) value = desc.set.call(this, val); value = !desc.set || value === undefined ? val : value; } }) }, desc)); |
if (!this.get("extensionManager")) Components.utils.import("resource: | init: function () { this.classes = {}; this.services = {}; this.add("appStartup", "@mozilla.org/toolkit/app-startup;1", Ci.nsIAppStartup); this.add("autoCompleteSearch", "@mozilla.org/autocomplete/search;1?name=history", Ci.nsIAutoCompleteSearch); this.add("bookmarks", "@mozilla.org/browser/nav-bookmarks-service;1", Ci.nsINavBookmarksService); this.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService); this.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService); this.add("console", "@mozilla.org/consoleservice;1", Ci.nsIConsoleService); this.add("liberator:", "@mozilla.org/network/protocol;1?name=liberator"); this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", Ci.jsdIDebuggerService); this.add("directory", "@mozilla.org/file/directory_service;1", Ci.nsIProperties); this.add("downloadManager", "@mozilla.org/download-manager;1", Ci.nsIDownloadManager); this.add("environment", "@mozilla.org/process/environment;1", Ci.nsIEnvironment); this.add("extensionManager", "@mozilla.org/extensions/manager;1", Ci.nsIExtensionManager); this.add("favicon", "@mozilla.org/browser/favicon-service;1", Ci.nsIFaviconService); this.add("history", "@mozilla.org/browser/global-history;2", [Ci.nsIGlobalHistory3, Ci.nsINavHistoryService, Ci.nsIBrowserHistory]); this.add("io", "@mozilla.org/network/io-service;1", Ci.nsIIOService); this.add("json", "@mozilla.org/dom/json;1", Ci.nsIJSON, "createInstance"); this.add("livemark", "@mozilla.org/browser/livemark-service;2", Ci.nsILivemarkService); this.add("observer", "@mozilla.org/observer-service;1", Ci.nsIObserverService); this.add("pref", "@mozilla.org/preferences-service;1", [Ci.nsIPrefService, Ci.nsIPrefBranch, Ci.nsIPrefBranch2]); this.add("profile", "@mozilla.org/toolkit/profile-service;1", Ci.nsIToolkitProfileService); this.add("rdf", "@mozilla.org/rdf/rdf-service;1", Ci.nsIRDFService); this.add("sessionStore", "@mozilla.org/browser/sessionstore;1", Ci.nsISessionStore); this.add("subscriptLoader", "@mozilla.org/moz/jssubscript-loader;1", Ci.mozIJSSubScriptLoader); this.add("threadManager", "@mozilla.org/thread-manager;1", Ci.nsIThreadManager); this.add("windowMediator", "@mozilla.org/appshell/window-mediator;1", Ci.nsIWindowMediator); this.add("windowWatcher", "@mozilla.org/embedcomp/window-watcher;1", Ci.nsIWindowWatcher); this.add("xulAppInfo", "@mozilla.org/xre/app-info;1", Ci.nsIXULAppInfo); this.addClass("file", "@mozilla.org/file/local;1", Ci.nsILocalFile); this.addClass("file:", "@mozilla.org/network/protocol;1?name=file", Ci.nsIFileProtocolHandler); this.addClass("find", "@mozilla.org/embedcomp/rangefind;1", Ci.nsIFind); this.addClass("process", "@mozilla.org/process/util;1", Ci.nsIProcess); }, |
|
init: function () { this.lastSearchPattern = ""; }, | init: function (range, index) { this.index = index; this.range = range; this.document = range.startContainer.ownerDocument; this.window = this.document.defaultView; this.docShell = this.window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShell); if (this.selection == null) return false; this.save(); }, | init: function () { this.lastSearchPattern = ""; }, |
this._qmarks = storage.newMap("quickmarks", { store: true }); | this._qmarks = storage.newMap("quickmarks", { store: true, privateData: true }); | init: function () { this._qmarks = storage.newMap("quickmarks", { store: true }); }, |
this._nullSandbox = Cu.Sandbox("about:blank"); | init: function () { this._stack = []; this._functions = []; this._top = {}; // The element on the top of the stack. this._last = ""; // The last opening char pushed onto the stack. this._lastNonwhite = ""; // Last non-whitespace character we saw. this._lastChar = ""; // Last character we saw, used for \ escaping quotes. this._str = ""; this._lastIdx = 0; this._cacheKey = null; }, |
|
$("#siteTabs").tabs(); | this.Init = function() { var _Settings = this.Settings.Application; // Shortcut thisRef = this; // Remove users drop down box if (!_Settings.userSelection) $('#userDropBox').hide(); $('title').text(_Settings.pageTitle); // Set page title $('#footerTxt').text(_Settings.footerTxt); // Set footer text $('#supportLnk').attr('href', _Settings.supportLnk); $('#logo').css('background-image', 'url('+_Settings.logoLnk+')'); // Events definitions //$('#modelCheck').click( function() { alert(thisRef.Data.sorting); }); // If active allows to chect choosen model value $('#timeRange').change( function() { thisRef.timeRange_Change(this) }); $('#refresh').change( function() { thisRef.refresh_Change(this) }); // Activate datepicker $('#from, #till').datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true }).change( function() { thisRef.fromTill_Change(this) }); // Setup Data from URL this.Data.quickSetup($.bbq.getState()); // Get and setup users list this.getUsers(); // Bind the event onhashchange $(window).bind('hashchange', function(){ thisRef.Data.quickSetup($.bbq.getState()); if (!thisRef.Data.noreload) thisRef.viewUpdater(); else thisRef.Data.noreload = false; }); this.viewUpdater(); // Set up refresh this.refresh_Change('#refresh'); }; |
|
this.addSessionListener(window, "keyup", this.wrapListener(this.onKeyUpOrDown), true); | init: function () { const self = this; this._fullscreen = window.fullScreen; this._lastFocus = null; this._currentMacro = ""; this._lastMacro = ""; this.sessionListeners = []; this._macros = storage.newMap("macros", { privateData: true, store: true }); for (let [k, m] in this._macros) if (isString(m)) m = { keys: m, timeRecorded: Date.now() }; // NOTE: the order of ["Esc", "Escape"] or ["Escape", "Esc"] // matters, so use that string as the first item, that you // want to refer to within dactyl's source code for // comparisons like if (key == "<Esc>") { ... } this._keyTable = { add: ["Plus", "Add"], back_space: ["BS"], delete: ["Del"], escape: ["Esc", "Escape"], insert: ["Insert", "Ins"], left_shift: ["LT", "<"], return: ["Return", "CR", "Enter"], right_shift: [">"], space: ["Space", " "], subtract: ["Minus", "Subtract"] }; this._code_key = {}; this._key_code = {}; for (let [k, v] in Iterator(KeyEvent)) { k = k.substr(7).toLowerCase(); let names = [k.replace(/(^|_)(.)/g, function (m, n1, n2) n2.toUpperCase()) .replace(/^NUMPAD/, "k")]; if (k in this._keyTable) names = this._keyTable[k]; this._code_key[v] = names[0]; for (let [, name] in Iterator(names)) this._key_code[name.toLowerCase()] = v; } // HACK: as Gecko does not include an event for <, we must add this in manually. if (!("<" in this._key_code)) { this._key_code["<"] = 60; this._key_code["lt"] = 60; this._code_key[60] = "lt"; } this._input = { buffer: "", // partial command storage pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command pendingArgMap: null, // pending map storage for commands like m{a-z} count: null // parsed count from the input buffer }; this._activeMenubar = false; this.addSessionListener(window, "DOMMenuBarActive", this.closure.onDOMMenuBarActive, true); this.addSessionListener(window, "DOMMenuBarInactive", this.closure.onDOMMenuBarInactive, true); this.addSessionListener(window, "focus", this.wrapListener(this.onFocus), true); this.addSessionListener(window, "keypress", this.wrapListener(this.onKeyPress), true); this.addSessionListener(window, "mousedown", this.wrapListener(this.onMouseDown), true); this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true); this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true); this.addSessionListener(window, "resize", this.closure.onResize, true); }, |
|
this._cwd = this._processDir; | this._cwd = this._processDir.path; | init: function () { this._processDir = services.get("directory").get("CurWorkD", Ci.nsIFile); this._cwd = this._processDir; this._oldcwd = null; this._lastRunCommand = ""; // updated whenever the users runs a command with :! this._scriptNames = []; this.downloadListener = { onDownloadStateChange: function (state, download) { if (download.state == services.get("downloadManager").DOWNLOAD_FINISHED) { let url = download.source.spec; let title = download.displayName; let file = download.targetFile.path; let size = download.size; dactyl.echomsg({ domains: [util.getHost(url)], message: "Download of " + title + " to " + file + " finished" }, 1, commandline.ACTIVE_WINDOW); autocommands.trigger("DownloadPost", { url: url, title: title, file: file, size: size }); } }, onStateChange: function () {}, onProgressChange: function () {}, onSecurityChange: function () {} }; services.get("downloadManager").addListener(this.downloadListener); }, |
this.idname = services.get("dactyl:").idname; | init: function () { this.name = services.get("dactyl:").name; this.appname = services.get("dactyl:").appname; this.host = services.get("dactyl:").host; highlight.styleableChrome = this.styleableChrome; highlight.loadCSS(this.CSS); highlight.loadCSS(this.helpCSS); let img = Image(); img.src = this.logo || "chrome://" + this.name + "/content/logo.png"; img.onload = function () { highlight.set("Logo", String(<> display: inline-block; background: url({img.src}); width: {img.width}px; height: {img.height}px; </>)); img = null; }; }, |
|
if (renderAge === 0 && c.prototype.render !== this.render) renderAge = currentAge; if (rendererAge === 0 && c.prototype.createRenderer !== this.createRenderer) rendererAge = currentAge; if (rendererAge > 0 && renderAge > 0) break; | if (renderAge < 0 && c.prototype.render !== this.render) renderAge = currentAge; if (rendererAge < 0 && c.prototype.createRenderer !== this.createRenderer) rendererAge = currentAge; if (rendererAge >= 0 && renderAge >= 0) break; | init: function() { var parentView, path, root, idx, len, lp, dp ; sc_super() ; // set up theme var theme = this.theme; this.theme = this._themeProperty; this.set("theme", theme); // find render path (to be removed in SC 2.0?) var renderAge = -1, rendererAge = -1, currentAge = 0, c = this.constructor; while (c && c.prototype.render) { if (renderAge === 0 && c.prototype.render !== this.render) renderAge = currentAge; if (rendererAge === 0 && c.prototype.createRenderer !== this.createRenderer) rendererAge = currentAge; if (rendererAge > 0 && renderAge > 0) break; currentAge = currentAge + 1; c = c.superclass; } // which one? if (renderAge < rendererAge && renderAge >= 0) { this._useRenderFirst = YES; } else { this._useRenderFirst = NO; } // register for event handling SC.View.views[this.get('layerId')] = this; var childViews = this.get('childViews'); // setup child views. be sure to clone the child views array first this.childViews = childViews ? childViews.slice() : [] ; this.createChildViews() ; // setup child Views this._hasCreatedChildViews = YES; // register display property observers .. // TODO: Optimize into class setup dp = this.get('displayProperties') ; idx = dp.length ; while (--idx >= 0) { this.addObserver(dp[idx], this, this.displayDidChange) ; } // register for drags if (this.get('isDropTarget')) SC.Drag.addDropTarget(this) ; // register scroll views for autoscroll during drags if (this.get('isScrollable')) SC.Drag.addScrollableView(this) ; }, |
var tableHeaderView = this.get('parentView'); if (tableHeaderView) { tableHeaderView.addObserver('isInDragMode', this, '_scthv_dragModeDidChange'); } }, | var column = this.get('column'); column.addObserver('width', this, '_scthv_layoutDidChange'); column.addObserver('maxWidth', this, '_scthv_layoutDidChange'); column.addObserver('minWidth', this, '_scthv_layoutDidChange'); column.addObserver('sortState', this, '_scthv_sortStateDidChange'); column.addObserver('tableContent', this, '_scthv_tableContentDidChange'); return sc_super(); }, | init: function() { var tableHeaderView = this.get('parentView'); if (tableHeaderView) { tableHeaderView.addObserver('isInDragMode', this, '_scthv_dragModeDidChange'); } }, |
init: function () { manager.registerFactory(this.classID, String(this.classID), this.contractID, this); }, | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cu.import("resource: require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay"); } | init: function () { manager.registerFactory(this.classID, String(this.classID), this.contractID, this); }, |
this._doSetupIdle = function() { self._setupIdle(); }; | init: function() { var self = this; this._doIdleEntry = function() { self._idleEntry(); }; this._doSetupIdle = function() { self._setupIdle(); }; this._tasks = []; }, |
|
this._level = level || logging.DEBUG; | this._level = level || logging.LOG; | this.init = function(name, level) { this._name = name; this._level = level || logging.DEBUG; } |
get globalValue() options.store.get(this.name, {}).value, | get globalValue() { try { return options.store.get(this.name, {}).value } catch (e) { util.reportError(e); throw e; } }, | init: function (names, description, type, defaultValue, extraInfo) { this.name = names[0]; this.names = names; this.realNames = names; this.type = type; this.description = description; if (this.type in Option.getKey) this.getKey = Option.getKey[this.type]; if (this.type in Option.parse) this.parse = Option.parse[this.type]; if (this.type in Option.stringify) this.stringify = Option.stringify[this.type]; if (this.type in Option.testValues) this.testValues = Option.testValues[this.type]; this._op = Option.ops[this.type]; if (extraInfo) update(this, extraInfo); if (arguments.length > 3) { if (this.type == "string") defaultValue = Commands.quote(defaultValue); this.defaultValue = this.parse(defaultValue); } // add no{option} variant of boolean {option} to this.names if (this.type == "boolean") this.names = array([name, "no" + name] for (name in values(names))).flatten().array; if (this.globalValue == undefined && !this.initialValue) this.globalValue = this.defaultValue; }, get helpTag() "'" + this.name + "'", initValue: function () { dactyl.trapErrors(function () this.value = this.value, this); }, get isDefault() this.stringValue === this.stringDefaultValue, /** @property {value} The option's global value. @see #scope */ get globalValue() options.store.get(this.name, {}).value, |
this._doSetupIdle = function() { self._setupIdle(); }; | init: function() { var self = this; this._doIdleEntry = function() { self._idleEntry(); }; this._tasks = []; }, |
|
this.render === SC.ButtonView.prototype.render && | init: function() { // deprecated behavior if you are using renderStyle if (this.get('renderStyle')) { console.warn("renderStyle: image is deprecated. Please use theme: 'icon' instead."); // theme should still be string form this.theme = 'icon'; } if ( this.render === SC.ButtonView.prototype.render && this.renderTitle !== SC.ButtonView.prototype.renderTitle ) { // @if debug console.warn( "renderTitle is deprecated. Please either implement the entire " + "either implement your own render() method, or create a renderer " + "for this button." ); // @endif this.render = this._DEPRECATED_render; } sc_super(); //cache the key equivalent if(this.get("keyEquivalent")) this._defaultKeyEquivalent = this.get("keyEquivalent"); }, |
|
"either implement your own render() method, or create a renderer " + | "rendering process in render() method, or create a renderer " + | init: function() { // deprecated behavior if you are using renderStyle if (this.get('renderStyle')) { console.warn("renderStyle: image is deprecated. Please use theme: 'icon' instead."); // theme should still be string form this.theme = 'icon'; } if ( this.render === SC.ButtonView.prototype.render && this.renderTitle !== SC.ButtonView.prototype.renderTitle ) { // @if debug console.warn( "renderTitle is deprecated. Please either implement the entire " + "either implement your own render() method, or create a renderer " + "for this button." ); // @endif this.render = this._DEPRECATED_render; } sc_super(); //cache the key equivalent if(this.get("keyEquivalent")) this._defaultKeyEquivalent = this.get("keyEquivalent"); }, |
this.render = this._DEPRECATED_render; | this._use_deprecated_render = YES; | init: function() { // deprecated behavior if you are using renderStyle if (this.get('renderStyle')) { console.warn("renderStyle: image is deprecated. Please use theme: 'icon' instead."); // theme should still be string form this.theme = 'icon'; } if ( this.render === SC.ButtonView.prototype.render && this.renderTitle !== SC.ButtonView.prototype.renderTitle ) { // @if debug console.warn( "renderTitle is deprecated. Please either implement the entire " + "either implement your own render() method, or create a renderer " + "for this button." ); // @endif this.render = this._DEPRECATED_render; } sc_super(); //cache the key equivalent if(this.get("keyEquivalent")) this._defaultKeyEquivalent = this.get("keyEquivalent"); }, |
Sanitizer.getClearRange = Sanitizer.Sanitizer.getClearRange; | init: function () { const self = this; liberator.loadScript("chrome://browser/content/sanitize.js", Sanitizer); this.__proto__.__proto__ = new Sanitizer.Sanitizer; // Good enough. // TODO: remove this version test if (/^1.9.1/.test(services.get("xulAppInfo").platformVersion)) self.prefDomain = "privacy.cpd."; else self.prefDomain = "privacy.item."; self.prefDomain2 = "extensions.liberator.privacy.cpd."; }, |
|
init: function(annotations) { if(!this.disabled) { jQuery(this).datepicker(hjq.getOptions(annotations)); } } | window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;} if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]) selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]) return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else return jQuery(context).find(selector);}else if(jQuery.isFunction(selector)) return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;} return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find") | init: function(annotations) { if(!this.disabled) { jQuery(this).datepicker(hjq.getOptions(annotations)); } } |
init: function () { services.get("observer").addObserver(this, this.CLEAR, false); services.get("observer").addObserver(this, this.QUIT, false); }, | init: function (id) { this._completionElements = []; var iframe = document.getElementById(id); if (!iframe) { liberator.log("No iframe with id: " + id + " found, strange things may happen!"); return; } this._doc = iframe.contentDocument; this._container = iframe.parentNode; this._doc.body.id = id + "-content"; this._doc.body.appendChild(this._doc.createTextNode("")); this._doc.body.style.borderTop = "1px solid black"; this._gradient = template.gradient("GradientLeft", "GradientRight"); this._items = null; this._startIndex = -1; this._endIndex = -1; this._selIndex = -1; this._div = null; this._divNodes = {}; this._minHeight = 0; }, | init: function () { services.get("observer").addObserver(this, this.CLEAR, false); services.get("observer").addObserver(this, this.QUIT, false); }, |
let fragment = dactyl.has("MacUnix") ? "tab-mac" : "tab"; | let fragment = dactyl.has("Darwin") ? "tab-mac" : "tab"; | init: function () { this._alternates = [config.tabbrowser.mCurrentTab, null]; // used for the "gb" and "gB" mappings to remember the last :buffer[!] command this._lastBufferSwitchArgs = ""; this._lastBufferSwitchSpecial = true; let fragment = dactyl.has("MacUnix") ? "tab-mac" : "tab"; this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", ".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" + // FIXME: better solution for themes? ".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }", false, true); // hide tabs initially to prevent flickering when 'stal' would hide them // on startup if (config.hasTabbrowser) config.tabbrowser.mTabContainer.collapsed = true; // FIXME: see 'stal' comment }, |
alert(bindingTypes); | Report.init = function(visualizationTypes, bindingTypes, dataTypes, optionTypes) // static types (classes){ alert(bindingTypes); Report.visualizationTypes = visualizationTypes; Report.bindingTypes = bindingTypes; Report.dataTypes = dataTypes; Report.optionTypes = optionTypes; //alert(optionTypes.toSource());} |
|
alert(bindingTypes); | Report.init = function(visualizationTypes, bindingTypes, dataTypes, optionTypes) // static types (classes){ //alert(visualizationTypes.results.toSource()); Report.visualizationTypes = visualizationTypes; Report.bindingTypes = bindingTypes; Report.dataTypes = dataTypes; Report.optionTypes = optionTypes; //alert(optionTypes.toSource());} |
|
this._controlRenderer = this.theme.control(); | init: function(settings) { this.attr(settings); }, |
|
if (this.render !== SC.View.prototype.render) { this.render.base = this.__DEPRECATED__render; } | init: function() { sc_super(); // add support for deprecated render method if (this.render !== SC.View.prototype.render) { // we have a custom render method, freak out! this.render.base = this.__DEPRECATED__render; } }, |
|
var text = axsFinance.str.GOOGLE_FINANCE_HOME + ' ' + axsFinance.axsNavObj.currentList().title; axsFinance.axsJAXObj.speakText(text); | axsFinance.axsJAXObj.speakText(axsFinance.str.GOOGLE_FINANCE_HOME); | axsFinance.init = function() { //Initialize AxsJAX object axsFinance.axsJAXObj = new AxsJAX(true); //Initialize AxsNAv object axsFinance.axsNavObj = new AxsNav(axsFinance.axsJAXObj); axsFinance.axsNavObj.navInit(axsFinance.CNR, null); //Initialize AxsLens object axsFinance.axsLensObj = new AxsLens(axsFinance.axsJAXObj); axsFinance.axsLensObj.setMagnification(axsFinance.magSize); axsFinance.axsNavObj.setLens(axsFinance.axsLensObj); //Initialize AxsSound object axsFinance.axsSound = new AxsSound(true); axsFinance.axsNavObj.setSound(axsFinance.axsSound); //Initialize PowerKey object axsFinance.powerKeyObj = new PowerKey('list', axsFinance.axsJAXObj); axsFinance.axsNavObj.setPowerKey(axsFinance.powerKeyObj, '.'); //Add event listeners document.addEventListener('keypress', axsFinance.keyHandler, true); document.addEventListener('DOMSubtreeModified', axsFinance.DOMSubtreeModifiedHandler, true); //Handle the focus in the search box performed by the page script during init var searchBox = document.getElementById('searchbox'); searchBox.addEventListener('focus', axsFinance.searchBoxKeyHandler, false); //Blur the element selected by default document.getElementById('searchbox').blur(); // announce the current list window.setTimeout(function() { var text = axsFinance.str.GOOGLE_FINANCE_HOME + ' ' + axsFinance.axsNavObj.currentList().title; axsFinance.axsJAXObj.speakText(text); }, 0);}; |
dactyl.registerObserver("modeChange", function (oldMode, newMode, stack) { switch (oldMode[0]) { case modes.TEXTAREA: case modes.INSERT: editor.unselectText(); break; case modes.VISUAL: if (newMode[0] == modes.CARET) { try { let selection = window.content.getSelection(); selection.collapseToStart(); } catch (e) {} } else editor.unselectText(); break; } }); | init: function () { // store our last search with f, F, t or T // this._lastFindChar = null; this._lastFindCharFunc = null; }, |
|
highlight.set("Logo", String(<> | highlight.loadCSS(<>{"!Logo {"} | init: function () { this.name = services.get("dactyl:").name; this.idName = services.get("dactyl:").idName; this.appName = services.get("dactyl:").appName; this.host = services.get("dactyl:").host; highlight.styleableChrome = this.styleableChrome; highlight.loadCSS(this.CSS); highlight.loadCSS(this.helpCSS); let img = Image(); img.src = this.logo || "chrome://" + this.name + "/content/logo.png"; img.onload = function () { highlight.set("Logo", String(<> display: inline-block; background: url({img.src}); width: {img.width}px; height: {img.height}px; </>)); img = null; }; }, |
</>)); | {"}"}</>); | init: function () { this.name = services.get("dactyl:").name; this.idName = services.get("dactyl:").idName; this.appName = services.get("dactyl:").appName; this.host = services.get("dactyl:").host; highlight.styleableChrome = this.styleableChrome; highlight.loadCSS(this.CSS); highlight.loadCSS(this.helpCSS); let img = Image(); img.src = this.logo || "chrome://" + this.name + "/content/logo.png"; img.onload = function () { highlight.set("Logo", String(<> display: inline-block; background: url({img.src}); width: {img.width}px; height: {img.height}px; </>)); img = null; }; }, |
Calendar.getMessageFor('saturday'), Calendar.getMessageFor('sunday') | Calendar.getMessageFor('saturday') | Calendar.init = function(){ Calendar.DAY_NAMES = new Array( Calendar.getMessageFor('monday'), Calendar.getMessageFor('tuesday'), Calendar.getMessageFor('wednesday'), Calendar.getMessageFor('thursday'), Calendar.getMessageFor('friday'), Calendar.getMessageFor('saturday'), Calendar.getMessageFor('sunday') ); Calendar.SHORT_DAY_NAMES = new Array( Calendar.getMessageFor('monday_short'), Calendar.getMessageFor('tuesday_short'), Calendar.getMessageFor('wednesday_short'), Calendar.getMessageFor('thursday_short'), Calendar.getMessageFor('friday_short'), Calendar.getMessageFor('saturday_short'), Calendar.getMessageFor('sunday_short') ); Calendar.MONTH_NAMES = new Array( Calendar.getMessageFor('january'), Calendar.getMessageFor('february'), Calendar.getMessageFor('march'), Calendar.getMessageFor('april'), Calendar.getMessageFor('may'), Calendar.getMessageFor('june'), Calendar.getMessageFor('july'), Calendar.getMessageFor('august'), Calendar.getMessageFor('september'), Calendar.getMessageFor('october'), Calendar.getMessageFor('november'), Calendar.getMessageFor('december') ); Calendar.SHORT_MONTH_NAMES = new Array( Calendar.getMessageFor('january_short'), Calendar.getMessageFor('february_short'), Calendar.getMessageFor('march_short'), Calendar.getMessageFor('april_short'), Calendar.getMessageFor('may_short'), Calendar.getMessageFor('june_short'), Calendar.getMessageFor('july_short'), Calendar.getMessageFor('august_short'), Calendar.getMessageFor('september_short'), Calendar.getMessageFor('october_short'), Calendar.getMessageFor('november_short'), Calendar.getMessageFor('december_short') ); Calendar.init_done = true;}; |
Calendar.getMessageFor('saturday_short'), Calendar.getMessageFor('sunday_short') | Calendar.getMessageFor('saturday_short') | Calendar.init = function(){ Calendar.DAY_NAMES = new Array( Calendar.getMessageFor('monday'), Calendar.getMessageFor('tuesday'), Calendar.getMessageFor('wednesday'), Calendar.getMessageFor('thursday'), Calendar.getMessageFor('friday'), Calendar.getMessageFor('saturday'), Calendar.getMessageFor('sunday') ); Calendar.SHORT_DAY_NAMES = new Array( Calendar.getMessageFor('monday_short'), Calendar.getMessageFor('tuesday_short'), Calendar.getMessageFor('wednesday_short'), Calendar.getMessageFor('thursday_short'), Calendar.getMessageFor('friday_short'), Calendar.getMessageFor('saturday_short'), Calendar.getMessageFor('sunday_short') ); Calendar.MONTH_NAMES = new Array( Calendar.getMessageFor('january'), Calendar.getMessageFor('february'), Calendar.getMessageFor('march'), Calendar.getMessageFor('april'), Calendar.getMessageFor('may'), Calendar.getMessageFor('june'), Calendar.getMessageFor('july'), Calendar.getMessageFor('august'), Calendar.getMessageFor('september'), Calendar.getMessageFor('october'), Calendar.getMessageFor('november'), Calendar.getMessageFor('december') ); Calendar.SHORT_MONTH_NAMES = new Array( Calendar.getMessageFor('january_short'), Calendar.getMessageFor('february_short'), Calendar.getMessageFor('march_short'), Calendar.getMessageFor('april_short'), Calendar.getMessageFor('may_short'), Calendar.getMessageFor('june_short'), Calendar.getMessageFor('july_short'), Calendar.getMessageFor('august_short'), Calendar.getMessageFor('september_short'), Calendar.getMessageFor('october_short'), Calendar.getMessageFor('november_short'), Calendar.getMessageFor('december_short') ); Calendar.init_done = true;}; |
config.tabbrowser.mTabContainer.collapsed = true; | config.tabStrip.collapsed = true; | init: function () { this._alternates = [config.tabbrowser.mCurrentTab, null]; // used for the "gb" and "gB" mappings to remember the last :buffer[!] command this._lastBufferSwitchArgs = ""; this._lastBufferSwitchSpecial = true; let fragment = dactyl.has("Darwin") ? "tab-mac" : "tab"; this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", ".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" + // FIXME: better solution for themes? ".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }", false, true); // hide tabs initially to prevent flickering when 'stal' would hide them // on startup if (config.hasTabbrowser) config.tabbrowser.mTabContainer.collapsed = true; // FIXME: see 'stal' comment }, |
this._previousLayout = this.get('layout'); | init: function() { var parentView, path, root, idx, len, lp, dp ; sc_super() ; // set up theme var baseTheme = this.baseTheme; this.baseTheme = this._baseThemeProperty; this.set("baseTheme", baseTheme); var theme = this.theme; this.theme = this._themeProperty; this.set("theme", theme); // find render path (to be removed in SC 2.0?) var renderAge = -1, rendererAge = -1, currentAge = 0, c = this.constructor; while (c && c.prototype.render) { if (renderAge < 0 && c.prototype.render !== this.render) renderAge = currentAge; if (rendererAge < 0 && c.prototype.createRenderer !== this.createRenderer) rendererAge = currentAge; if (rendererAge >= 0 && renderAge >= 0) break; currentAge = currentAge + 1; c = c.superclass; } // which one? if (renderAge < rendererAge && renderAge >= 0) { this._useRenderFirst = YES; } else { this._useRenderFirst = NO; } // register for event handling SC.View.views[this.get('layerId')] = this; var childViews = this.get('childViews'); // setup child views. be sure to clone the child views array first this.childViews = childViews ? childViews.slice() : [] ; this.createChildViews() ; // setup child Views this._hasCreatedChildViews = YES; // register display property observers .. // TODO: Optimize into class setup dp = this.get('displayProperties') ; idx = dp.length ; while (--idx >= 0) { this.addObserver(dp[idx], this, this.displayDidChange) ; } // register for drags if (this.get('isDropTarget')) SC.Drag.addDropTarget(this) ; // register scroll views for autoscroll during drags if (this.get('isScrollable')) SC.Drag.addScrollableView(this) ; }, |
|
this._doc.documentElement.id = id + "-top"; | init: function (id) { this._completionElements = []; var iframe = document.getElementById(id); this._doc = iframe.contentDocument; this._win = iframe.contentWindow; this._container = iframe.parentNode; this._doc.body.id = id + "-content"; this._doc.body.className = iframe.className + "-content"; this._doc.body.appendChild(this._doc.createTextNode("")); this._doc.body.style.borderTop = "1px solid black"; // FIXME: For cases where completions/MOW are shown at once, or ls=0. Should use :highlight. this._items = null; this._startIndex = -1; // The index of the first displayed item this._endIndex = -1; // The index one *after* the last displayed item this._selIndex = -1; // The index of the currently selected element this._div = null; this._divNodes = {}; this._minHeight = 0; }, |
|
return jQuery.fn.init.call(this, selector, context); | jQuery._isBuffering++; var ret = jQuery.fn.init.call(this, selector, context); jQuery._isBuffering--; return ret; | jQuery.bufferedJQuery.prototype.init = function(selector, context) { return jQuery.fn.init.call(this, selector, context);}; |
if (event == "add") autocommands.trigger("BookmarkAdd", arg); | if (["add", "change", "remove"].indexOf(event) >= 0) autocommands.trigger("Bookmark" + event[0].toUpperCase() + event.substr(1), arg); | init: function () { storage.addObserver("bookmark-cache", function (key, event, arg) { if (event == "add") autocommands.trigger("BookmarkAdd", arg); statusline.updateUrl(); }, window); }, |
get globalValue() { try { return options.store.get(this.name, {}).value } catch (e) { util.reportError(e); throw e; } }, | get globalValue() { try { return options.store.get(this.name, {}).value; } catch (e) { util.reportError(e); throw e; } }, | init: function (names, description, type, defaultValue, extraInfo) { this.name = names[0]; this.names = names; this.realNames = names; this.type = type; this.description = description; if (this.type in Option.getKey) this.getKey = Option.getKey[this.type]; if (this.type in Option.parse) this.parse = Option.parse[this.type]; if (this.type in Option.stringify) this.stringify = Option.stringify[this.type]; if (this.type in Option.testValues) this.testValues = Option.testValues[this.type]; this._op = Option.ops[this.type]; if (extraInfo) update(this, extraInfo); if (arguments.length > 3) { if (this.type == "string") defaultValue = Commands.quote(defaultValue); this.defaultValue = this.parse(defaultValue); } // add no{option} variant of boolean {option} to this.names if (this.type == "boolean") this.names = array([name, "no" + name] for (name in values(names))).flatten().array; if (this.globalValue == undefined && !this.initialValue) this.globalValue = this.defaultValue; }, get helpTag() "'" + this.name + "'", initValue: function () { dactyl.trapErrors(function () this.value = this.value, this); }, get isDefault() this.stringValue === this.stringDefaultValue, /** @property {value} The option's global value. @see #scope */ get globalValue() { try { return options.store.get(this.name, {}).value } catch (e) { util.reportError(e); throw e; } }, |
this._statusBar = document.getElementById("addon-bar") || document.getElementById("status-bar"); | this._statusLine = document.getElementById("status-bar"); this._statusBar = document.getElementById("addon-bar") || this._statusLine; | init: function () { this._statusBar = document.getElementById("addon-bar") || document.getElementById("status-bar"); this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); if (this._statusBar.localName == "toolbar") { styles.addSheet(true, "addon-bar", config.styleableChrome, <css><![CDATA[ #addon-bar { padding: 0 !important; } #addon-bar > statusbar { -moz-box-flex: 1 } ]]></css>); let parent = this.widgets.status.parentNode; parent.removeChild(this.widgets.status); parent.insertBefore(this.widgets.status, parent.firstChild); } }, /** * Update the status bar to indicate how secure the website is: * extended - Secure connection with Extended Validation(EV) certificate. * secure - Secure connection with valid certificate. * broken - Secure connection with invalid certificate, or * mixed content. * insecure - Insecure connection. * * @param {'extended'|'secure'|'broken'|'insecure'} type */ setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusBar, highlightGroup[type]); }, |
highlight.highlightNode(this._statusBar, highlightGroup[type]); | highlight.highlightNode(this._statusLine, highlightGroup[type]); | init: function () { this._statusBar = document.getElementById("addon-bar") || document.getElementById("status-bar"); this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); if (this._statusBar.localName == "toolbar") { styles.addSheet(true, "addon-bar", config.styleableChrome, <css><![CDATA[ #addon-bar { padding: 0 !important; } #addon-bar > statusbar { -moz-box-flex: 1 } ]]></css>); let parent = this.widgets.status.parentNode; parent.removeChild(this.widgets.status); parent.insertBefore(this.widgets.status, parent.firstChild); } }, /** * Update the status bar to indicate how secure the website is: * extended - Secure connection with Extended Validation(EV) certificate. * secure - Secure connection with valid certificate. * broken - Secure connection with invalid certificate, or * mixed content. * insecure - Insecure connection. * * @param {'extended'|'secure'|'broken'|'insecure'} type */ setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusBar, highlightGroup[type]); }, |
arguments.callee.base.call(this) ; if (SC.browser.isSafari && parseInt(SC.browser.version,0) < 417) { SC.mixin(this,this.browserFuncs.safari) ; } else if (SC.browser.isIE) { SC.mixin(this,this.browserFuncs.ie) ; } else if (SC.browser.isMozilla) { SC.mixin(this,this.browserFuncs.firefox); | arguments.callee.base.call(this) ; this._static = {} ; this._dynamic = {} ; | init: function() { arguments.callee.base.call(this) ; if (SC.browser.isSafari && parseInt(SC.browser.version,0) < 417) { SC.mixin(this,this.browserFuncs.safari) ; } else if (SC.browser.isIE) { SC.mixin(this,this.browserFuncs.ie) ; } else if (SC.browser.isMozilla) { SC.mixin(this,this.browserFuncs.firefox); } this._didSetupHistory = false ; }, |
this._didSetupHistory = false ; }, | init: function() { arguments.callee.base.call(this) ; if (SC.browser.isSafari && parseInt(SC.browser.version,0) < 417) { SC.mixin(this,this.browserFuncs.safari) ; } else if (SC.browser.isIE) { SC.mixin(this,this.browserFuncs.ie) ; } else if (SC.browser.isMozilla) { SC.mixin(this,this.browserFuncs.firefox); } this._didSetupHistory = false ; }, |
|
Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])]; c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector; this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= | Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== | Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= |
this.addSessionListener(window, "keydown", this.wrapListener(this.onKeyUpOrDown), true); | init: function () { const self = this; this._fullscreen = window.fullScreen; this._lastFocus = null; this._currentMacro = ""; this._lastMacro = ""; this.sessionListeners = []; this._macros = storage.newMap("macros", { privateData: true, store: true }); for (let [k, m] in this._macros) if (isString(m)) m = { keys: m, timeRecorded: Date.now() }; // NOTE: the order of ["Esc", "Escape"] or ["Escape", "Esc"] // matters, so use that string as the first item, that you // want to refer to within dactyl's source code for // comparisons like if (key == "<Esc>") { ... } this._keyTable = { add: ["Plus", "Add"], back_space: ["BS"], delete: ["Del"], escape: ["Esc", "Escape"], insert: ["Insert", "Ins"], left_shift: ["LT", "<"], return: ["Return", "CR", "Enter"], right_shift: [">"], space: ["Space", " "], subtract: ["Minus", "Subtract"] }; this._code_key = {}; this._key_code = {}; for (let [k, v] in Iterator(KeyEvent)) { k = k.substr(7).toLowerCase(); let names = [k.replace(/(^|_)(.)/g, function (m, n1, n2) n2.toUpperCase()) .replace(/^NUMPAD/, "k")]; if (k in this._keyTable) names = this._keyTable[k]; this._code_key[v] = names[0]; for (let [, name] in Iterator(names)) this._key_code[name.toLowerCase()] = v; } // HACK: as Gecko does not include an event for <, we must add this in manually. if (!("<" in this._key_code)) { this._key_code["<"] = 60; this._key_code["lt"] = 60; this._code_key[60] = "lt"; } this._input = { buffer: "", // partial command storage pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command pendingArgMap: null, // pending map storage for commands like m{a-z} count: null // parsed count from the input buffer }; this._activeMenubar = false; this.addSessionListener(window, "DOMMenuBarActive", this.closure.onDOMMenuBarActive, true); this.addSessionListener(window, "DOMMenuBarInactive", this.closure.onDOMMenuBarInactive, true); this.addSessionListener(window, "focus", this.wrapListener(this.onFocus), true); this.addSessionListener(window, "keydown", this.wrapListener(this.onKeyUpOrDown), true); this.addSessionListener(window, "keypress", this.wrapListener(this.onKeyPress), true); this.addSessionListener(window, "keyup", this.wrapListener(this.onKeyUpOrDown), true); this.addSessionListener(window, "mousedown", this.wrapListener(this.onMouseDown), true); this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true); this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true); this.addSessionListener(window, "resize", this.closure.onResize, true); }, |
|
this.addSessionListener(window, "keyup", this.wrapListener(this.onKeyUpOrDown), true); | init: function () { const self = this; this._fullscreen = window.fullScreen; this._lastFocus = null; this._currentMacro = ""; this._lastMacro = ""; this.sessionListeners = []; this._macros = storage.newMap("macros", { privateData: true, store: true }); for (let [k, m] in this._macros) if (isString(m)) m = { keys: m, timeRecorded: Date.now() }; // NOTE: the order of ["Esc", "Escape"] or ["Escape", "Esc"] // matters, so use that string as the first item, that you // want to refer to within dactyl's source code for // comparisons like if (key == "<Esc>") { ... } this._keyTable = { add: ["Plus", "Add"], back_space: ["BS"], delete: ["Del"], escape: ["Esc", "Escape"], insert: ["Insert", "Ins"], left_shift: ["LT", "<"], return: ["Return", "CR", "Enter"], right_shift: [">"], space: ["Space", " "], subtract: ["Minus", "Subtract"] }; this._code_key = {}; this._key_code = {}; for (let [k, v] in Iterator(KeyEvent)) { k = k.substr(7).toLowerCase(); let names = [k.replace(/(^|_)(.)/g, function (m, n1, n2) n2.toUpperCase()) .replace(/^NUMPAD/, "k")]; if (k in this._keyTable) names = this._keyTable[k]; this._code_key[v] = names[0]; for (let [, name] in Iterator(names)) this._key_code[name.toLowerCase()] = v; } // HACK: as Gecko does not include an event for <, we must add this in manually. if (!("<" in this._key_code)) { this._key_code["<"] = 60; this._key_code["lt"] = 60; this._code_key[60] = "lt"; } this._input = { buffer: "", // partial command storage pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command pendingArgMap: null, // pending map storage for commands like m{a-z} count: null // parsed count from the input buffer }; this._activeMenubar = false; this.addSessionListener(window, "DOMMenuBarActive", this.closure.onDOMMenuBarActive, true); this.addSessionListener(window, "DOMMenuBarInactive", this.closure.onDOMMenuBarInactive, true); this.addSessionListener(window, "focus", this.wrapListener(this.onFocus), true); this.addSessionListener(window, "keydown", this.wrapListener(this.onKeyUpOrDown), true); this.addSessionListener(window, "keypress", this.wrapListener(this.onKeyPress), true); this.addSessionListener(window, "keyup", this.wrapListener(this.onKeyUpOrDown), true); this.addSessionListener(window, "mousedown", this.wrapListener(this.onMouseDown), true); this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true); this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true); this.addSessionListener(window, "resize", this.closure.onResize, true); }, |
|
dactyl.commands["tabs.select"] = function (event) { tabs.select(event.originalTarget.getAttribute("identifier")); }; | init: function () { this._alternates = [config.tabbrowser.mCurrentTab, null]; // used for the "gb" and "gB" mappings to remember the last :buffer[!] command this._lastBufferSwitchArgs = ""; this._lastBufferSwitchSpecial = true; let fragment = dactyl.has("Darwin") ? "tab-mac" : "tab"; this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", ".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" + // FIXME: better solution for themes? ".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }", false, true); // hide tabs initially to prevent flickering when 'stal' would hide them // on startup if (config.hasTabbrowser) config.tabStrip.collapsed = true; // FIXME: see 'stal' comment }, |
|
document.addEventListener('mousedown', TBRL.clickhandler, false); | init : function(config){ TBRL.config = config; document.addEventListener('mousemove', TBRL.mousehandler, false); document.addEventListener('unload', TBRL.unload, false); window.addEventListener('Taberareloo.link', TBRL.link, false); window.addEventListener('Taberareloo.quote', TBRL.quote, false); window.addEventListener('Taberareloo.general', TBRL.general, false); !TBRL.config['post']['keyconfig'] && document.addEventListener('keydown', TBRL.keyhandler, false); (TBRL.userscripts = UserScripts.check()).forEach(function(script){ script.exec(); }); }, |
|
activeTokens:null,cursorActivity:null,lineNumbers:false,firstLineNumber:1,indentUnit:2,domain:null,noScriptCaching:false});var q=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent);o.prototype={init:function(){this.options.initCallback&&this.options.initCallback(this);this.options.lineNumbers&&this.activateLineNumbers();this.options.reindentOnLoad&&this.reindent();this.options.height=="dynamic"&&this.setDynamicHeight()},getCode:function(){return this.editor.getCode()},setCode:function(e){this.editor.importCode(e)}, | activeTokens:null,cursorActivity:null,lineNumbers:false,firstLineNumber:1,indentUnit:2,domain:null,noScriptCaching:false});var G=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent);s.prototype={init:function(){this.options.initCallback&&this.options.initCallback(this);this.options.lineNumbers&&this.activateLineNumbers();this.options.reindentOnLoad&&this.reindent();this.options.height=="dynamic"&&this.setDynamicHeight()},getCode:function(){return this.editor.getCode()},setCode:function(a){this.editor.importCode(a)}, | activeTokens:null,cursorActivity:null,lineNumbers:false,firstLineNumber:1,indentUnit:2,domain:null,noScriptCaching:false});var q=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent);o.prototype={init:function(){this.options.initCallback&&this.options.initCallback(this);this.options.lineNumbers&&this.activateLineNumbers();this.options.reindentOnLoad&&this.reindent();this.options.height=="dynamic"&&this.setDynamicHeight()},getCode:function(){return this.editor.getCode()},setCode:function(e){this.editor.importCode(e)}, |
#addon-bar { padding: 0 !important; } | #status-bar { margin-top: 0 !important; } #addon-bar { padding: 0 !important; min-height: 18px !important; } | init: function () { this._statusLine = document.getElementById("status-bar"); this._statusBar = document.getElementById("addon-bar") || this._statusLine; this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); if (this._statusBar.localName == "toolbar") { styles.addSheet(true, "addon-bar", config.styleableChrome, <css><![CDATA[ #addon-bar { padding: 0 !important; } #addon-bar > statusbar { -moz-box-flex: 1 } ]]></css>); let parent = this.widgets.status.parentNode; parent.removeChild(this.widgets.status); parent.insertBefore(this.widgets.status, parent.firstChild); } }, /** * Update the status bar to indicate how secure the website is: * extended - Secure connection with Extended Validation(EV) certificate. * secure - Secure connection with valid certificate. * broken - Secure connection with invalid certificate, or * mixed content. * insecure - Insecure connection. * * @param {'extended'|'secure'|'broken'|'insecure'} type */ setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusLine, highlightGroup[type]); }, |
}, setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusLine, highlightGroup[type]); }, | init: function () { this._statusLine = document.getElementById("status-bar"); this._statusBar = document.getElementById("addon-bar") || this._statusLine; this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); if (this._statusBar.localName == "toolbar") { styles.addSheet(true, "addon-bar", config.styleableChrome, <css><![CDATA[ #addon-bar { padding: 0 !important; } #addon-bar > statusbar { -moz-box-flex: 1 } ]]></css>); let parent = this.widgets.status.parentNode; parent.removeChild(this.widgets.status); parent.insertBefore(this.widgets.status, parent.firstChild); } }, /** * Update the status bar to indicate how secure the website is: * extended - Secure connection with Extended Validation(EV) certificate. * secure - Secure connection with valid certificate. * broken - Secure connection with invalid certificate, or * mixed content. * insecure - Insecure connection. * * @param {'extended'|'secure'|'broken'|'insecure'} type */ setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusLine, highlightGroup[type]); }, |
|
this.push(this.NORMAL, 0, { restore: function (prev) { if (options.getPref("accessibility.browsewithcaret")) options.setPref("accessibility.browsewithcaret", false); statusline.updateUrl(); dactyl.focusContent(true); } }); | init: function () { this.modeChars = {}; this._main = 1; // NORMAL this._extended = 0; // NONE this._lastShown = null; this._passNextKey = false; this._passAllKeys = false; this._isRecording = false; this._isReplaying = false; // playing a macro this._modeStack = []; this._mainModes = [this.NONE]; this._lastMode = 0; this._modeMap = {}; this.boundProperties = {}; // main modes, only one should ever be active this.addMode("NORMAL", { char: "n", display: -1 }); this.addMode("INSERT", { char: "i", input: true }); this.addMode("VISUAL", { char: "v", display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : "") }); this.addMode("COMMAND_LINE", { char: "c", input: true }); this.addMode("CARET"); // text cursor is visible this.addMode("TEXTAREA", { char: "i" }); this.addMode("EMBED", { input: true }); this.addMode("CUSTOM", { display: function () plugins.mode }); // this._extended modes, can include multiple modes, and even main modes this.addMode("EX", true); this.addMode("HINTS", true); this.addMode("INPUT_MULTILINE", true); this.addMode("OUTPUT_MULTILINE", true); this.addMode("SEARCH_FORWARD", true); this.addMode("SEARCH_BACKWARD", true); this.addMode("SEARCH_VIEW_FORWARD", true); this.addMode("SEARCH_VIEW_BACKWARD", true); this.addMode("MENU", true); // a popupmenu is active this.addMode("LINE", true); // linewise visual mode this.addMode("PROMPT", true); }, |
|
"", false, true) | (config.tabStrip.id ? "#" + config.tabStrip.id : ".tabbrowser-strip") + "{ visibility: collapse; }", false, true) | init: function () { this._alternates = [config.tabbrowser.mCurrentTab, null]; // used for the "gb" and "gB" mappings to remember the last :buffer[!] command this._lastBufferSwitchArgs = ""; this._lastBufferSwitchSpecial = true; let fragment = dactyl.has("Darwin") ? "tab-mac" : "tab"; this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", ".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" + // FIXME: better solution for themes? ".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }", false, true); // hide tabs initially to prevent flickering when 'stal' would hide them // on startup if (config.hasTabbrowser) config.tabStrip.collapsed = true; this.tabStyle = styles.addSheet(true, "tab-strip-hiding", config.styleableChrome, "", false, true) dactyl.commands["tabs.select"] = function (event) { tabs.select(event.originalTarget.getAttribute("identifier")); }; }, |
ret.isBuffered = true; | jQuery.bufferedJQuery.prototype.init = function(selector, context) { jQuery._isBuffering++; var ret = jQuery.fn.init.call(this, selector, context); jQuery._isBuffering--; return ret;}; |
|
this._statusBar = document.getElementById("status-bar"); | this._statusBar = document.getElementById("addon-bar") || document.getElementById("status-bar"); | init: function () { this._statusBar = document.getElementById("status-bar"); this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); }, |
setClass: function setClass(type) { const highlightGroup = { extended: "StatusLineExtended", secure: "StatusLineSecure", broken: "StatusLineBroken", insecure: "StatusLine" }; highlight.highlightNode(this._statusBar, highlightGroup[type]); }, | init: function () { this._statusBar = document.getElementById("status-bar"); this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0 // our status bar fields this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"] .map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])) .toObject(); }, |
|
this._setTimeoutCall = function() { | this._doIdleEntry = function() { | init: function() { var self = this; this._setTimeoutCall = function() { self._idleEntry(); }; this._tasks = []; }, |
}; this._doSetupIdle = function() { self._setupIdle(); | init: function() { var self = this; this._setTimeoutCall = function() { self._idleEntry(); }; this._tasks = []; }, |
|
init: function (message) { update(this, Error(message)); } | init: function (names, description, type, defaultValue, extraInfo) { this.name = names[0]; this.names = names; this.realNames = names; this.type = type; this.description = description; if (this.type in Option.getKey) this.getKey = Option.getKey[this.type]; if (this.type in Option.parse) this.parse = Option.parse[this.type]; if (this.type in Option.stringify) this.stringify = Option.stringify[this.type]; if (this.type in Option.testValues) this.testValues = Option.testValues[this.type]; this._op = Option.ops[this.type]; if (extraInfo) update(this, extraInfo); if (arguments.length > 3) { if (this.type == "string") defaultValue = Commands.quote(defaultValue); this.defaultValue = this.parse(defaultValue); } if (this.type == "boolean") this.names = array([name, "no" + name] for (name in values(names))).flatten().array; if (this.globalValue == undefined && !this.initialValue) this.globalValue = this.defaultValue; }, get helpTag() "'" + this.name + "'", initValue: function () { dactyl.trapErrors(function () this.value = this.value, this); }, get isDefault() this.stringValue === this.stringDefaultValue, get globalValue() options.store.get(this.name, {}).value, | init: function (message) { update(this, Error(message)); } |
if (this.theme && (this.theme === "square" || this.theme === "rounded")) { | if ( this.theme && (this.theme === "square" || this.theme === "capsule" || this.theme === "checkbox" || this.theme === "radio") ) { | init: function() { if (this.theme && (this.theme === "square" || this.theme === "rounded")) { this.set("oldButtonTheme", this.theme); this.theme = ""; } sc_super(); //cache the key equivalent if(this.get("keyEquivalent")) this._defaultKeyEquivalent = this.get("keyEquivalent"); }, |
Cu.import("resource: | function init() { dump("dactyl: bootstrap: init\n"); let manifestURI = getURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) getURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; break; case "resource": resourceProto.setSubstitution(fields[1], getURI(fields[2])); } } Services.obs.notifyObservers(null, "dactyl-rehash", null); JSMLoader.load("resource://dactyl/base.jsm", global); for each (let component in components) component.register(); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); let manifestText = result.map(function (line) line.join(" ")).join("\n"); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, manifestText); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
|
sep = virtroot[virtroot.length - 1] === '/' ? '' : '/'; | function init() { signature = dojo.byId('signature'); maincontent = dojo.byId('maincontent'); signatureVisible = false; if (!location.hash) { dojo.byId('search-box').focus(); return; } // hash may have line number, or line number + name separated by / var parts = location.hash.split('#')[1].split('/'); if (parts[0]) { var l; // Deal with #l323 vs. #323 if (/^l\d+/(parts[0])) l = dojo.byId(parts[0]); else l = dojo.byId('l' + parts[0]); l.scrollIntoView(); if (parts[1] && l.hasChildNodes()) { var children = l.childNodes; for (var i = 0; i < children.length; i++) { // TODO: what about case of multiple items in line with same name? if (children[i].innerHTML == parts[1]) { // XXX: what's up with this, dojo? setTimeout(function() { showInfo(children[i]); }, 0); break; } } } else { dojo.addClass(l, 'highlighted'); } }} |
|
var args = window.location.href.split('?'); if(args[1]) { if(args[1].split('=')[0] == "apid") { apid = args[1].split('=')[1]; xmlhttpPost(URL_APSEARCH, apid, "LOAD"); } } | window.onload = function init(){ gt = new Gettext({ 'domain' : 'messages' });} |
|
Services.obs.notifyObservers(null, "dactyl-rehash", null); | function init() { dump("dactyl: bootstrap: init\n"); let manifestURI = getURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) getURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; break; case "resource": resourceProto.setSubstitution(fields[1], getURI(fields[2])); } } Services.obs.notifyObservers(null, "dactyl-rehash", null); JSMLoader.load("resource://dactyl/base.jsm", global); for each (let component in components) component.register(); require(global, "services"); let manifestText = result.map(function (line) line.join(" ")).join("\n"); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, manifestText); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
|
Services.obs.notifyObservers(null, "dactyl-rehash", null); JSMLoader.load("resource: | function init() { dump("dactyl: bootstrap: init\n"); let manifestURI = getURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) getURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; break; case "resource": resourceProto.setSubstitution(fields[1], getURI(fields[2])); } } Services.obs.notifyObservers(null, "dactyl-rehash", null); JSMLoader.load("resource://dactyl/base.jsm", global); for each (let component in components) component.register(); require(global, "services"); let manifestText = result.map(function (line) line.join(" ")).join("\n"); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, manifestText); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
|
dump("dactyl: bootstrap: init: " + addon + "\n"); | dump("dactyl: bootstrap: init\n"); | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance() Services.obs.notifyObservers(null, "dactyl-rehash", null); Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
let manifestURI = addon.getResourceURI("chrome.manifest"); | let manifestURI = getURI("chrome.manifest"); | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance() Services.obs.notifyObservers(null, "dactyl-rehash", null); Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
function url(path) addon.getResourceURI(path).spec; | function url(path) getURI(path).spec; | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance() Services.obs.notifyObservers(null, "dactyl-rehash", null); Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); | resourceProto.setSubstitution(fields[1], getURI(fields[2])); | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance() Services.obs.notifyObservers(null, "dactyl-rehash", null); Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
writeFile(file, result.map(function (line) line.join(" ")).join("\n")); | writeFile(file, manifestText); | function init() { dump("dactyl: bootstrap: init: " + addon + "\n"); let manifestURI = addon.getResourceURI("chrome.manifest"); let manifest = httpGet(manifestURI.spec) .responseText .replace(/^\s*|\s*$|#.*/g, "") .replace(/^\s*\n/gm, ""); function url(path) addon.getResourceURI(path).spec; let result = []; for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { case "content": fields[2] = url(fields[2]); default: result.push(fields); break; case "locale": case "skin": fields[3] = url(fields[3]); result.push(fields); break; case "category": categoryManager.addCategoryEntry(fields[1], fields[2], fields[3], false, true); break; case "component": components[fields[1]] = new FactoryProxy(url(fields[2]), fields[1]); break; case "contract": components[fields[2]].contractID = fields[1]; components[fields[2]].register(); break; case "resource": resourceProto.setSubstitution(fields[1], addon.getResourceURI(fields[2])); } } Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance() Services.obs.notifyObservers(null, "dactyl-rehash", null); Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); require(global, "services"); services.subscriptLoader.loadSubScript( url("defaults/preferences/dactyl.js"), { pref: function pref(name, val) { if (prefs.get(name, null) == null) prefs.set(name, val); } }); if (manifestURI instanceof Ci.nsIFileURL) manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); file.remove(false); } require(global, "overlay");} |
function initAndDraw(container, visType, bindingTypes, variables) | function initAndDraw(container, visType, bindingTypes, variables, options) | function initAndDraw(container, visType, bindingTypes, variables){ initVis(container, visType); draw(visualizations[visType], visType, bindingTypes, variables);} |
draw(visualizations[visType], visType, bindingTypes, variables); | draw(visualizations[visType], visType, bindingTypes, variables, options); | function initAndDraw(container, visType, bindingTypes, variables){ initVis(container, visType); draw(visualizations[visType], visType, bindingTypes, variables);} |
function initAndDraw(container, visType, variables) | function initAndDraw(container, visType, bindingTypes, variables) | function initAndDraw(container, visType, variables){ initVis(container, visType); draw(visualizations[visType], visType, variables);} |
draw(visualizations[visType], visType, variables); | draw(visualizations[visType], visType, bindingTypes, variables); | function initAndDraw(container, visType, variables){ initVis(container, visType); draw(visualizations[visType], visType, variables);} |
{ | {alert(variables); | function initAndDraw(container, visType, bindingTypes, variables){ initVis(container, visType); draw(visualizations[visType], visType, bindingTypes, variables);} |
{ var buttons_div = this.buttons_div; if (this.options.get("time")) | initButtonsDiv: function() { var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); } } }, |
|
var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); | var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); | initButtonsDiv: function() { var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); } } }, |
var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" | if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); | initButtonsDiv: function() { var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); } } }, |
); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); | initButtonsDiv: function() { var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); } } }, |
|
} }, | }, | initButtonsDiv: function() { var buttons_div = this.buttons_div; if (this.options.get("time")) { var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []); buttons_div.build("span", {innerHTML:"@", className: "at_sign"}); var t = new Date(); this.hour_select = new SelectBox(buttons_div, blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });}, className: "hour" } ); buttons_div.build("span", {innerHTML:":", className: "seperator"}); var that = this; this.minute_select = new SelectBox(buttons_div, blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ), { calendar_date_select: this, onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) }, className: "minute" } ); } else if (! this.options.get("buttons")) buttons_div.remove(); if (this.options.get("buttons")) { buttons_div.build("span", {innerHTML: " "}); if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Today"], href: "#", onclick: function() {this.today(false); return false;}.bindAsEventListener(this) }); if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"}) if (this.options.get("time")) b = buttons_div.build("a", { innerHTML: _translations["Now"], href: "#", onclick: function() {this.today(true); return false}.bindAsEventListener(this) }); if (!this.options.get("embedded")) { buttons_div.build("span", {innerHTML: " "}); buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) }); } } }, |
var visBindingTypes = bindingTypesByVisType(bindingTypes, visType); | var visBindingTypes = objectsByVisType(visType, bindingTypes); | function initControls(visType, bindingElements, bindingTypes, xsdTypes, variables){ var visBindingTypes = bindingTypesByVisType(bindingTypes, visType); //alert(visBindingTypes.toSource()); //alert(variables.toSource()); for (var i in visBindingTypes) { var bindingElement = elementByBindingType(bindingElements, visBindingTypes[i].type); var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes); //alert(bindingElement.toSource());//alert(visBindingTypes[i].toSource() + " " + bindingColumns.toSource()); if (!(("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality == 1) || ("maxCardinality" in visBindingTypes[i] && visBindingTypes[i].maxCardinality == 1))) bindingElement.element.multiple = "multiple"; for (var j in bindingColumns) { var option = document.createElement("option"); option.appendChild(document.createTextNode(data.getColumnLabel(bindingColumns[j]))); option.setAttribute("value", bindingColumns[j]); if (variableExists(variables, visBindingTypes[i], bindingColumns[j])) option.setAttribute("selected", "selected");//alert(visBindingTypes[i].toSource()); bindingElement.element.appendChild(option); } }} |
var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes); | var bindingColumns = columnsByBindingType(visBindingTypes[i].type, xsdTypes); | function initControls(visType, bindingElements, bindingTypes, xsdTypes, variables){ var visBindingTypes = bindingTypesByVisType(bindingTypes, visType); //alert(visBindingTypes.toSource()); //alert(variables.toSource()); for (var i in visBindingTypes) { var bindingElement = elementByBindingType(bindingElements, visBindingTypes[i].type); var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes); //alert(bindingElement.toSource());//alert(visBindingTypes[i].toSource() + " " + bindingColumns.toSource()); if (!(("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality == 1) || ("maxCardinality" in visBindingTypes[i] && visBindingTypes[i].maxCardinality == 1))) bindingElement.element.multiple = "multiple"; for (var j in bindingColumns) { var option = document.createElement("option"); option.appendChild(document.createTextNode(data.getColumnLabel(bindingColumns[j]))); option.setAttribute("value", bindingColumns[j]); if (variableExists(variables, visBindingTypes[i], bindingColumns[j])) option.setAttribute("selected", "selected");//alert(visBindingTypes[i].toSource()); bindingElement.element.appendChild(option); } }} |
if (!("cardinality" in visBindingTypes[i]) || ("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality > j) || ("minCardinality" in visBindingTypes[i] && visBindingTypes[i].minCardinality > j)) | if (!(("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality == 1) || ("maxCardinality" in visBindingTypes[i] && visBindingTypes[i].maxCardinality == 1))) | function initControls(visType, bindingElements, bindingTypes, xsdTypes, variables){ var visBindingTypes = bindingTypesByVisType(bindingTypes, visType); //alert(visBindingTypes.toSource()); //alert(variables.toSource()); for (var i in visBindingTypes) { var bindingElement = elementByBindingType(bindingElements, visBindingTypes[i].type); //alert(bindingElement.toSource()); if (!("cardinality" in visBindingTypes[i]) || ("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality > j) || ("minCardinality" in visBindingTypes[i] && visBindingTypes[i].minCardinality > j)) bindingElement.element.multiple = "multiple"; var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes);//alert(visBindingTypes[i].toSource() + " " + bindingColumns.toSource()); for (var j in bindingColumns) { var option = document.createElement("option"); option.appendChild(document.createTextNode(data.getColumnLabel(bindingColumns[j]))); option.setAttribute("value", bindingColumns[j]); if (variableExists(variables, visBindingTypes[i], bindingColumns[j])) option.setAttribute("selected", "selected");//alert(visBindingTypes[i].toSource()); bindingElement.element.appendChild(option); } }} |
var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes); | function initControls(visType, bindingElements, bindingTypes, xsdTypes, variables){ var visBindingTypes = bindingTypesByVisType(bindingTypes, visType); //alert(visBindingTypes.toSource()); //alert(variables.toSource()); for (var i in visBindingTypes) { var bindingElement = elementByBindingType(bindingElements, visBindingTypes[i].type); //alert(bindingElement.toSource()); if (!("cardinality" in visBindingTypes[i]) || ("cardinality" in visBindingTypes[i] && visBindingTypes[i].cardinality > j) || ("minCardinality" in visBindingTypes[i] && visBindingTypes[i].minCardinality > j)) bindingElement.element.multiple = "multiple"; var bindingColumns = columnsByBindingType(visBindingTypes[i], xsdTypes);//alert(visBindingTypes[i].toSource() + " " + bindingColumns.toSource()); for (var j in bindingColumns) { var option = document.createElement("option"); option.appendChild(document.createTextNode(data.getColumnLabel(bindingColumns[j]))); option.setAttribute("value", bindingColumns[j]); if (variableExists(variables, visBindingTypes[i], bindingColumns[j])) option.setAttribute("selected", "selected");//alert(visBindingTypes[i].toSource()); bindingElement.element.appendChild(option); } }} |
|
this._input = []; | this.clear(); | initialize: function (schema) { this._alphabet = schema.alphabet; this._initial = schema.initial; this._delimiter = schema.delimiter; this._xform = schema.xform; this._input = []; }, |
this.maxKeyLength = Number(this.getConfigValue("MaxKeyLength") || 3); | this.maxKeyLength = Math.max(2, Number(this.getConfigValue("MaxKeyLength") || 2)); | initialize: function (schemaName, data) { this.schemaName = schemaName; this._prefix = "Config/" + schemaName + "/"; $.extend(this, data); // required configuration options this.prefix = this.getConfigValue("Prefix"); this.parser = this.getConfigValue("Parser"); this.maxKeyLength = Number(this.getConfigValue("MaxKeyLength") || 3); this.maxKeywordLength = Number(this.getConfigValue("MaxKeywordLength") || 7); this.delimiter = this.getConfigCharSequence("Delimiter") || " "; var punct = {}; $.each(this.getConfigList("Punct"), function (i, p) { var a = p.split(/\s+/); var key = a[0]; var value; if (a.length > 2) { value = {type: "alt", value: a.slice(1)}; } else if (a.length == 2) { var b = a[1]; if (b.indexOf("~") != -1) { value = {type: "pair", value: b.split("~", 2)}; } else { value = {type: "unique", value: b}; } } punct[key] = value; }); this.punct = punct; }, |
0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"), d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild); d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop}, | f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, | 0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop}, |
initialize: function(element) { this.element = $(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])*?\*\ | initialize: function(element) { this.element = $(element); }, |
var promptChar = this.getConfigCharSequence("PromptChar"); if (promptChar) { var xlit = {}; var i; for (i = 0; i < this.alphabet.length && i < promptChar.length; ++i) { xlit[this.alphabet.charAt(i)] = promptChar.charAt(i); } this.translit = function (s) { return $.map(s.split(""), function (c) { return xlit[c] || c; }).join(""); }; } else { this.translit = null; } | initialize: function (schemaName, data) { this.schemaName = schemaName; $.extend(this, data); // required configuration options this.dict = this.getConfigValue("Dict"); this.parser = this.getConfigValue("Parser"); this.maxKeyLength = Math.max(2, Number(this.getConfigValue("MaxKeyLength") || 2)); this.maxKeywordLength = Number(this.getConfigValue("MaxKeywordLength") || 7); this.delimiter = this.getConfigCharSequence("Delimiter") || " "; this.alphabet = this.getConfigCharSequence("Alphabet") || "abcdefghijklmnopqrstuvwxyz"; this.initial = this.alphabet.split (/\s+/, 1)[0]; var xformRules = $.map(this.getConfigList("TransformRule"), function (r) { var p = r.split(/\s+/); return {pattern: new RegExp(p[0], "g"), repl: p[1]}; }); this.xform = (xformRules.length == 0) ? null : function (s) { // apply transform rules $.each(xformRules, function (i_, r) { s = s.replace(r.pattern, r.repl); }); return s; }; var punct = {}; $.each(this.getConfigList("Punct"), function (i, p) { var a = p.split(/\s+/); var key = a[0]; var value; if (a.length > 2) { value = {type: "alt", value: a.slice(1)}; } else if (a.length == 2) { var b = a[1]; if (b.indexOf("~") != -1) { value = {type: "pair", value: b.split("~", 2)}; } else { value = {type: "unique", value: b}; } } punct[key] = value; }); this.punct = punct; }, |
|
conv.listener = new MyanmarConverterEventListener(conv); | MyanmarConverterExtension.initialize = function() { try { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.myanmarconverter."); this.enabled = (prefs)? prefs.getBoolPref("enabled") : true; this.trace = (prefs)? prefs.getBoolPref("trace") : false; this.urlPatternsLoadTime = prefs.getIntPref("urlPatternsUpdateTime"); this.urlPatterns = MyanmarConverterOptions.loadUrlPatterns(); var prefBranch2 = prefs.QueryInterface(Components.interfaces.nsIPrefBranch2); prefBranch2.addObserver("extensions.myanmarconverter.enabled", this, false); prefBranch2.addObserver("extensions.myanmarconverter.urlPatternsUpdateTime", this, false); this.prefs = prefBranch2; this.messages = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService) .createBundle("chrome://myanmar-converter/locale/MyanmarConverter.properties"); // Load the data for the converters var path = MyanmarConverterExtension._getExtensionPath("myanmar-converter"); MyanmarConverterExtension._trace("Path: " + path); this.legacyFonts = [ "Zawgyi-One", "WinInnwa", "Wwin_Burmese1" ]; //var conversionData = [ "zawgyi", "wininnwa", "wwin_burmese" ]; for (var i = 0; i < this.legacyFonts.length; i++) { var conv = new TlsMyanmarConverter(tlsMyanmarConverterData[this.legacyFonts[i].toLowerCase()]); MyanmarConverterExtension._trace("Loaded " + this.legacyFonts[i]); } //page load listener var appcontent = document.getElementById("appcontent"); // browser if (!appcontent) { appcontent = document.getElementById("frame_main_pane"); // songbird } if (appcontent) { appcontent.addEventListener("DOMContentLoaded", MyanmarConverterExtension.onPageLoad, true); var container = gBrowser.tabContainer; if (typeof container != "undefined") container.addEventListener("TabSelect", this, false); } // Different versions of Firefox have different contract IDs var spellClass = "@mozilla.org/spellchecker/myspell;1"; if ("@mozilla.org/spellchecker/hunspell;1" in Components.classes) spellClass = "@mozilla.org/spellchecker/hunspell;1"; if ("@mozilla.org/spellchecker/engine;1" in Components.classes) spellClass = "@mozilla.org/spellchecker/engine;1"; this.spellChecker = Components.classes[spellClass] .createInstance(Components.interfaces.mozISpellCheckingEngine); var list = new Object(); var dictCount = new Object(); this.spellChecker.getDictionaryList(list, dictCount); this._trace(list.value); this.spellChecker.dictionary = "my_MM"; this._trace("Dict: " + " Lang: " + this.spellChecker.language); this.personalDict = Components.classes["@mozilla.org/spellchecker/personaldictionary;1"] .getService(Components.interfaces.mozIPersonalDictionary); } catch (e) { this._fail(e); }}; |
|
var list = schema.getConfigList("TransformRule"); this._xformRules = (list.length == 0) ? null : $.map(list, function (r) { var p = r.split(/\s+/); return {pattern: new RegExp(p[0], "g"), repl: p[1]}; }); | initialize: function (schema) { this._alphabet = schema.getConfigCharSequence("Alphabet") || "abcdefghijklmnopqrstuvwxyz"; this._initial = this._alphabet.split (/\s+/, 1)[0]; this._delimiter = schema.delimiter; this._input = []; }, |
|
this.document.saveLink = function(anchorElem) { PAGESPEED.Utils.saveLink(anchorElem.href); }; | initializeNode: function(myPanelNode) { PAGESPEED.PageSpeedContext.panel = this; PAGESPEED.curButtonId = ''; // Find mismatched dependencies. var mismatchedDependencies = []; for (var addonName in PAGESPEED.DEPENDENCIES) { var dependency = PAGESPEED.DEPENDENCIES[addonName]; if (!PAGESPEED.Utils.dependencyIsSatisfied(dependency)) { dependency.name = addonName; mismatchedDependencies.push(dependency); } } // Install a function on the document that toggles the display of the // element with the given id. this.document.toggleView = function(doc, id) { var elem = doc.getElementById(id); elem.style.display = elem.style.display == 'none' ? 'block' : 'none'; }; // Install a function on the document that opens a link in a new window // or tab. this.document.openLink = function(anchorElem) { PAGESPEED.Utils.openLink(anchorElem.href); }; // Display the welcome page. this.welcomePageTag.replace( {'dependencies': mismatchedDependencies}, this.panelNode); }, |
|
this._invalidIndexes = SC.IndexSet.create(); | initMixin: function() { this._indexMap = []; // these are coresets because they need to be iterated a lot this._curShowing = SC.CoreSet.create(); this._shouldBeShowing = SC.CoreSet.create(); this._viewsForItem = {}; this._tempAttrs = {}; // this is an index set because they handle ranges better // TODO: get rid of this and just use _SCCFP_dirty and indexMap this._invalidIndexes = SC.IndexSet.create(); // make the background task queue run more aggressively SC.backgroundTaskQueue.minimumIdleDuration = 100; // make sure the background task queue only runs once before setting another timer no matter what SC.backgroundTaskQueue.runLimit = -1; }, |
|
SC.backgroundTaskQueue.runLimit = -1; | initMixin: function() { this._indexMap = {}; // these are coresets because they need to be iterated a lot this._curShowing = SC.CoreSet.create(); this._shouldBeShowing = SC.CoreSet.create(); this._viewsForItem = {}; this._tempAttrs = {}; // this is an index set because they handle ranges better this._invalidIndexes = SC.IndexSet.create(); // temporarily disabled for debugging purposes; re-enable when background rendering is better tested SC.backgroundTaskQueue.minimumIdleDuration = 100; }, |
|
this._indexMap = []; | initMixin: function() { this._indexMap = []; // these are coresets because they need to be iterated a lot this._curShowing = SC.CoreSet.create(); this._shouldBeShowing = SC.CoreSet.create(); this._viewsForItem = {}; this._tempAttrs = {}; // make the background task queue run more aggressively SC.backgroundTaskQueue.minimumIdleDuration = 100; // make sure the background task queue only runs once before setting another timer no matter what SC.backgroundTaskQueue.runLimit = -1; }, |
|
this._invalidIndexes = SC.CoreSet.create(); | this._invalidIndexes = SC.IndexSet.create(); | initMixin: function() { this._indexMap = {}; this._curShowing = SC.CoreSet.create(); this._shouldBeShowing = SC.CoreSet.create(); this._viewsForItem = {}; this._tempAttrs = {}; this._invalidIndexes = SC.CoreSet.create(); // temporarily disabled for debugging purposes; re-enable when background rendering is better tested SC.backgroundTaskQueue.minimumIdleDuration = 100; }, |
this._invalidIndexes = SC.CoreSet.create(); | initMixin: function() { this._indexMap = {}; this._curShowing = SC.CoreSet.create(); this._shouldBeShowing = SC.CoreSet.create(); this._viewsForItem = {}; this._tempAttrs = {}; }, |
|
this._animatable_original_hasAcceleratedLayer = this.hasAcceleratedLayer || function(){}; this.hasAcceleratedLayer = this._animatable_hasAcceleratedLayer; | initMixin: function() { this._animatable_original_didCreateLayer = this.didCreateLayer || function(){}; this.didCreateLayer = this._animatable_didCreateLayer; this._animatable_original_willDestroyLayer = this.willDestroyLayer || function(){}; this.willDestroyLayer = this._animatable_willDestroyLayer; this._animatable_original_willRemoveFromParent = this.willRemoveFromParent || function(){}; this.willRemoveFromParent = this._animatable_will_remove_from_parent; // auto observers do not work when mixed in live, so make sure we do a manual observer this.addObserver("style", this, "styleDidChange"); // for debugging this._animateTickPixel.displayName = "animate-tick"; // if transitions was concatenated... var i; if (SC.isArray(this.transitions)) { var tl = {}; // prepare a new one mixed in for (i = 0; i < this.transitions.length; i++) { SC.mixin(tl, this.transitions[i]); } this.transitions = tl; } // go through transitions and make duration-only ones follow normal pattern for (i in this.transitions) { if (typeof this.transitions[i] == "number") { this.transitions[i] = { duration: this.transitions[i] }; } } // live animators this._animatableCurrentStyle = null; this._animators = {}; // keyAnimated => object describing it. this._animatableSetCSS = ""; this._last_transition_css = ""; // to keep from re-setting unnecessarily this._disableAnimation = 0; // calls to disableAnimation add one; enableAnimation remove one. this._transitionCallbacks = {}; // define callback set // alert if layer already created if (!SC.none(this.get("layer"))) { var o = this._animatable_original_didCreateLayer; this._animatable_original_didCreateLayer = function(){}; this.didCreateLayer(); this._animatable_original_didCreateLayer = o; } }, |
|
this._scfl_tile(); | this.invokeOnce("_scfl_tile"); | initMixin: function() { this._scfl_tile(); }, |
this.emptinessDidChangeFor(); | this._SCCE_emptinessDidChangeFor(); | initMixin: function() { this.emptinessDidChangeFor(); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.