Remove unwanted newtab page code
This commit is contained in:
parent
12db4f07ea
commit
354434b399
|
@ -1039,12 +1039,6 @@ pref("browser.newtabpage.introShown", false);
|
|||
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
|
||||
pref("browser.newtabpage.enabled", true);
|
||||
|
||||
// Toggles the enhanced content of 'about:newtab'. Shows sponsored tiles.
|
||||
sticky_pref("browser.newtabpage.enhanced", false);
|
||||
|
||||
// enables Activity Stream inspired layout
|
||||
pref("browser.newtabpage.compact", false);
|
||||
|
||||
// Disables capturing of page thumbnails
|
||||
pref("browser.pagethumbnails.capturing_disabled", false);
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
{
|
||||
"directory": [
|
||||
{
|
||||
"bgColor": "#ffffff",
|
||||
"directoryId": 10000000,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIX0lEQVR4nO1afXDbZh1+sxbWsbGvsrLbuBt36766sR3sOEgiuU4kx2vTpFGKm0SKsyyOlI8laUZTulLojQEHx4CyAaNnt72yrivklo1YSpxcW7YVbKXHgCvduCvroDt6o6OtLSWN1MRWX/5I4imyJMu2bPNHnrvfSZbf6P09z+/jfV+3ACxhCUsoAEouNWGlMRLri5GuZwUSe1Ug8bcFEjsjUPgHAoX/UyCxkyKJjQoU/iOhCd8WJSvW/8vpXFFsx7PGeaJsVaytul+g8KMiic+IFA7NTNB/rggk/jeRcu26RGFris3JEqIUtkFsdo2KFK6kI52pCSR2UmirZgY9YFmxeaYg1uyqFSj8lMXI5mofRb3rOwEAJcXmDS72ex8QvO43skjv3MeT2DtRX2150cgLzVUDIonF8xBh64KQ2FWRwncPejyFK4tYq/Nmoa1mPE/pnZ1ILe4TFxpdd+SdvOhxrhabXaeLTVjfsHfzSj5K4V8QKfyjnGs3P2UiCt/v/1LeyAsNlXebkbeRSOZ/Q+JCrBH/Yt7IX+qlbhS96dM+Y+dJLC6S+BWRwmazFizf5AEAQPRtHLEh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GHpmaxLI8hcqBzpCiDB9ibnM87lxeaVLUrKg+1fRVimby3LPItw9G9Rlj6Bssw/EI4+i3DM+0iQPomy9JiD69hdztI7SoPtTWWvddry7w5LWIIx/gdCuvcjoZqlLQAAAABJRU5ErkJggg==",
|
||||
"type": "affiliate",
|
||||
"title": "Google",
|
||||
"url": "https://www.google.com/"
|
||||
},
|
||||
{
|
||||
"bgColor": "#E62117",
|
||||
"directoryId": 10000001,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACd0lEQVR4nO3av0tVYRzH8WOIBEVDUUIGCa32FwQ5OrS42NKeRUOTdGmoqUGiLVBqa5UG+7WUREGiEqhTDkVJEA2iYZBkxKvhHumo96o3uM9z0ucNZ7zn834+XO59znm+WZZIJBKJRCKRSGwCx3AWfbiIaxjEPYzgOd7gLWbwIb8WsFjjWrU9q3U+u1C4/0yeOZ47jOROg6jkrn25e3uji27NbzC9A9n/hWnVNbVut/hOTMZ1bSqT6Ky3+A58jOsXhE/o2Lj4FryILBaSF2gpFtAT2ygCPcUCHse2icDTtcW3YSW2TQRW0JahK7ZJRLoy9Ma2iEhvhoHYFhEZyDAU2yIiwxkeBgj6FSDjXxjN8CpA0A1cxucAWY0wkeFdgKBK/pe7H1fxNUDmTpjLMB8gqLJh631A9dF6IUD2Vsxn+BYgaF0BhSIO4WYgh1osZVgOEFSzgEIRh3EL3wO4FFnOAgVtWUChiKO4gx+BvJSqgEIRx3EXP5stVsoCCkWcxH1N3EeUuoBCEafwshlipS8AJzTxW1DaAnAEtzX5B7F0BeAgrmMphFhpClB9M3UFXwI5oQQFYB8u4H0gl3VE3QninOoxVyyWozwL4AxeB8jdjqWgT4M4jUcB8nbKfKj3AUN4gN8BshphLtQbobIyEeqdYFkZzTAc2yIiw+lcQDoZSmeDe/t0ON+gPIltE4Fnxa3pnp8QacFYbKOAjCnOCOUldKhOUO12Nk+JFUroxFRkwWYypd6cYKGEVvTbfZOil2w3KVqjjHZ047xqKRWbZ4XHVed2Z/2d5a0167vYgHC9z6/df9bWs8L9uXO3RmeFE4lEIpFIJPYKfwAcall+TY3q/wAAAABJRU5ErkJggg==",
|
||||
"type": "affiliate",
|
||||
"title": "YouTube",
|
||||
"url": "https://www.youtube.com/"
|
||||
},
|
||||
{
|
||||
"directoryId": 10000002,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACT0lEQVR4nO3bzWsTQRgG8PlPHMVLqRVMoQiFehJyUBAFtRCFHspExaaSoFg8CMGPSg+R3kQhh3osIbOlMVrbGKtrsbYESTbB0gqNVGu1WCkWutnXg+ihQjqxi7Oz8w481533+V32iyGEEEIZ76Rho0SZ4ewOG+D3UMatXSx9nPwqb5ySPZC0dPMzhDJelD6IrDCjQijjtvRBJIWGeY3IHkJ2EED2ALKDALIHkB2lAJoujkIwnoNQwoQL96aha3AKQgkTTtyZhKM383D4+gQEoll/AQRiWbg1XILZ+VWwaw6IrE3bgZbejNoAe8+PwEC6DOsbm0Klt679lxQGCESzMD335Z+KKw+wrzcDpcVvOyqvNMCwubjj8soCnBx44Up5ZQGeFZf1BWi7/BhqjthtzpcAseRsQwVrjgNzS9/hZWUFJq3Pf6U5MqoWQHJ8Qbh8aqoKB688cWVfzwBMvP0kVN6srMCec+7t6xmAmfmvQgCRBzOu7usZgHJ1TQjgyI283gCHrj3VG6C9bwwBEAABEEAtgAPRR9A3VKibpdUfQgD9KWvba529+8pbAMF4TqicW+th/r3eAP0pS2+Anvtv9AY4dvu53gCtMfGfI74DWN+wG5rNdwDl6preAGOFj3oDJMcXvAfQHMlAKGHWTeWD2KPw1aFC3et0NPi9wDPvAq/fif0LDMZzru6LALKLIwACIAACIAACIAACIAACIAACIAACIAACIMD/BvDKwUkZAJRx2zNHZyUBFAntTp+WXV4iQCf5c3yecUsXAMq49bv8Txsl6ZCTabOAAAAAAElFTkSuQmCC",
|
||||
"title": "Facebook",
|
||||
"type": "affiliate",
|
||||
"url": "https://www.facebook.com/"
|
||||
},
|
||||
{
|
||||
"bgColor": "#ffffff",
|
||||
"directoryId": 10000003,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAEyUlEQVRoge2abYhVRRjHf7veVqSFhIQwa7E3ojXNpSiNgl0S+tAHKUjohbQohUgqKKwMSXpbsATdqOgFU4zKpAzMioploxI/WFBZmhRlL/S2lbpsudvd24dzjve5c58558ycey9B84MB95x5/vM/d+bMzDNHCAQCgUAgEAgE/rf0AOd6lJmKVrdDfI8SfxawIKNcEscfa8TOzBFrlj6Aimd5XnmAbx01TD5xiL3IiH3Y8zm4DXgaGALGMip/DDwHDACXKQ9wA/AiMJyi8T3wAnCvEr841t9tiR2JY/uB443YC4BHgA3ApyntTxD90FuAlaaBU4EfLIHvKIZtnAT8ZtE5O6fGCiNuFJiTM7YNWKe0PQScmRV8ncX4+zkbT1hq0bkyZ/wyI+5ux/bPM+I/ACbnCSyhv8tloMvBQAnYr+h8mDP+PRHzGXCMQ9sA14j4ceAMl+A70HtvjaMJ22jqy4i70Kh/sWO7AO+K+Jdcg6cCh6k3/gfQ6aBTAr5UdN7OiHtL1H3NxXhMN9Fkl2jM89BgPXrv3eKoc71Fx2ZqvqhTJv+kKRkQGjs94gE4PTZgGt9DNMvmpQR8pehst9R/Q9TZ5OG7EzgkNK720DjKNvTeu9RRZ4miMUH9bnCeuH8EOMXD881C40egw0PjKL3oP8Cbjjq2FWGrUW+HuDfg6XmP0NA2W060GYKy97odtbQVoQzMiu+fL66PACd4+O0VGqPANA+NOm5CHwVPOeqUgH2Kzub4/uvi2gOeXrcU8GdlCtG7ZBr/C5juqHWtojMOXCX+HgaO8/B5YqyV6GjZpjf3oI+C+x11JgF7FZ1/xL/v9PS4WmgMempYsW2MfsdtYwTRsqT9mBXgANGIc6WD2lG60EMjk0fRTS931GkHPrdo3ejpbZHQ2B+30XC6iNZm0/Q3RBOcC7Yc4WRPb0NC43ZPjVxsRDe+yFHHHLJJWevhabaIP0z0ujaNWdQmGUn5yEPrPkVnBPe1+0kRv97DhzPb0UdBr6OObZv9kIOGnJzLRPlL0+lFN+6yPe5BH0kV4E/yD+PlIm6bQ/uF2Um98Qlgbs74V5V4WVbl0GgDvsB/BBbiCnTj2lG5yVyqvX+QaOSYOsNk7y8WiPo+c1Ah2tFPesbJTmFfEfX7qU2BZVmRoSPnkMU+D1EUW5L0WErMHKq9P0o149NeqZ+w7wq7qO77f02p11Qmo6/laWnoVlFvnbh+uaJTAW616Dwo6rjmIw3lLnTjminZ+38DM8Q92yv1HfUnOh3AL/H9I7hnpA1lKrXnb0nRkqSXxf0nFC3bK7XMqCdT6o2NeIiirEE3Lvfks6kesI6hf1m2nTt8TW2uIeeLhub8vsxAT5IOUB2+8qTm2RStlYqOnOV7xLXBRj5EUWxJ0hKic/2k98dJ367azh32Es0Tz4hrTcn5fZE9I8s+ajc6m20CgrUWrdVEK0yFJub8RRhEN56UMjk+TVO7xtuK6yFMS1hIuuk82+SETSk6h3A/hmsJ7egfPypEh555ej/hHOzZYktyfl9keiqLzzc+LUlqWc7vSyfRJ3Rpegw4zUOrj/ofoKU5vy/91Jp+vIDWLkPL/J9h/0mmAT9TXa58vvIkzKe6ydpQ3FogEAgEAoFAIBCI+Rf5q90lTPZHIwAAAABJRU5ErkJggg==",
|
||||
"title": "Wikipedia",
|
||||
"type": "affiliate",
|
||||
"url": "https://www.wikipedia.org/"
|
||||
},
|
||||
{
|
||||
"bgColor": "#400090",
|
||||
"directoryId": 10000004,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAD3ElEQVR4nO3bS4xecxjH8WmLBVVEx63JBIkEISkhJqURpAsZQioWqpeNSxraYlKpSwiDIRY0aSakqgS9qHRBIhKxYdFFFxWXIGkilYZEUCKj4zLzsfi/LN55zpiZc/lr+/6Ss3nfc57ze77n9r88/y7swxa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CaDIBRqcBxGx7GYmll57hixlySaojPx83SuqW3pLXC0wKwX7oF+3GloILjUJE03X6NtAh8J76LAOzFRtwqKGY63CStX14mLen5+m9Vgqdbrd+9cgAAAABJRU5ErkJggg==",
|
||||
"title": "Yahoo!",
|
||||
"type": "affiliate",
|
||||
"url": "https://www.yahoo.com/"
|
||||
},
|
||||
{
|
||||
"directoryId": 10000005,
|
||||
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAJdklEQVR4nO1ba1QTZwL9iCY8hCDxDUpYOIUDBOVZAlJ5NQXRFlEQ8YGiRaqESlhxeRQ3FAWURRC6FYglqBHTEaI8Eg+CRMRatfKwLNL6oqer1h57XEWYbwJK9sdKixiSmRCCbrnn3D8w351770wy3zd8ADCJSUxiPMHhcPS3bdv2/tq1a9MWL16MODs7t5iamt4zMjLq0dfX76VSqU8sLCzueHt7S+3t7QtjYmLWJyYmzp1o32NGSUmJd0BAQLmRkVEPAEBOhCQS6bm3t7c0MjIyHACgMyEB1AGCILTY2NgUOzu7fwGCoUfj/Pnz/x0XF/fXgoICXW3nIYTs7Owlpqam94CGgo+ktbX1j4mJiY7azIQbMTExu3V0dF6AcQo/RF1dXYggSIj2kuFAfHx8Lhjn4ODVElCxWOygpXjKkZWVxQZaDD9EOp3eXV9fb6yVkKOho6Njgb6+fp8ig9pgfHx8gjZyjgYdX1/fhtHMqSKJRHpOJpNl6o4HAMidnJxatJJUEWpraz3xmBxOExOT30JDQ/+elpZmD14+26uqqubExcVFzJs3T53H5uCJEydMtZN4BKKiovKJmA0KChLu3bt3zmh6Bw4c0F+3bl0BEU0AgLygoCByXAKqgq2tbSdek0FBQTV4dZlM5kW8ugAAOZPJ/IeGIuHH9evXp+no6DzHa7K+vt4Lr3ZiYuIOvLoAALmnp6dQQ7HwIzc31xqvQRsbmy5AYC6fnJzsjlcbACD38/M7p5lUBBEeHp5lbm7+E4lEUnonREdHpxPRLSwsNFWmN5Kurq5XN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uH2QQCqUOuFwuSXY5ZT1a6dyullkNEiKMLky6NaYTeX2JrRXILqcslIkDk2GFYyP6lSE27oGPzHiKVTiJZdV+qf2dh50mJPRo6Jby9bBLycvRSpcCeNLpe7SEovw7Aw+/MpDBUx5XsNqAbHgp2buzc4KutDp4dHGXEVq3xh02fbwFq2Htg5WuQljlcwFWLOqAJ97p7hOYPewTmD2EQuu76Emn67DauxmtdEawap8ceH5TNFofznxQs5XQBstJTGISk1AX/wUPVWOeSpK50AAAAABJRU5ErkJggg==",
|
||||
"title": "Amazon",
|
||||
"type": "affiliate",
|
||||
"url": "https://www.amazon.com/"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -9,7 +9,6 @@ var gCustomize = {
|
|||
"blank",
|
||||
"button",
|
||||
"classic",
|
||||
"enhanced",
|
||||
"panel",
|
||||
"overlay",
|
||||
"learn"
|
||||
|
@ -83,13 +82,10 @@ var gCustomize = {
|
|||
}
|
||||
switch (event.currentTarget.id) {
|
||||
case "newtab-customize-blank":
|
||||
sendAsyncMessage("NewTab:Customize", {enabled: false, enhanced: false});
|
||||
sendAsyncMessage("NewTab:Customize", {enabled: false});
|
||||
break;
|
||||
case "newtab-customize-classic":
|
||||
sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false});
|
||||
break;
|
||||
case "newtab-customize-enhanced":
|
||||
sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: !gAllPages.enhanced});
|
||||
sendAsyncMessage("NewTab:Customize", {enabled: true});
|
||||
break;
|
||||
case "newtab-customize-learn":
|
||||
this.showLearn();
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
*/
|
||||
const GRID_BOTTOM_EXTRA = 7; // title's line-height extends 7px past the margin
|
||||
const GRID_WIDTH_EXTRA = 1; // provide 1px buffer to allow for rounding error
|
||||
const SPONSORED_TAG_BUFFER = 2; // 2px buffer to clip off top of sponsored tag
|
||||
|
||||
/**
|
||||
* This singleton represents the grid that contains all sites.
|
||||
|
@ -142,13 +141,9 @@ var gGrid = {
|
|||
|
||||
// Create sites.
|
||||
let numLinks = Math.min(links.length, cells.length);
|
||||
let hasHistoryTiles = false;
|
||||
for (let i = 0; i < numLinks; i++) {
|
||||
if (links[i]) {
|
||||
this.createSite(links[i], cells[i]);
|
||||
if (links[i].type == "history") {
|
||||
hasHistoryTiles = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,9 +152,6 @@ var gGrid = {
|
|||
this._gridDefaultContent.nextSibling.remove();
|
||||
}
|
||||
this._node.appendChild(fragment);
|
||||
|
||||
document.getElementById("topsites-heading").textContent =
|
||||
hasHistoryTiles ? "Your Top Sites" : "Top Sites";
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -182,18 +174,15 @@ var gGrid = {
|
|||
|
||||
// Create the site's inner HTML code.
|
||||
site.innerHTML =
|
||||
'<span class="newtab-sponsored">' + newTabString("sponsored.button") + '</span>' +
|
||||
'<a class="newtab-link">' +
|
||||
' <span class="newtab-thumbnail placeholder"/>' +
|
||||
' <span class="newtab-thumbnail thumbnail"/>' +
|
||||
' <span class="newtab-thumbnail enhanced-content"/>' +
|
||||
' <span class="newtab-title"/>' +
|
||||
'</a>' +
|
||||
'<input type="button" title="' + newTabString("pin") + '"' +
|
||||
' class="newtab-control newtab-control-pin"/>' +
|
||||
'<input type="button" title="' + newTabString("block") + '"' +
|
||||
' class="newtab-control newtab-control-block"/>' +
|
||||
'<span class="newtab-suggested"/>';
|
||||
' class="newtab-control newtab-control-block"/>';
|
||||
|
||||
this._siteFragment = document.createDocumentFragment();
|
||||
this._siteFragment.appendChild(site);
|
||||
|
@ -274,6 +263,6 @@ var gGrid = {
|
|||
this._node.style.maxWidth = gGridPrefs.gridColumns * this._cellWidth +
|
||||
GRID_WIDTH_EXTRA + "px";
|
||||
this._node.style.height = this._computeHeight() + "px";
|
||||
this._node.style.maxHeight = this._computeHeight(gridRows) - SPONSORED_TAG_BUFFER + "px";
|
||||
this._node.style.maxHeight = this._computeHeight(gridRows) + "px";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -122,10 +122,6 @@ input[type=button] {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
body:not(.compact) #topsites-heading {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* If you change the sizes here, make sure you
|
||||
* change the preferences:
|
||||
|
@ -140,12 +136,6 @@ body:not(.compact) #topsites-heading {
|
|||
width: 290px;
|
||||
}
|
||||
|
||||
body.compact .newtab-cell {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
margin: 12px;
|
||||
}
|
||||
|
||||
/* SITES */
|
||||
.newtab-site {
|
||||
position: relative;
|
||||
|
@ -175,16 +165,13 @@ body.compact .newtab-cell {
|
|||
}
|
||||
|
||||
/* TITLES */
|
||||
.newtab-sponsored,
|
||||
.newtab-title,
|
||||
.newtab-suggested {
|
||||
.newtab-title {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.newtab-sponsored,
|
||||
.newtab-title {
|
||||
bottom: 0;
|
||||
white-space: nowrap;
|
||||
|
@ -192,103 +179,11 @@ body.compact .newtab-cell {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.newtab-suggested {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
height: 17px;
|
||||
line-height: 17px;
|
||||
margin-bottom: -1px;
|
||||
padding: 2px 8px;
|
||||
display: none;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
left: 0;
|
||||
top: 215px;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
.newtab-suggested-bounds {
|
||||
max-height: 34px; /* 34 / 17 = 2 lines maximum */
|
||||
}
|
||||
|
||||
.newtab-title {
|
||||
left: 0;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.newtab-sponsored {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E2E2E2;
|
||||
border-radius: 3px;
|
||||
color: #4A4A4A;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-family: Arial;
|
||||
font-size: 9px;
|
||||
height: 17px;
|
||||
left: 0;
|
||||
line-height: 6px;
|
||||
padding: 4px;
|
||||
right: auto;
|
||||
top: -15px;
|
||||
}
|
||||
|
||||
.newtab-site[suggested=true] > .newtab-sponsored {
|
||||
background-color: #E2E2E2;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.newtab-site > .newtab-sponsored:-moz-any(:hover, [active]) {
|
||||
background-color: #4A90E2;
|
||||
border: 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.newtab-site > .newtab-sponsored[active] {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.newtab-sponsored:dir(rtl) {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.newtab-site:-moz-any([type=enhanced], [type=sponsored], [suggested]) .newtab-sponsored {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.newtab-site[suggested] .newtab-suggested {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.sponsored-explain,
|
||||
.sponsored-explain a,
|
||||
.suggested-explain,
|
||||
.suggested-explain a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.sponsored-explain,
|
||||
.suggested-explain {
|
||||
background-color: rgba(51, 51, 51, 0.95);
|
||||
bottom: 30px;
|
||||
line-height: 20px;
|
||||
padding: 15px 10px;
|
||||
position: absolute;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.sponsored-explain input,
|
||||
.suggested-explain input {
|
||||
background-size: 18px;
|
||||
height: 18px;
|
||||
opacity: 1;
|
||||
pointer-events: none;
|
||||
position: static;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
/* CONTROLS */
|
||||
.newtab-control {
|
||||
position: absolute;
|
||||
|
@ -333,11 +228,6 @@ body.compact .newtab-cell {
|
|||
margin: 40px 0 15px;
|
||||
}
|
||||
|
||||
body.compact #newtab-search-container {
|
||||
margin-top: 0;
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
#newtab-search-container[page-disabled] {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -73,7 +73,6 @@
|
|||
<div id="newtab-horizontal-margin">
|
||||
<div class="newtab-side-margin"/>
|
||||
<div id="newtab-grid">
|
||||
<h1 id="topsites-heading"/>
|
||||
</div>
|
||||
<div class="newtab-side-margin"/>
|
||||
</div>
|
||||
|
|
|
@ -48,11 +48,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();
|
||||
|
@ -79,10 +74,7 @@ var gPage = {
|
|||
update(reason = "") {
|
||||
// Update immediately if we're visible.
|
||||
if (!document.hidden) {
|
||||
// Ignore updates where reason=links-changed as those signal that the
|
||||
// provider's set of links changed. We don't want to update visible pages
|
||||
// in that case, it is ok to wait until the user opens the next tab.
|
||||
if (reason != "links-changed" && gGrid.ready) {
|
||||
if (gGrid.ready) {
|
||||
gGrid.refresh();
|
||||
}
|
||||
|
||||
|
@ -119,10 +111,6 @@ var gPage = {
|
|||
document.getElementById("newtab-search-submit").value =
|
||||
document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
|
||||
|
||||
if (Services.prefs.getBoolPref("browser.newtabpage.compact")) {
|
||||
document.body.classList.add("compact");
|
||||
}
|
||||
|
||||
// Initialize search.
|
||||
gSearch.init();
|
||||
|
||||
|
@ -174,16 +162,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);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -258,38 +236,5 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
maybeShowAutoMigrationUndoNotification() {
|
||||
sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification");
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -62,7 +62,7 @@ Site.prototype = {
|
|||
this._updateAttributes(true);
|
||||
let changed = gPinnedLinks.pin(this._link, aIndex);
|
||||
if (changed) {
|
||||
// render site again to remove suggested/sponsored tags
|
||||
// render site again
|
||||
this._render();
|
||||
}
|
||||
return changed;
|
||||
|
@ -136,15 +136,6 @@ Site.prototype = {
|
|||
return str;
|
||||
},
|
||||
|
||||
_getSuggestedTileExplanation: function() {
|
||||
let targetedName = `<strong> ${this.link.targetedName} </strong>`;
|
||||
let targetedSite = `<strong> ${this.link.targetedSite} </strong>`;
|
||||
if (this.link.explanation) {
|
||||
return this._newTabString(this.link.explanation, [targetedName, targetedSite]);
|
||||
}
|
||||
return newTabString("suggested.button", [targetedName]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks for and modifies link at campaign end time
|
||||
*/
|
||||
|
@ -155,11 +146,8 @@ Site.prototype = {
|
|||
this.link.url = Services.io.newURI(this.url, null, null).resolve("/");
|
||||
// clear supplied images - this triggers thumbnail download for new url
|
||||
delete this.link.imageURI;
|
||||
delete this.link.enhancedImageURI;
|
||||
// remove endTime to avoid further time checks
|
||||
delete this.link.endTime;
|
||||
// clear enhanced-content image that may still exist in preloaded page
|
||||
this._querySelector(".enhanced-content").style.backgroundImage = "";
|
||||
gPinnedLinks.replace(oldUrl, this.link);
|
||||
}
|
||||
},
|
||||
|
@ -171,11 +159,8 @@ Site.prototype = {
|
|||
// first check for end time, as it may modify the link
|
||||
this._checkLinkEndTime();
|
||||
// setup display variables
|
||||
let enhanced = gAllPages.enhanced;
|
||||
let url = this.url;
|
||||
let title = enhanced && enhanced.title ? enhanced.title :
|
||||
this.link.type == "history" ? this.link.baseDomain :
|
||||
this.title;
|
||||
let title = this.link.type == "history" ? this.link.baseDomain : this.title;
|
||||
let tooltip = (this.title == url ? this.title : this.title + "\n" + url);
|
||||
|
||||
let link = this._querySelector(".newtab-link");
|
||||
|
@ -189,22 +174,6 @@ Site.prototype = {
|
|||
titleNode.style.backgroundColor = this.link.titleBgColor;
|
||||
}
|
||||
|
||||
// remove "suggested" attribute to avoid showing "suggested" tag
|
||||
// after site was pinned or dropped
|
||||
this.node.removeAttribute("suggested");
|
||||
|
||||
if (this.link.targetedSite) {
|
||||
if (this.node.getAttribute("type") != "sponsored") {
|
||||
this._querySelector(".newtab-sponsored").textContent =
|
||||
newTabString("suggested.tag");
|
||||
}
|
||||
|
||||
this.node.setAttribute("suggested", true);
|
||||
let explanation = this._getSuggestedTileExplanation();
|
||||
this._querySelector(".newtab-suggested").innerHTML =
|
||||
`<div class='newtab-suggested-bounds'> ${explanation} </div>`;
|
||||
}
|
||||
|
||||
if (this.isPinned())
|
||||
this._updateAttributes(true);
|
||||
// Capture the page if the thumbnail is missing, which will cause page.js
|
||||
|
@ -243,10 +212,8 @@ Site.prototype = {
|
|||
* Refreshes the thumbnail for the site.
|
||||
*/
|
||||
refreshThumbnail: function Site_refreshThumbnail() {
|
||||
// Only enhance tiles if that feature is turned on
|
||||
let link = gAllPages.enhanced ||
|
||||
this.link;
|
||||
|
||||
let link = this.link;
|
||||
|
||||
let thumbnail = this._querySelector(".newtab-thumbnail.thumbnail");
|
||||
if (link.bgColor) {
|
||||
thumbnail.style.backgroundColor = link.bgColor;
|
||||
|
@ -267,16 +234,6 @@ Site.prototype = {
|
|||
placeholder.style.backgroundColor = "hsl(" + hue + ",80%,40%)";
|
||||
placeholder.textContent = link.baseDomain.substr(0,1).toUpperCase();
|
||||
}
|
||||
|
||||
if (link.enhancedImageURI) {
|
||||
let enhanced = this._querySelector(".enhanced-content");
|
||||
enhanced.style.backgroundImage = 'url("' + link.enhancedImageURI + '")';
|
||||
|
||||
if (this.link.type != link.type) {
|
||||
this.node.setAttribute("type", "enhanced");
|
||||
this.enhancedId = link.directoryId;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_ignoreHoverEvents: function(element) {
|
||||
|
@ -296,13 +253,6 @@ Site.prototype = {
|
|||
this._node.addEventListener("dragstart", this, false);
|
||||
this._node.addEventListener("dragend", this, false);
|
||||
this._node.addEventListener("mouseover", this, false);
|
||||
|
||||
// Specially treat the sponsored icon & suggested explanation
|
||||
// text to prevent regular hover effects
|
||||
let sponsored = this._querySelector(".newtab-sponsored");
|
||||
let suggested = this._querySelector(".newtab-suggested");
|
||||
this._ignoreHoverEvents(sponsored);
|
||||
this._ignoreHoverEvents(suggested);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -333,31 +283,6 @@ Site.prototype = {
|
|||
.add(aIndex);
|
||||
},
|
||||
|
||||
_toggleLegalText: function(buttonClass, explanationTextClass) {
|
||||
let button = this._querySelector(buttonClass);
|
||||
if (button.hasAttribute("active")) {
|
||||
let explain = this._querySelector(explanationTextClass);
|
||||
explain.parentNode.removeChild(explain);
|
||||
|
||||
button.removeAttribute("active");
|
||||
}
|
||||
else {
|
||||
let explain = document.createElementNS(HTML_NAMESPACE, "div");
|
||||
explain.className = explanationTextClass.slice(1); // Slice off the first character, '.'
|
||||
this.node.appendChild(explain);
|
||||
|
||||
let link = '<a href="' + TILES_EXPLAIN_LINK + '">' +
|
||||
newTabString("learn.link") + "</a>";
|
||||
let type = (this.node.getAttribute("suggested") && this.node.getAttribute("type") == "affiliate") ?
|
||||
"suggested" : this.node.getAttribute("type");
|
||||
let icon = '<input type="button" class="newtab-control newtab-' +
|
||||
(type == "enhanced" ? "customize" : "control-block") + '"/>';
|
||||
explain.innerHTML = newTabString(type + (type == "sponsored" ? ".explain2" : ".explain"), [icon, link]);
|
||||
|
||||
button.setAttribute("active", "true");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles site click events.
|
||||
*/
|
||||
|
@ -376,13 +301,6 @@ Site.prototype = {
|
|||
action = "click";
|
||||
}
|
||||
}
|
||||
// Handle sponsored explanation link click
|
||||
else if (target.parentElement.classList.contains("sponsored-explain")) {
|
||||
action = "sponsored_link";
|
||||
}
|
||||
else if (target.parentElement.classList.contains("suggested-explain")) {
|
||||
action = "suggested_link";
|
||||
}
|
||||
// Only handle primary clicks for the remaining targets
|
||||
else if (button == 0) {
|
||||
aEvent.preventDefault();
|
||||
|
@ -390,18 +308,13 @@ Site.prototype = {
|
|||
this.block();
|
||||
action = "block";
|
||||
}
|
||||
else if (target.classList.contains("sponsored-explain") ||
|
||||
target.classList.contains("newtab-sponsored")) {
|
||||
this._toggleLegalText(".newtab-sponsored", ".sponsored-explain");
|
||||
action = "sponsored";
|
||||
}
|
||||
else if (pinned && target.classList.contains("newtab-control-pin")) {
|
||||
this.unpin();
|
||||
action = "unpin";
|
||||
}
|
||||
else if (!pinned && target.classList.contains("newtab-control-pin")) {
|
||||
if (this.pin()) {
|
||||
// suggested link has changed - update rest of the pages
|
||||
// link has changed - update rest of the pages
|
||||
gAllPages.update(gPage);
|
||||
}
|
||||
action = "pin";
|
||||
|
|
|
@ -113,8 +113,6 @@ browser.jar:
|
|||
content/browser/newtab/newTab.xhtml (content/newtab/newTab.xhtml)
|
||||
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
|
||||
content/browser/newtab/newTab.css (content/newtab/newTab.css)
|
||||
content/browser/newtab/newTab.inadjacent.json (content/newtab/newTab.inadjacent.json)
|
||||
content/browser/newtab/alternativeDefaultSites.json (content/newtab/alternativeDefaultSites.json)
|
||||
* content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
|
||||
content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
|
||||
content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
|
||||
|
|
|
@ -21,7 +21,6 @@ const gPrefsMap = new Map([
|
|||
["browser.newtabpage.remote.mode", "str"],
|
||||
["browser.newtabpage.remote.version", "str"],
|
||||
["browser.newtabpage.enabled", "bool"],
|
||||
["browser.newtabpage.enhanced", "bool"],
|
||||
["browser.newtabpage.introShown", "bool"],
|
||||
["browser.newtabpage.updateIntroShown", "bool"],
|
||||
["browser.newtabpage.pinned", "str"],
|
||||
|
@ -34,7 +33,6 @@ const gPrefsMap = new Map([
|
|||
// prefs that are important for the newtab page
|
||||
const gNewtabPagePrefs = new Set([
|
||||
"browser.newtabpage.enabled",
|
||||
"browser.newtabpage.enhanced",
|
||||
"browser.newtabpage.pinned",
|
||||
"browser.newtabpage.blocked",
|
||||
"browser.newtabpage.introShown",
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
<!-- These strings are used in the about:newtab page -->
|
||||
<!ENTITY newtab.pageTitle "New Tab">
|
||||
<!ENTITY newtab.customize.classic "Show your top sites">
|
||||
<!ENTITY newtab.customize.cog.enhanced "Include suggested sites">
|
||||
<!ENTITY newtab.customize.cog.title2 "NEW TAB CONTROLS">
|
||||
<!ENTITY newtab.customize.cog.learn "Learn about New Tab">
|
||||
<!ENTITY newtab.customize.title "Customize your New Tab page">
|
||||
<!ENTITY newtab.customize.suggested "Show suggested and your top sites">
|
||||
<!ENTITY newtab.customize.topsites "Show your top sites">
|
||||
<!ENTITY newtab.customize.blank2 "Show blank page">
|
||||
<!ENTITY newtab.undo.removedLabel "Thumbnail removed.">
|
||||
<!ENTITY newtab.undo.undoButton "Undo.">
|
||||
|
|
|
@ -5,42 +5,3 @@
|
|||
newtab.pin=Pin this site at its current position
|
||||
newtab.unpin=Unpin this site
|
||||
newtab.block=Remove this site
|
||||
# LOCALIZATION NOTE(newtab.sponsored.button): This text appears for sponsored
|
||||
# and enhanced tiles on the same line as the tile's title, so prefer short
|
||||
# strings to avoid overlap. This string should be uppercase.
|
||||
newtab.sponsored.button=SPONSORED
|
||||
# LOCALIZATION NOTE(newtab.suggested.button): This text appears for sponsored
|
||||
# and suggested tiles on the same line as the tile's title, so prefer short
|
||||
# strings to avoid overlap. This string should be uppercase.
|
||||
newtab.suggested.tag=SUGGESTED
|
||||
# LOCALIZATION NOTE(newtab.suggested.button): %1$S will be replaced inline by
|
||||
# one of the user's top 100 sites that triggered this suggested tile.
|
||||
# This text appears for suggested tiles under the tile's title, so prefer short
|
||||
# strings to avoid truncating important text.
|
||||
newtab.suggested.button=Suggested for %1$S visitors
|
||||
# LOCALIZATION NOTE(newtab.sponsored.explain): %1$S will be replaced inline by
|
||||
# the (X) block icon. %2$S will be replaced by an active link using string
|
||||
# newtab.learn.link as text.
|
||||
newtab.sponsored.explain=This tile is being shown to you on behalf of a Mozilla partner. You can remove it at any time by clicking the %1$S button. %2$S
|
||||
# LOCALIZATION NOTE(newtab.sponsored.explain2): %1$S will be replaced inline by
|
||||
# the (X) block icon. %2$S will be replaced by an active link using string
|
||||
# newtab.learn.link as text.
|
||||
newtab.sponsored.explain2=This site is suggested to you on behalf of a Mozilla partner. You can remove it at any time by clicking the %1$S button. %2$S
|
||||
# LOCALIZATION NOTE(newtab.suggested.explain): %1$S will be replaced inline by
|
||||
# the (X) block icon. %2$S will be replaced by an active link using string
|
||||
# newtab.learn.link as text.
|
||||
newtab.suggested.explain=This site is suggested to you by Mozilla. You can remove it at any time by clicking the %1$S button. %2$S
|
||||
# LOCALIZATION NOTE(newtab.enhanced.explain): %1$S will be replaced inline by
|
||||
# the gear icon used to customize the new tab window. %2$S will be replaced by
|
||||
# an active link using string newtab.learn.link as text.
|
||||
newtab.enhanced.explain=A Mozilla partner has visually enhanced this tile, replacing the screenshot. You can turn off enhanced tiles by clicking the %1$S button for your preferences. %2$S
|
||||
newtab.intro1.paragraph1=Now when you open New Tab, you’ll also see sites we think might be interesting to you. Some may be suggested by Mozilla or sponsored by one of our partners.
|
||||
# LOCALIZATION NOTE(newtab.intro1.paragraph2): %1$S will be replaced inline by
|
||||
# an active link using string newtab.privacy.link as text. %2$S will be replaced
|
||||
# inline by the gear icon used to customize the new tab window.
|
||||
newtab.intro1.paragraph2=In order to provide this service, some data is automatically sent back to us in accordance with our %1$S. You can turn this off by unchecking the option under the gear icon (%2$S).
|
||||
newtab.learn.link=Learn more…
|
||||
newtab.privacy.link=Privacy Notice
|
||||
newtab.learn.link2=More about New Tab
|
||||
newtab.intro.header.update=New Tab got an update!
|
||||
newtab.intro.gotit=Got it!
|
||||
|
|
|
@ -33,7 +33,6 @@ var AboutNewTab = {
|
|||
|
||||
customize: function(message) {
|
||||
NewTabUtils.allPages.enabled = message.data.enabled;
|
||||
NewTabUtils.allPages.enhanced = message.data.enhanced;
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
|
|
|
@ -99,19 +99,6 @@
|
|||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* GRID */
|
||||
#topsites-heading {
|
||||
color: #7A7A7A;
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
/* Position the heading such that it doesn't affect how many cells we
|
||||
can fit into the grid. */
|
||||
position: absolute;
|
||||
/* The top margin moves the heading away from the grid.
|
||||
The horizontal margin aligns the heading with the cells. */
|
||||
margin: -1em 10px 0;
|
||||
}
|
||||
|
||||
/* CELLS */
|
||||
.newtab-cell {
|
||||
--cell-corner-radius: 8px;
|
||||
|
@ -119,10 +106,6 @@
|
|||
border-radius: var(--cell-corner-radius);
|
||||
}
|
||||
|
||||
body.compact .newtab-cell {
|
||||
--cell-corner-radius: 2px;
|
||||
}
|
||||
|
||||
.newtab-cell:empty {
|
||||
outline: 2px dashed #c1c1c1;
|
||||
outline-offset: -2px;
|
||||
|
@ -172,49 +155,16 @@ body.compact .newtab-cell {
|
|||
transition: opacity 100ms ease-out;
|
||||
}
|
||||
|
||||
body.compact .newtab-thumbnail {
|
||||
height: 100%;
|
||||
border-radius: calc(var(--cell-corner-radius) + 1px);
|
||||
outline: 1px solid hsla(0,0%,0%,.1);
|
||||
-moz-outline-radius: var(--cell-corner-radius);
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
.newtab-thumbnail.placeholder {
|
||||
color: white;
|
||||
font-size: 85px;
|
||||
line-height: 200%;
|
||||
}
|
||||
|
||||
body.compact .newtab-thumbnail.placeholder {
|
||||
font-size: 45px;
|
||||
}
|
||||
|
||||
.newtab-cell:not([ignorehover]) .newtab-site:hover .newtab-thumbnail.enhanced-content {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.newtab-site[type=affiliate] .newtab-thumbnail,
|
||||
.newtab-site[type=enhanced] .newtab-thumbnail,
|
||||
.newtab-site[type=organic] .newtab-thumbnail,
|
||||
.newtab-site[type=sponsored] .newtab-thumbnail {
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
body.compact .newtab-site[type=affiliate] .newtab-thumbnail {
|
||||
background-position: center 30%;
|
||||
}
|
||||
|
||||
.newtab-site[type=affiliate] .newtab-thumbnail,
|
||||
body:not(.compact) .newtab-site[type=enhanced] .newtab-thumbnail,
|
||||
body:not(.compact) .newtab-site[type=organic] .newtab-thumbnail,
|
||||
body:not(.compact) .newtab-site[type=sponsored] .newtab-thumbnail {
|
||||
background-size: auto;
|
||||
}
|
||||
|
||||
/* TITLES */
|
||||
|
||||
.newtab-title {
|
||||
color: #5c5c5c;
|
||||
background-color: #F2F2F2;
|
||||
font-size: 13px;
|
||||
line-height: 30px;
|
||||
|
@ -222,45 +172,13 @@ body:not(.compact) .newtab-site[type=sponsored] .newtab-thumbnail {
|
|||
border-radius: 0 0 var(--cell-corner-radius) var(--cell-corner-radius);
|
||||
}
|
||||
|
||||
body.compact .newtab-title {
|
||||
background-color: hsla(0,0%,100%,.85);
|
||||
font-size: 12px;
|
||||
line-height: 21px;
|
||||
border: 1px solid hsla(0,0%,80%,.8);
|
||||
border-top-color: hsla(0,0%,0%,.1);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.newtab-title,
|
||||
.newtab-suggested {
|
||||
color: #5c5c5c;
|
||||
}
|
||||
|
||||
body.compact .newtab-title,
|
||||
body.compact .newtab-suggested {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.newtab-suggested[active] {
|
||||
background-color: rgba(51, 51, 51, 0.95);
|
||||
border: 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
body:not(.compact) .newtab-site:hover .newtab-title {
|
||||
.newtab-site:hover .newtab-title {
|
||||
color: white;
|
||||
background-color: #333;
|
||||
border-color: #333;
|
||||
border-top-color: white;
|
||||
}
|
||||
|
||||
body.compact .newtab-site:hover .newtab-title {
|
||||
color: white;
|
||||
background-color: hsla(0,0%,20%,.85);
|
||||
border-color: hsla(0,0%,0%,.8);
|
||||
border-top-color: white;
|
||||
}
|
||||
|
||||
.newtab-site[pinned] .newtab-title {
|
||||
padding-inline-start: 24px;
|
||||
}
|
||||
|
@ -302,20 +220,6 @@ body.compact .newtab-site:hover .newtab-title {
|
|||
right: 4px;
|
||||
}
|
||||
|
||||
body.compact .newtab-control {
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
body.compact .newtab-control-pin:dir(ltr),
|
||||
body.compact .newtab-control-block:dir(rtl) {
|
||||
left: -8px;
|
||||
}
|
||||
|
||||
body.compact .newtab-control-block:dir(ltr),
|
||||
body.compact .newtab-control-pin:dir(rtl) {
|
||||
right: -8px;
|
||||
}
|
||||
|
||||
.newtab-control-pin,
|
||||
.newtab-site[pinned] .newtab-control-pin:hover:active {
|
||||
background-image: -moz-image-rect(url(chrome://browser/skin/newtab/controls.svg), 0, 96, 32, 64);
|
||||
|
|
|
@ -1077,9 +1077,6 @@ pref("browser.newtab.preload", false);
|
|||
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
|
||||
pref("browser.newtabpage.enabled", true);
|
||||
|
||||
// XXX: Remove this when "enhanced" tiles are dead
|
||||
pref("browser.newtabpage.enhanced", false);
|
||||
|
||||
// Disables capturing of page thumbnails
|
||||
pref("browser.pagethumbnails.capturing_disabled", false);
|
||||
|
||||
|
|
|
@ -130,13 +130,9 @@ var gGrid = {
|
|||
|
||||
// Create sites.
|
||||
let numLinks = Math.min(links.length, cells.length);
|
||||
let hasHistoryTiles = false;
|
||||
for (let i = 0; i < numLinks; i++) {
|
||||
if (links[i]) {
|
||||
this.createSite(links[i], cells[i]);
|
||||
if (links[i].type == "history") {
|
||||
hasHistoryTiles = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
},
|
||||
aEvent.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -136,15 +136,6 @@ Site.prototype = {
|
|||
return str;
|
||||
},
|
||||
|
||||
_getSuggestedTileExplanation: function() {
|
||||
let targetedName = `<strong> ${this.link.targetedName} </strong>`;
|
||||
let targetedSite = `<strong> ${this.link.targetedSite} </strong>`;
|
||||
if (this.link.explanation) {
|
||||
return this._newTabString(this.link.explanation, [targetedName, targetedSite]);
|
||||
}
|
||||
return newTabString("suggested.button", [targetedName]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks for and modifies link at campaign end time
|
||||
*/
|
||||
|
@ -155,11 +146,8 @@ Site.prototype = {
|
|||
this.link.url = Services.io.newURI(this.url, null, null).resolve("/");
|
||||
// clear supplied images - this triggers thumbnail download for new url
|
||||
delete this.link.imageURI;
|
||||
delete this.link.enhancedImageURI;
|
||||
// remove endTime to avoid further time checks
|
||||
delete this.link.endTime;
|
||||
// clear enhanced-content image that may still exist in preloaded page
|
||||
this._querySelector(".enhanced-content").style.backgroundImage = "";
|
||||
gPinnedLinks.replace(oldUrl, this.link);
|
||||
}
|
||||
},
|
||||
|
@ -337,7 +325,7 @@ Site.prototype = {
|
|||
}
|
||||
else if (!pinned && target.classList.contains("newtab-control-pin")) {
|
||||
if (this.pin()) {
|
||||
// suggested link has changed - update rest of the pages
|
||||
// link has changed - update rest of the pages
|
||||
gAllPages.update(gPage);
|
||||
}
|
||||
action = "pin";
|
||||
|
|
|
@ -36,7 +36,6 @@ XPCOMUtils.defineLazyGetter(this, "gUnicodeConverter", function () {
|
|||
|
||||
// Boolean preferences that control newtab content
|
||||
const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
|
||||
const PREF_NEWTAB_ENHANCED = "browser.newtabpage.enhanced";
|
||||
|
||||
// The preference that tells the number of rows of the newtab grid.
|
||||
const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
|
||||
|
@ -199,11 +198,6 @@ var AllPages = {
|
|||
*/
|
||||
_enabled: null,
|
||||
|
||||
/**
|
||||
* Cached value that tells whether the New Tab Page feature is enhanced.
|
||||
*/
|
||||
_enhanced: null,
|
||||
|
||||
/**
|
||||
* Adds a page to the internal list of pages.
|
||||
* @param aPage The page to register.
|
||||
|
@ -241,29 +235,6 @@ var AllPages = {
|
|||
Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, !!aEnabled);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether the history tiles are enhanced.
|
||||
*/
|
||||
get enhanced() {
|
||||
#if defined(MC_BASILISK) || defined(HYPE_ICEWEASEL)
|
||||
// Hard-block the use of sponsored tiles.
|
||||
return false;
|
||||
#else
|
||||
if (this._enhanced === null)
|
||||
this._enhanced = Services.prefs.getBoolPref(PREF_NEWTAB_ENHANCED);
|
||||
|
||||
return this._enhanced;
|
||||
#endif
|
||||
},
|
||||
|
||||
/**
|
||||
* Enables or disables the enhancement of history tiles feature.
|
||||
*/
|
||||
set enhanced(aEnhanced) {
|
||||
if (this.enhanced != aEnhanced)
|
||||
Services.prefs.setBoolPref(PREF_NEWTAB_ENHANCED, !!aEnhanced);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the number of registered New Tab Pages (i.e. the number of open
|
||||
* about:newtab instances).
|
||||
|
@ -296,9 +267,6 @@ var AllPages = {
|
|||
case PREF_NEWTAB_ENABLED:
|
||||
this._enabled = null;
|
||||
break;
|
||||
case PREF_NEWTAB_ENHANCED:
|
||||
this._enhanced = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// and all notifications get forwarded to each page.
|
||||
|
@ -313,7 +281,6 @@ var AllPages = {
|
|||
*/
|
||||
_addObserver: function AllPages_addObserver() {
|
||||
Services.prefs.addObserver(PREF_NEWTAB_ENABLED, this, true);
|
||||
Services.prefs.addObserver(PREF_NEWTAB_ENHANCED, this, true);
|
||||
Services.obs.addObserver(this, "page-thumbnail:create", true);
|
||||
this._addObserver = function () {};
|
||||
},
|
||||
|
@ -480,8 +447,6 @@ var PinnedLinks = {
|
|||
return false;
|
||||
}
|
||||
aLink.type = "history";
|
||||
// always remove targetedSite
|
||||
delete aLink.targetedSite;
|
||||
return true;
|
||||
},
|
||||
|
||||
|
@ -1099,11 +1064,8 @@ var Links = {
|
|||
_getMergedProviderLinks: function Links__getMergedProviderLinks() {
|
||||
// Build a list containing a copy of each provider's sortedLinks list.
|
||||
let linkLists = [];
|
||||
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
for (let provider of this._providers.keys()) {
|
||||
if (!AllPages.enhanced && provider != PlacesProvider) {
|
||||
// Only show history tiles if we're not in 'enhanced' mode.
|
||||
continue;
|
||||
}
|
||||
let links = this._providers.get(provider);
|
||||
if (links && links.sortedLinks) {
|
||||
linkLists.push(links.sortedLinks.slice());
|
||||
|
@ -1305,8 +1267,6 @@ var Telemetry = {
|
|||
let probes = [
|
||||
{ histogram: "NEWTAB_PAGE_ENABLED",
|
||||
value: AllPages.enabled },
|
||||
{ histogram: "NEWTAB_PAGE_ENHANCED",
|
||||
value: AllPages.enhanced },
|
||||
{ histogram: "NEWTAB_PAGE_PINNED_SITES_COUNT",
|
||||
value: PinnedLinks.links.length },
|
||||
{ histogram: "NEWTAB_PAGE_BLOCKED_SITES_COUNT",
|
||||
|
|
Loading…
Reference in New Issue