rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
AddonManager.getInstallForFile(file, function(aInstall) { installs.push(aInstall); buildNextInstall(); }); | this.node.addEventListener("click", function(aEvent) { var selectedItem = self.node.selectedItem; if (aEvent.target.localName == "richlistitem" && aEvent.target == selectedItem) { var viewId = selectedItem.value; if (gViewController.parseViewId(viewId).type == "search") { viewId += encodeURIComponent(gHeader.searchQue... | AddonManager.getInstallForFile(file, function(aInstall) { installs.push(aInstall); buildNextInstall(); }); |
AddonManager.getAddonsByTypes(null, function(aAddonList) { aAddonList.forEach(function(aAddon) { if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) { let data = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); data.data = JSON.stringify({ id: aAddon.id, name: aAddon.name }); gObs.notifyOb... | XPCOMUtils.defineLazyGetter(this, "AddonRepository", function() { Components.utils.import("resource: return AddonRepository; }); | AddonManager.getAddonsByTypes(null, function(aAddonList) { aAddonList.forEach(function(aAddon) { if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) { let data = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); data.data = JSON.stringify({ id: aAddon.id, n... |
this.each(function(value, index) { if (filter.match(value)) results.push(iterator.call(context, value, index)); }); | (function(){var 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=sel... | this.each(function(value, index) { if (filter.match(value)) results.push(iterator.call(context, value, index)); }); |
this.each(function(value) { if (value == object) { found = true; throw $break; } }); | (function(){var 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=sel... | this.each(function(value) { if (value == object) { found = true; throw $break; } }); |
window.addEventListener("AnimatedZoomEnd", function() { window.removeEventListener("AnimatedZoomEnd", arguments.callee, true); self._ensureCaretVisible(aCaretRect); }, true); | function(aItem, aIndex) { if (aElement.optionIndex == aItem.optionIndex) index = aIndex; } | window.addEventListener("AnimatedZoomEnd", function() { window.removeEventListener("AnimatedZoomEnd", arguments.callee, true); self._ensureCaretVisible(aCaretRect); }, true); |
this._undoButtonTimeoutId = setTimeout(function() { self._fadeAwayUndoButton(); }, this.fadeAwayUndoButtonDelay); | toRemove.forEach(function(child) { self.remove(child, {dontArrange: true}); }); | this._undoButtonTimeoutId = setTimeout(function() { self._fadeAwayUndoButton(); }, this.fadeAwayUndoButtonDelay); |
.mouseup(function(e){ if( e.target.className == "title-shield" || e.target.className == "name" ) return; var location = new Point(e.clientX, e.clientY); if( !self._mouseDownLocation || location.distance(self._mouseDownLocation) > 1.0 ) return; if( self.isNewTabsGroup() ) return; var activeTab = self.getActiveTab();... | $(e.target).data("phantomGroup").fadeOut(function(){ $(this).remove(); }); | .mouseup(function(e){ // Don't zoom in on clicks inside of the title area. if( e.target.className == "title-shield" || e.target.className == "name" ) return; var location = new Point(e.clientX, e.clientY); if( !self._mouseDownLocation || location.distance(self._mouseDownL... |
iQ.timeout(function(){ Page.hideChrome() }, 1); | $(e.target).data("phantomGroup").fadeOut(function(){ $(this).remove(); }); | iQ.timeout(function(){ Page.hideChrome() }, 1); |
this._children.sort(function(a,b){ return groupTabs.indexOf(a.tab.raw) - groupTabs.indexOf(b.tab.raw) }); | phantom.fadeOut(function(){ $(this).remove(); }); | this._children.sort(function(a,b){ return groupTabs.indexOf(a.tab.raw) - groupTabs.indexOf(b.tab.raw) }); |
iQ(".appTabIcon", this.$appTabTray).each(function(icon) { let $icon = iQ(icon); if ($icon.data("xulTab") == event.target) { $icon.attr("src", Utils.defaultFaviconURL); return true; } | this._children.forEach(function(child) { if (child == self.topChild) children.unshift(child); else children.push(child); | iQ(".appTabIcon", this.$appTabTray).each(function(icon) { let $icon = iQ(icon); if ($icon.data("xulTab") == event.target) { $icon.attr("src", Utils.defaultFaviconURL); return true; } }); |
aAddonList.forEach(function(aAddon) { if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) { let data = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); data.data = JSON.stringify({ id: aAddon.id, name: aAddon.name }); gObs.notifyObservers(data, "addon-update-started", null); let listener ... | XPCOMUtils.defineLazyGetter(this, "NetUtil", function() { Components.utils.import("resource: return NetUtil; }); | aAddonList.forEach(function(aAddon) { if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) { let data = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); data.data = JSON.stringify({ id: aAddon.id, name: aAddon.name }); gObs.notifyObservers(data, "addo... |
iQ.each(this.groups, function(index, group) { data.groups.push(group.getStorageData()); }); | phantom.fadeOut(function(){ $(this).remove(); }); | iQ.each(this.groups, function(index, group) { data.groups.push(group.getStorageData()); }); |
setTimeout(function () { DownloadMonitorPanel.updateStatus(); }, 0); | this._timer = setTimeout(function (self) { self._timer = 0; self.reload.disabled = XULBrowserWindow.reloadCommand .getAttribute("disabled") == "true"; }, 650, this); | setTimeout(function () { DownloadMonitorPanel.updateStatus(); }, 0); |
aAddonProperties.forEach(function(aAddonProp) { var addon = new MockAddon(aAddonProp.id); for (var prop in aAddonProp) { if (prop == "id") continue; addon[prop] = aAddonProp[prop]; } this.addAddon(addon); }, this); | wait_for_manager_load(aManagerWindow, function() { wait_for_view_load(aManagerWindow, aCallback, null, aLongerTimeout); }); | aAddonProperties.forEach(function(aAddonProp) { var addon = new MockAddon(aAddonProp.id); for (var prop in aAddonProp) { if (prop == "id") continue; addon[prop] = aAddonProp[prop]; } this.addAddon(addon); }, this); |
}); | self.currentTest.addResult(new testResult(false, "Test timed out", "", false)); self.currentTest.timedOut = true; self.currentTest.scope.__waitTimer = null; self.nextTest(); }, TIMEOUT_SECONDS * 1000); | self.executeSoon(function() { if (self.__done && self.__waitTimer) { clearTimeout(self.__waitTimer); self.__waitTimer = null; self.__tester.nextTest(); } }); |
this.callbackTimers.forEach(function(aTimer) { aTimer.cancel(); | switchToTabHavingURI(MANAGER_URI, true, function(aBrowser) { setup_manager(aBrowser.contentWindow.wrappedJSObject); | this.callbackTimers.forEach(function(aTimer) { aTimer.cancel(); }); |
function() { window.openUILinkIn("https: | XPCOMUtils.defineLazyGetter(gSyncUI, "_stringBundle", function() { return Cc["@mozilla.org/intl/stringbundle;1"]. getService(Ci.nsIStringBundleService). createBundle("chrome: }); | function() { window.openUILinkIn("https://services.mozilla.com/update/", "tab"); return true; } |
var addons = this.addons.filter(function(aAddon) { if (aTypes && aTypes.length > 0 && aTypes.indexOf(aAddon.type) == -1) return false; return true; }); | openDialog(MANAGER_URI).addEventListener("pageshow", function() { this.removeEventListener("pageshow", arguments.callee, true); setup_manager(this); }, true); | var addons = this.addons.filter(function(aAddon) { if (aTypes && aTypes.length > 0 && aTypes.indexOf(aAddon.type) == -1) return false; return true; }); |
aAddonProperties.forEach(function(aAddonProp) { var addon = new MockAddon(aAddonProp.id); for (var prop in aAddonProp) { if (prop == "id") continue; addon[prop] = aAddonProp[prop]; } this.addAddon(addon); newAddons.push(addon); }, this); | aManagerWindow.addEventListener("unload", function() { this.removeEventListener("unload", arguments.callee, false); log_exceptions(aCallback); }, false); | aAddonProperties.forEach(function(aAddonProp) { var addon = new MockAddon(aAddonProp.id); for (var prop in aAddonProp) { if (prop == "id") continue; addon[prop] = aAddonProp[prop]; } this.addAddon(addon); newAddons.push(addon); }, this); |
gGameStack.oncontextmenu = this.rightClick; gGameStack.onmousedown = this.onmousedown; gGameStack.onmouseup = this.onmouseup; gGameStack.onmousemove = null; | window.oncontextmenu = this.rightClick; window.onmousedown = this.onmousedown; window.onmouseup = this.onmouseup; window.onmousemove = null; | _resetHandlers: function(e) { this._eventTargetCard = null; gGameStack.oncontextmenu = this.rightClick; gGameStack.onmousedown = this.onmousedown; gGameStack.onmouseup = this.onmouseup; gGameStack.onmousemove = null; }, |
_update: function(card, num) { | _update: function(cards, num) { | _update: function(card, num) { throw "_View._update not overridden!"; }, |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | 0;d<16;d++)b+=String.fromCharCode(a[d]);return b},A=function(a){a=$(a);var c=[],b;for(b=0;b<a.length;b++)c[b]=a.charCodeAt(b);return c},ca=function(a){var c=[],b;for(b=0;b<a;b++)c=c.concat(Math.floor(Math.random()*256));return c},K=function(a,c){var b=y>=12?3:2,d=[],k=[];d=[];k=[];a=a.concat(c);d[0]=GibberishAES.Hash.M... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
add: function(classNameToAdd) { if (this.include(classNameToAdd)) return; this.set($A(this).concat(classNameToAdd).join(' ')); }, | (function(){var 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=sel... | add: function(classNameToAdd) { if (this.include(classNameToAdd)) return; this.set($A(this).concat(classNameToAdd).join(' ')); }, |
aDirectory.initWithPath("/usr/lib"); | aDirectory.initWithPath("/usr/local/lib"); | installApplication : function ai_IA(aAppFile, aDirectory, aLeafName) { var extractor = createExtractor(aAppFile); var iniParser = extractor.iniParser; var appName = iniParser.getString("App", "Name"); // vendor is optional var vendor; try { vendor = iniParser.getString("App", "Vendor"); } ... |
gScoreDisplay.value = this.score = 0; | gScoreDisplay.textContent = this.score = 0; | begin: function(order) { this.actionList = []; gScoreDisplay.value = this.score = 0; this.createPiles(); this.createPileArrays(); this.loadPreferredFoundationSuits(); if(this.allcards) this.allcards = makeCards.apply(null, this.allcards); this.init(); this.orderCardsDealt = order || this._getD... |
gGameStack.onmousemove = self.mouseMoveInDrag; gGameStack.onmouseup = self.endDrag; gGameStack.oncontextmenu = null; | window.onmousemove = self.mouseMoveInDrag; window.onmouseup = self.endDrag; window.oncontextmenu = null; | beginDrag: function(e) { const self = Game.layout; // this==window // ignore very tiny movements of the mouse during a click // (otherwise clicking without dragging is rather difficult) const ex = e.pageX, ey = e.pageY, ex0 = self._ex0, ey0 = self._ey0; if(ex > ex0 - 5 && ex < ex0 + 5 && ey > ey0 - 5 &... |
name = name.toLowerCase(); var pages = Page.all() .filter(function(page) page.name.toLowerCase() == name); | name = name.toLowerCase().replace(/\s/g, '_'); var pages = Page.all().filter(function(page) { return name == page.name.toLowerCase().replace(/\s/g, '_'); }); | Page.byName = function(name) { name = name.toLowerCase(); var pages = Page.all() .filter(function(page) page.name.toLowerCase() == name); return pages[0];}; |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | F[a[2+b*4]]^G[a[3+b*4]];c[1+b*4]=G[a[b*4]]^D[a[1+b*4]]^E[a[2+b*4]]^F[a[3+b*4]];c[2+b*4]=F[a[b*4]]^G[a[1+b*4]]^D[a[2+b*4]]^E[a[3+b*4]];c[3+b*4]=E[a[b*4]]^F[a[1+b*4]]^G[a[2+b*4]]^D[a[3+b*4]]}else for(b=0;b<4;b++){c[b*4]=H[a[b*4]]^I[a[1+b*4]]^a[2+b*4]^a[3+b*4];c[1+b*4]=a[b*4]^H[a[1+b*4]]^I[a[2+b*4]]^a[3+b*4];c[2+b*4]=a[b*... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
return new RedirectResponse(toUrl(page.name)); | return redirectResponse(toUrl(page.name)); | function createPage(name, req) { if (req.isPost && req.params.save) { var page = new Page(); page.updateFrom(req.params); page.save(); return new RedirectResponse(toUrl(page.name)); } return new SkinnedResponse('skins/new.html', {name: name});}; |
return new SkinnedResponse('skins/new.html', {name: name}); | return skinResponse('./skins/new.html', {name: name}); | function createPage(name, req) { if (req.isPost && req.params.save) { var page = new Page(); page.updateFrom(req.params); page.save(); return new RedirectResponse(toUrl(page.name)); } return new SkinnedResponse('skins/new.html', {name: name});}; |
return skinResponse('./skins/new.html', {name: name}); | return skinResponse('./skins/new.html', {name: name.replace(/_/g, ' ')}); | function createPage(name, req) { if (req.isPost && req.params.save) { var page = new Page(); page.updateFrom(req.params); page.save(); return redirectResponse(toUrl(page.name)); } return skinResponse('./skins/new.html', {name: name});} |
dec = function(string, pass) { | dec = function(string, pass, binary) { | dec = function(string, pass) { // string, password in plaintext var cryptArr = Base64.decode(string), salt = cryptArr.slice(8, 16), pbe = openSSLKey(s2a(pass), salt), key = pbe.key, iv = pbe.iv; cryptArr = cryptArr.slice(16, cryptArr.length); // Take off the S... |
string = rawDecrypt(cryptArr, key, iv); | string = rawDecrypt(cryptArr, key, iv, binary); | dec = function(string, pass) { // string, password in plaintext var cryptArr = Base64.decode(string), salt = cryptArr.slice(8, 16), pbe = openSSLKey(s2a(pass), salt), key = pbe.key, iv = pbe.iv; cryptArr = cryptArr.slice(16, cryptArr.length); // Take off the S... |
gMessageBoxIsShowing = false; | function doneShowingMessage() { window.onclick = null; gMessageBox.style.display = 'none'; var f = gMessageCallback; gMessageCallback = null; if(f) f();} | |
gScoreDisplay.value = this.score += act.score; | gScoreDisplay.textContent = this.score += act.score; | doo: function(action) { if(this.canRedo) this.actionList = this.actionList.slice(0, this.actionPtr); // clear Redo history this.actionList[this.actionPtr++] = action; this.canUndo = true; this.canRedo = false; action.score = this.getScoreFor(action); this.hintsReady = false; action.perform(); ... |
drop: function(event){ iQ(this).removeClass("acceptsDrop"); self.add( drag.info.$el, {left:event.pageX, top:event.pageY} ); }, | drop: function(e){ $target = $(e.target); drag.info.$el.removeClass("willGroup") var phantom = $target.data("phantomGroup") var group = $target.data("group"); if( group == null ){ phantom.removeClass("phantom"); phantom.removeClass("group-content"); var group = new Group([$target, drag.info.$el], {container:phantom});... | drop: function(event){ iQ(this).removeClass("acceptsDrop"); self.add( drag.info.$el, {left:event.pageX, top:event.pageY} ); }, |
enc = function(string, pass) { | enc = function(string, pass, binary) { | enc = function(string, pass) { // string, password in plaintext var salt = randArr(8), pbe = openSSLKey(s2a(pass), salt), key = pbe.key, iv = pbe.iv, cipherBlocks, saltBlock = [[83, 97, 108, 116, 101, 100, 95, 95].concat(salt)]; string = s2a(string); ci... |
string = s2a(string); | if (!binary) { string = s2a(string); } | enc = function(string, pass) { // string, password in plaintext var salt = randArr(8), pbe = openSSLKey(s2a(pass), salt), key = pbe.key, iv = pbe.iv, cipherBlocks, saltBlock = [[83, 97, 108, 116, 101, 100, 95, 95].concat(salt)]; string = s2a(string); ci... |
const box = gFloatingPile.element.boxObject; | const box = document.getBoxObjectFor(gFloatingPile.element); | endDrag: function(e) { const self = Game.layout, card = self._eventTargetCard; self._resetHandlers(); const box = gFloatingPile.element.boxObject; const l = box.x, r = box.x + box.width; const t = box.y, b = box.y + box.height; // try dropping cards on each possible target var targets = Game.drag... |
openDialog("chrome: | window.open("help.html#" + helpid, null, featureStr); | function help() { const helpid = Game.helpId || Game.id; // position the help window roughly centered on the Cards window const w = 450, h = 350; const t = Math.floor(screenY + (outerHeight - h) / 3); const l = Math.floor(screenX + (outerWidth - w) / 2); const featureStr = "dialog=no,width=" + w + ",height=" + h ... |
this._node.hidden = true; | setVisibility(this._node, false); | hide: function() { this._node.hidden = true; window.onresize = null; }, |
var skin = req.path == '/' ? 'skins/index.html' : 'skins/page.html'; | var skin = name.toLowerCase() == 'home' ? './skins/index.html' : './skins/page.html'; | exports.index = function(req, name, action) { name = name || 'home'; var page = Page.byName(name); if (page) { var skin = req.path == '/' ? 'skins/index.html' : 'skins/page.html'; page.body = page.revisions[0]; return new SkinnedResponse(skin, {page: page}); } else { r... |
return new SkinnedResponse(skin, {page: page}); | return skinResponse(skin, {page: page}); | exports.index = function(req, name, action) { name = name || 'home'; var page = Page.byName(name); if (page) { var skin = req.path == '/' ? 'skins/index.html' : 'skins/page.html'; page.body = page.revisions[0]; return new SkinnedResponse(skin, {page: page}); } else { r... |
if(!viewType) throw "Layout._build: unrecognised char '" + ch + "' found in template"; | if(!viewType) throw "Layout.init(): unrecognised char '" + ch + "' found in template"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = createHTML... |
if(box != container) throw "Layout._build: layout had unclosed box"; | if(box != container) throw "Layout.init(): layout had unclosed box"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = createHTML... |
if(!containerIsVbox) container.style.MozBoxAlign = "start"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = createHTML... | |
box.style.MozBoxAlign = "start"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = createHTML... | |
var blob = template.substring(i0 + 1, i).split("="); (box.lastChild || box).setAttribute(blob[0], blob[1]); | var extraClassName = template.substring(i0 + 1, i); (box.lastChild || box).className += ' ' + extraClassName; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = createHTML... |
const container = this._node = document.createElement(containerIsVbox ? "vbox" : "hbox"); container.className = "game"; | const container = this._node = createHTML(containerIsVbox ? "vbox" : "hbox"); container.className += " game"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
container.top = container.left = 0; | container.style.top = container.style.left = 0; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
if(!containerIsVbox) container.align = "start"; | if(!containerIsVbox) container.style.MozBoxAlign = "start"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
var p; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... | |
old.appendChild(box = document.createElement(nextBoxVertical ? "hbox" : "vbox")); | old.appendChild(box = createHTML(nextBoxVertical ? "hbox" : "vbox")); | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
box.align = "start"; | box.style.MozBoxAlign = "start"; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
box.appendChild(document.createElement("halfpilespacer")); break; | box.appendChild(createHTML("halfpilespacer")); break; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
p = document.createElement("pilespacer"); p.className = this.pilespacerClass; box.appendChild(p); | box.appendChild(createHTML("pilespacer")); | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
box.appendChild(document.createElement("space")); break; | box.appendChild(createHTML("space")); break; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
box.appendChild(document.createElement("flex")); break; | box.appendChild(createHTML("flex")); break; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
box.appendChild(document.createElement("flex" + ch)); break; | box.appendChild(createHTML("flex flex" + ch)); break; | init: function() { if(this._node) throw "reinitialising layout"; const template = this.template, len = template.length; const views = this.views = []; const letters = []; // seq of view letters, to return to caller const containerIsVbox = template[0] == "v"; const container = this._node = document.c... |
this.element = createHTML("box"); | this.element = document.getElementById("floatingpile"); | init: function() { this.element = createHTML("box"); this.hide(); gGameStack.appendChild(this.element); const HTMLns = "http://www.w3.org/1999/xhtml"; const canvas = document.createElementNS(HTMLns, "canvas"); this.element.appendChild(canvas); this.context = canvas.getContext("2d"); }, |
gGameStack.appendChild(this.element); | init: function() { this.element = createHTML("box"); this.hide(); gGameStack.appendChild(this.element); const HTMLns = "http://www.w3.org/1999/xhtml"; const canvas = document.createElementNS(HTMLns, "canvas"); this.element.appendChild(canvas); this.context = canvas.getContext("2d"); }, | |
const el = this.element = document.createElement("vbox"); | const el = this.element = createHTML("vbox"); | initView: function() { const el = this.element = document.createElement("vbox"); el.pileViewObj = this; const HTMLns = "http://www.w3.org/1999/xhtml"; this._canvas = document.createElementNS(HTMLns, "canvas"); el.appendChild(this._canvas); this._context = this._canvas.getContext("2d"); if(this._c... |
this._counter = el.appendChild(document.createElement("label")); | this._counter = el.appendChild(createHTML("label")); | initView: function() { const el = this.element = document.createElement("vbox"); el.pileViewObj = this; const HTMLns = "http://www.w3.org/1999/xhtml"; this._canvas = document.createElementNS(HTMLns, "canvas"); el.appendChild(this._canvas); this._context = this._canvas.getContext("2d"); if(this._c... |
if(!gMessageBox.hidden) { doneShowingMessage(); return; } | if(gMessageBoxIsShowing) { doneShowingMessage(); return; } | function interrupt() { // Ensure we hide the "You've won" message if user presses one of our keyboard shortcuts while it's showing if(!gMessageBox.hidden) { doneShowingMessage(); return; } animations.interrupt(); if(gFloatingPileNeedsHiding) gFloatingPile.hide();} |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | c){var b=[],d;for(d=0;d<16;d++)b[d]=a[d]^c[d];return b},L=function(a){var c=[],b=[],d,k,j=[];for(d=0;d<x;d++){k=[a[4*d],a[4*d+1],a[4*d+2],a[4*d+3]];c[d]=k}for(d=x;d<4*(y+1);d++){c[d]=[];for(a=0;a<4;a++)b[a]=c[d-1][a];if(d%x===0){b=V(fa(b));b[0]^=ga[d/x-1]}else if(x>6&&d%x==4)b=V(b);for(a=0;a<4;a++)c[d][a]=c[d-x][a]^b[a... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
return new SkinnedResponse('skins/list.html', {pages: Page.all()}); | return skinResponse('./skins/list.html', {pages: Page.all()}); | exports.list = function(req) { return new SkinnedResponse('skins/list.html', {pages: Page.all()});} |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | 222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
}; | } | function markdown_filter(content) { var markdown = new Markdown({ lookupLink: function(id) { if (!id.startsWith("/") && !id.isUrl()) { return [toUrl(id), "link to wiki page"]; } return null; }, openTag: function(tag, buffer) ... |
d.concat(a);return M.encode(a)},Hash:{MD5:function(a){function c(l,m){return l<<m|l>>>32-m}function b(l,m){var o,s,r,t;r=l&2147483648;t=m&2147483648;o=l&1073741824;s=m&1073741824;l=(l&1073741823)+(m&1073741823);if(o&s)return l^2147483648^r^t;return o|s?l&1073741824?l^3221225472^r^t:l^1073741824^r^t:l^r^t}function d(l,m... | MD5 = function(numArr) { function rotateLeft(lValue, iShiftBits) { return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); } function addUnsigned(lX, lY) { var lX4, lY4, lX8, lY8, lResult; lX8 = (lX & 0x80000000); lY8 = (lY & 0x80000000); lX4 = (lX & 0x40000000); lY4 = (lY & 0x40000000); lResult = (lX & 0x3FF... | d.concat(a);return M.encode(a)},Hash:{MD5:function(a){function c(l,m){return l<<m|l>>>32-m}function b(l,m){var o,s,r,t;r=l&2147483648;t=m&2147483648;o=l&1073741824;s=m&1073741824;l=(l&1073741823)+(m&1073741823);if(o&s)return l^2147483648^r^t;return o|s?l&1073741824?l^3221225472^r^t:l^1073741824^r^t:l^r^t}function d(l,m... |
self.element.left = self._left = x; self.element.top = self._top = y; | self._left = x; self._top = y; self.element.style.left = self._left + 'px'; self.element.style.top = self._top + 'px'; | moveTo: function(x, y) { const self = gFloatingPile; self.element.left = self._left = x; self.element.top = self._top = y; } |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | var GibberishAES=function(){var y=14,x=8,z=false,$=function(a){try{return unescape(encodeURIComponent(a))}catch(c){throw"Error on UTF-8 encode";}},aa=function(a){try{return decodeURIComponent(escape(a))}catch(c){throw"Bad Key";}},ba=function(a){var c=[],b;if(a.length<16){c=16-a.length;c=[c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
function NSGetModule(compMgr, fileSpec) { function postRegister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type-mapping','json','application/json',true,true); | var NSGetModule = function NSGetModule(compMgr, fileSpec){ function postRegister(){ var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type-mapping', 'json', 'application/json', true, true); } function preUnregister(){ var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type... | function NSGetModule(compMgr, fileSpec) { function postRegister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type-mapping','json','application/json',true,true); } function preUnregister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-... |
function preUnregister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type-mapping','json',true); } return XPCOMUtils.generateModule(components, postRegister, preUnregister); } | function NSGetModule(compMgr, fileSpec) { function postRegister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-type-mapping','json','application/json',true,true); } function preUnregister() { var catMgr = XPCOMUtils.categoryManager; catMgr.addCategoryEntry('ext-to-... | |
function onEvent(event, target) { if (listeners) { if (options.filter) event = options.filter.call(this, event); if (event) { if (!target) target = options.mixInto; var listenersCopy = listeners.slice(); for (var i = 0; i < listenersCopy.length; i++) try { listenersCopy[i].call(target, event); } catch (e) { Utils.l... | function onEvent(event) { try { var chromeTab = event.originalTarget; switch (event.type) { case "TabSelect": tabsMixIns.bubble("onFocus", chromeTab.tabcandyBrowserTab, true); break; case "TabOpen": newBrowserTab(tabbrowser, chromeTab); tabsMixIns.bubble("onOpen", chromeTab.tabcandyBrowserTab, true); break; case... | function onEvent(event, target) {/* Utils.log('event = ' + event.type + ', mixInto = ' + options.mixInto); *//* Utils.log(options); */ if (listeners) { if (options.filter) event = options.filter.call(this, event); if (event) { if (!target) target = options.mixInto; v... |
if (options.bubbleTo) options.bubbleTo.bubble(options.name, target, event); | } catch (e) { Utils.log(e); } | function onEvent(event, target) {/* Utils.log('event = ' + event.type + ', mixInto = ' + options.mixInto); *//* Utils.log(options); */ if (listeners) { if (options.filter) event = options.filter.call(this, event); if (event) { if (!target) target = options.mixInto; v... |
} }; | function onEvent(event, target) {/* Utils.log('event = ' + event.type + ', mixInto = ' + options.mixInto); *//* Utils.log(options); */ if (listeners) { if (options.filter) event = options.filter.call(this, event); if (event) { if (!target) target = options.mixInto; v... | |
pendingChecks--; numUpdated++; if (isPending(aInstall.existingAddon, "upgrade")) restartNeeded = true; updateStatus(); } | this._maybeShowCategory(aAddon); }, | onInstallEnded: function(aInstall, aAddon) { pendingChecks--; numUpdated++; if (isPending(aInstall.existingAddon, "upgrade")) restartNeeded = true; updateStatus(); } |
gGameStack.onmousemove = self.beginDrag; | window.onmousemove = self.beginDrag; | onmousedown: function(e) { if(e.button) return; const self = Game.layout; const card = self._eventTargetCard = self._getTargetCard(e); if(!card || !card.pile.mayTakeCard(card)) return; interrupt(); self._ex0 = e.pageX; self._ey0 = e.pageY; gGameStack.onmousemove = self.beginDrag; }, |
var jsonObj = this.nativeJSON.decode(cleanData); if ( jsonObj ) { outputDoc = this.jsonFormatter.jsonToHTML(jsonObj, callback, this.uri); } else { throw "There was no object!"; } | var jsonObj = this.nativeJSON.decode(cleanData); outputDoc = this.jsonFormatter.jsonToHTML(jsonObj, callback, this.uri); | onStopRequest: function (aRequest, aContext, aStatusCode) { /* * This should go something like this: * 1. Make sure we have a unicode string. * 2. Convert it to a Javascript object. * 2.1 Removes the callback * 3. Convert that to HTML? Or XUL? * 4. Spit it back out at the listener */ ... |
const width = window.innerWidth | const width = window.innerWidth - 130; | onWindowResize: function(e) { animations.interrupt(); const self = Game.layout; const width = window.innerWidth const height = window.innerHeight - document.getBoxObjectFor(self._node).y; self._node.style.width = width + 'px'; self._node.style.height = height + 'px'; const vs = self.viewsNeedingU... |
const height = window.innerHeight - self._node.boxObject.y; self._node.width = width; self._node.height = height; | const height = window.innerHeight - document.getBoxObjectFor(self._node).y; self._node.style.width = width + 'px'; self._node.style.height = height + 'px'; | onWindowResize: function(e) { animations.interrupt(); const self = Game.layout; const width = window.innerWidth const height = window.innerHeight - self._node.boxObject.y; self._node.width = width; self._node.height = height; const vs = self.viewsNeedingUpdateOnResize; self.setFlexibleViewSize... |
const height = window.innerHeight - document.getBoxObjectFor(self._node).y; self._node.style.width = width + 'px'; | const height = window.innerHeight; | onWindowResize: function(e) { animations.interrupt(); const self = Game.layout; const width = window.innerWidth - 130; // the sidebar is 130px wide const height = window.innerHeight - document.getBoxObjectFor(self._node).y; self._node.style.width = width + 'px'; self._node.style.height = height + 'p... |
out: function(){ var group = drag.info.item.parent; if(group) { group.remove(drag.info.$el, {dontClose: true}); } iQ(this).removeClass("acceptsDrop"); }, | out: function(e){ $(e.target).data("phantomGroup").fadeOut(function(){ $(this).remove(); }); } | out: function(){ var group = drag.info.item.parent; if(group) { group.remove(drag.info.$el, {dontClose: true}); } iQ(this).removeClass("acceptsDrop"); }, |
over: function(){ if( !self.isNewTabsGroup() ) iQ(this).addClass("acceptsDrop"); }, | over: function(e){ var $target = $(e.target); function elToRect($el){ return new Rect( $el.position().left, $el.position().top, $el.width(), $el.height() ); } var height = elToRect($target).height * 1.5 + 20; var width = elToRect($target).width * 1.5 + 20; var unionRect = elToRect($target).union( elToRect(drag.info.$... | over: function(){ if( !self.isNewTabsGroup() ) iQ(this).addClass("acceptsDrop"); }, |
var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... | 0;d<16;d++)b+=String.fromCharCode(a[d]);return b},A=function(a){a=$(a);var c=[],b;for(b=0;b<a.length;b++)c[b]=a.charCodeAt(b);return c},ca=function(a){var c=[],b;for(b=0;b<a;b++)c=c.concat(Math.floor(Math.random()*256));return c},K=function(a,c){var b=y>=12?3:2,d=[],k=[];d=[];k=[];a=a.concat(c);d[0]=GibberishAES.Hash.M... | var GibberishAES=(function(){var m=14,s=8,f=false,L=function(M){try{return unescape(encodeURIComponent(M))}catch(N){throw"Error on UTF-8 encode"}},I=function(M){try{return decodeURIComponent(escape(M))}catch(N){throw ("Bad Key")}},z=function(O){var P=[],N,M;if(O.length<16){N=16-O.length;P=[N,N,N,N,N,N,N,N,N,N,N,N,N,N,N... |
savePref(game + ".lastplayed", Date.now()); | function playGame(game) { if(GameController) GameController.switchFrom(); savePref(game + ".lastplayed", Date.now()); savePref("current-game", game); document.title = gStrings["game."+game]; GameController = Games[game]; GameController.switchTo(); updateUI(); gCmdRedeal.setAttribute("disabled", !Game.redeal);} | |
gFloatingPile.hide(); | function playGame(game) { if(GameController) GameController.switchFrom(); savePref("current-game", game); var full_name = gStrings["game."+game]; var parts = full_name.match(/^([^)]+)\(([^)]+)\)/); gGameName.textContent = parts ? parts[1] : full_name; gGameNameSub.textContent = parts ? parts[2] : ''; GameControl... | |
document.title = gStrings["game."+game]; | var full_name = gStrings["game."+game]; var parts = full_name.match(/^([^)]+)\(([^)]+)\)/); gGameName.textContent = parts ? parts[1] : full_name; gGameNameSub.textContent = parts ? parts[2] : ''; | function playGame(game) { if(GameController) GameController.switchFrom(); savePref("current-game", game); document.title = gStrings["game."+game]; GameController = Games[game]; GameController.switchTo(); updateUI(); gCmdRedeal.setAttribute("disabled", !Game.redeal);} |
$("#playlist > #songs").append("<li id='song-" + i + "'><a href='#' onclick='playSong(" + i + ")'>" + playlist[i]["artist"] + " - " + playlist[i]["track"] + "</li>"); | $("#playlist > #songs").append("<li id='song-" + i + "'><a href='#' onclick='playSong(" + i + "); return false;'>" + playlist[i]["artist"] + " - " + playlist[i]["track"] + "</li>"); | function populatePlaylist() { var i, url; //Clear the list $("#playlist > #songs").text(""); for(i = 0; i < playlist.length; i++) { url = playlist[i]["url"]; // Remove non-streamable tracks if (url == "") { playlist.pop(song); // hur, pop song. } else { playable_songs = true; } $("#playlist > #songs").append(... |
rawDecrypt = function(cryptArr, key, iv) { | rawDecrypt = function(cryptArr, key, iv, binary) { | rawDecrypt = function(cryptArr, key, iv) { // cryptArr, key and iv as byte arrays key = expandKey(key); var numBlocks = cryptArr.length / 16, cipherBlocks = [], i, plainBlocks = [], string = ''; for (i = 0; i < numBlocks; i++) { cipherBlocks.push(c... |
return dec_utf8(string); | return binary ? string : dec_utf8(string); | rawDecrypt = function(cryptArr, key, iv) { // cryptArr, key and iv as byte arrays key = expandKey(key); var numBlocks = cryptArr.length / 16, cipherBlocks = [], i, plainBlocks = [], string = ''; for (i = 0; i < numBlocks; i++) { cipherBlocks.push(c... |
var curDay = change.created.format('yyyy-MM-dd'); | var curDay = DATE.format(change.created, 'yyyy-MM-dd'); | exports.recent = function(req) { var limit = req.params.limit || 50; var changes = []; // Retrieve all changes. for each (var page in Page.all()) { for (var version in page.revisions) { changes.push({ page: page, version: version, cr... |
gScoreDisplay.value = this.score += action.score; | gScoreDisplay.textContent = (this.score += action.score); | redo: function() { const acts = this.actionList; const action = acts[this.actionPtr]; const ptr = ++this.actionPtr; this.canUndo = true; this.canRedo = acts.length > ptr; gScoreDisplay.value = this.score += action.score; this.hintsReady = false; if(action.redo) action.redo(); else action.pe... |
remove: function(classNameToRemove) { if (!this.include(classNameToRemove)) return; this.set($A(this).without(classNameToRemove).join(' ')); }, | (function(){var 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=sel... | remove: function(classNameToRemove) { if (!this.include(classNameToRemove)) return; this.set($A(this).without(classNameToRemove).join(' ')); }, |
var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime - 10; | try { var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime - 10; } catch (e) {} | function seekBack() { var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime - 10;} |
var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime + 10; | try { var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime + 10; } catch (e) {} | function seekForward() { var audio = document.getElementById("audio"); audio.currentTime = audio.currentTime + 10;} |
gScoreDisplay.value = this.score; | gScoreDisplay.textContent = this.score; | show: function() { // some other game may have been using the layout, so need to reassociate piles+views const all = this.allpiles, num = all.length; for(var i = 0; i != num; ++i) all[i].view.displayPile(all[i]); this.layout.show(); if(this.getHints) gCmdHint.removeAttribute("disabled"); else gCmdHi... |
this._node.hidden = false; | setVisibility(this._node, true); | show: function() { if(!this._node) throw "layout not init()'d"; this._node.hidden = false; this._resetHandlers(); this.onWindowResize(); window.onresize = this.onWindowResize; }, |
gScorePanel.hidden = !this.hasScoring; | setVisibility(gScorePanel, this.hasScoring); | show: function() { // some other game may have been using the layout, so need to reassociate piles+views const all = this.allpiles, num = all.length; for(var i = 0; i != num; ++i) all[i].view.displayPile(all[i]); this.layout.show(); if(this.getHints) gCmdHint.removeAttribute("disabled"); else gCmdHi... |
this.element.width = this.context.canvas.width; this.element.height = this.context.canvas.height; | this.element.style.width = this.context.canvas.width + 'px'; this.element.style.height = this.context.canvas.height + 'px'; | showFor: function(card, x, y) { this.lastCard = card; // context widths already set appropriately in sizeCanvas this.element.width = this.context.canvas.width; this.element.height = this.context.canvas.height; this.moveTo(x, y); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.