summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/newtab/newTab.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-19 19:44:40 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-19 19:44:40 +0200
commit856d0c991c097eff35ed098a1e30992c0f57165a (patch)
tree03c513abc945a67450e463e099c96b12c2b81769 /application/palemoon/base/content/newtab/newTab.js
parent2546ae588f7131bf2879af4ed6094a96025f1a27 (diff)
downloadUXP-856d0c991c097eff35ed098a1e30992c0f57165a.tar
UXP-856d0c991c097eff35ed098a1e30992c0f57165a.tar.gz
UXP-856d0c991c097eff35ed098a1e30992c0f57165a.tar.lz
UXP-856d0c991c097eff35ed098a1e30992c0f57165a.tar.xz
UXP-856d0c991c097eff35ed098a1e30992c0f57165a.zip
Issue #517 Part 1: Import newtab page from Basilisk (sans directory service provider module)
Diffstat (limited to 'application/palemoon/base/content/newtab/newTab.js')
-rw-r--r--application/palemoon/base/content/newtab/newTab.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/application/palemoon/base/content/newtab/newTab.js b/application/palemoon/base/content/newtab/newTab.js
index bea545ab5..aede780b7 100644
--- a/application/palemoon/base/content/newtab/newTab.js
+++ b/application/palemoon/base/content/newtab/newTab.js
@@ -10,6 +10,8 @@ var Ci = Components.interfaces;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PageThumbs.jsm");
+Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm");
+// Cu.import("resource:///modules/DirectoryLinksProvider.jsm");
Cu.import("resource://gre/modules/NewTabUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Rect",
@@ -31,13 +33,24 @@ XPCOMUtils.defineLazyGetter(this, "gStringBundle", function() {
createBundle("chrome://browser/locale/newTab.properties");
});
-function newTabString(name) gStringBundle.GetStringFromName('newtab.' + name);
+function newTabString(name, args) {
+ let stringName = "newtab." + name;
+ if (!args) {
+ return gStringBundle.GetStringFromName(stringName);
+ }
+ return gStringBundle.formatStringFromName(stringName, args, args.length);
+}
function inPrivateBrowsingMode() {
- return PrivateBrowsingUtils.isWindowPrivate(window);
+ return PrivateBrowsingUtils.isContentWindowPrivate(window);
}
const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+const XUL_NAMESPACE = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+
+const TILES_EXPLAIN_LINK = "https://support.mozilla.org/kb/how-do-tiles-work-firefox";
+const TILES_INTRO_LINK = "https://www.mozilla.org/firefox/tiles/";
+const TILES_PRIVACY_LINK = "https://www.mozilla.org/privacy/";
#include transformations.js
#include page.js
@@ -51,6 +64,8 @@ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
#include dropPreview.js
#include updater.js
#include undo.js
+#include search.js
+#include customize.js
// Everything is loaded. Initialize the New Tab Page.
gPage.init();