summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/newtab/grid.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-29 17:41:18 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-29 17:41:18 +0200
commit51792b31a36b9539fdd1b4b85abe486c1652b6c4 (patch)
treee390cc9ab03d5fb0035eae376ce865297280d148 /application/basilisk/base/content/newtab/grid.js
parent65b4a8ac5e784fbc0ba9a45784c910890730da4f (diff)
downloadUXP-51792b31a36b9539fdd1b4b85abe486c1652b6c4.tar
UXP-51792b31a36b9539fdd1b4b85abe486c1652b6c4.tar.gz
UXP-51792b31a36b9539fdd1b4b85abe486c1652b6c4.tar.lz
UXP-51792b31a36b9539fdd1b4b85abe486c1652b6c4.tar.xz
UXP-51792b31a36b9539fdd1b4b85abe486c1652b6c4.zip
Revert "Remove unwanted newtab page code"
This reverts commit 277fa0afdc50b707b3227ca327c29766cdcd20f1.
Diffstat (limited to 'application/basilisk/base/content/newtab/grid.js')
-rw-r--r--application/basilisk/base/content/newtab/grid.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/application/basilisk/base/content/newtab/grid.js b/application/basilisk/base/content/newtab/grid.js
index 415a25933..b6f98fa17 100644
--- a/application/basilisk/base/content/newtab/grid.js
+++ b/application/basilisk/base/content/newtab/grid.js
@@ -9,6 +9,7 @@
*/
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.
@@ -181,15 +182,18 @@ 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"/>';
+ ' class="newtab-control newtab-control-block"/>' +
+ '<span class="newtab-suggested"/>';
this._siteFragment = document.createDocumentFragment();
this._siteFragment.appendChild(site);
@@ -270,6 +274,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) + "px";
+ this._node.style.maxHeight = this._computeHeight(gridRows) - SPONSORED_TAG_BUFFER + "px";
}
};