diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-06-22 12:55:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 12:55:34 +0200 |
commit | 4b65237d5d6e6f84a69571435e7b9fa5b36f444f (patch) | |
tree | 2e64ef05d542aca638ea2970d620c987d113e2d5 /application/palemoon/base/content/newtab/newTab.js | |
parent | e6f765a27070a6b922742e61d0a14dcc2c18baba (diff) | |
parent | 576124e629862cd75769074d572dbf4ee8149945 (diff) | |
download | UXP-4b65237d5d6e6f84a69571435e7b9fa5b36f444f.tar UXP-4b65237d5d6e6f84a69571435e7b9fa5b36f444f.tar.gz UXP-4b65237d5d6e6f84a69571435e7b9fa5b36f444f.tar.lz UXP-4b65237d5d6e6f84a69571435e7b9fa5b36f444f.tar.xz UXP-4b65237d5d6e6f84a69571435e7b9fa5b36f444f.zip |
Merge pull request #525 from MoonchildProductions/newtab-page-work
Newtab page work
Diffstat (limited to 'application/palemoon/base/content/newtab/newTab.js')
-rw-r--r-- | application/palemoon/base/content/newtab/newTab.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/application/palemoon/base/content/newtab/newTab.js b/application/palemoon/base/content/newtab/newTab.js index bea545ab5..0022f21bb 100644 --- a/application/palemoon/base/content/newtab/newTab.js +++ b/application/palemoon/base/content/newtab/newTab.js @@ -10,6 +10,7 @@ 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://gre/modules/NewTabUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Rect", @@ -31,13 +32,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 +63,7 @@ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; #include dropPreview.js #include updater.js #include undo.js +#include search.js // Everything is loaded. Initialize the New Tab Page. gPage.init(); |