diff options
author | adeshkp <adeshkp@users.noreply.github.com> | 2019-05-25 15:59:28 -0400 |
---|---|---|
committer | adeshkp <adeshkp@users.noreply.github.com> | 2019-05-25 15:59:28 -0400 |
commit | 97477c1e96fded7c40534afa3ad0bfc3980658e3 (patch) | |
tree | e3dbf60a023bec9187cc4ba09a3372b106643581 /application/palemoon/components/newtab/page.js | |
parent | 8db31d53674d6b9d7f15f50d06d73c5661fc0c0a (diff) | |
download | UXP-97477c1e96fded7c40534afa3ad0bfc3980658e3.tar UXP-97477c1e96fded7c40534afa3ad0bfc3980658e3.tar.gz UXP-97477c1e96fded7c40534afa3ad0bfc3980658e3.tar.lz UXP-97477c1e96fded7c40534afa3ad0bfc3980658e3.tar.xz UXP-97477c1e96fded7c40534afa3ad0bfc3980658e3.zip |
Issue #246 - Remove "enhanced" newtab code from Pale Moon
Diffstat (limited to 'application/palemoon/components/newtab/page.js')
-rw-r--r-- | application/palemoon/components/newtab/page.js | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/application/palemoon/components/newtab/page.js b/application/palemoon/components/newtab/page.js index 7117d4527..ceb2c2a76 100644 --- a/application/palemoon/components/newtab/page.js +++ b/application/palemoon/components/newtab/page.js @@ -47,11 +47,6 @@ var gPage = { let enabled = gAllPages.enabled; this._updateAttributes(enabled); - // Update thumbnails to the new enhanced setting - if (aData == "browser.newtabpage.enhanced") { - this.update(); - } - // Initialize the whole page if we haven't done that, yet. if (enabled) { this._init(); @@ -166,16 +161,6 @@ var gPage = { */ _handleUnloadEvent: function Page_handleUnloadEvent() { gAllPages.unregister(this); - // compute page life-span and send telemetry probe: using milli-seconds will leave - // many low buckets empty. Instead we use half-second precision to make low end - // of histogram linear and not lose the change in user attention - let delta = Math.round((Date.now() - this._firstVisibleTime) / 500); - if (this._suggestedTilePresent) { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN_SUGGESTED").add(delta); - } - else { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN").add(delta); - } }, /** @@ -250,43 +235,10 @@ var gPage = { }, onPageVisibleAndLoaded() { - // Send the index of the last visible tile. - this.reportLastVisibleTileIndex(); - // Maybe tell the user they can undo an initial automigration - this.maybeShowAutoMigrationUndoNotification(); - }, - - reportLastVisibleTileIndex() { - let cwu = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - - let rect = cwu.getBoundsWithoutFlushing(gGrid.node); - let nodes = cwu.nodesFromRect(rect.left, rect.top, 0, rect.width, - rect.height, 0, true, false); - - let i = -1; - let lastIndex = -1; - let sites = gGrid.sites; - - for (let node of nodes) { - if (node.classList && node.classList.contains("newtab-cell")) { - if (sites[++i]) { - lastIndex = i; - if (sites[i].link.targetedSite) { - // record that suggested tile is shown to use suggested-tiles-histogram - this._suggestedTilePresent = true; - } - } - } - } }, toggleEnabled: function(aEvent) { gAllPages.enabled = !gAllPages.enabled; event.stopPropagation(); - }, - - maybeShowAutoMigrationUndoNotification() { - // sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification"); - }, + } }; |