Cerca qui le cose strambe

Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

2018-05-26

how to load a static html page in firefox new tabs

From some months in order to load a static page in new tabs Firefox requires a bit of configuration more in detail: created a file local-settings.js in mozillainst\defaults\pref folder (C:\Program Files (x86)\Mozilla Firefox\defaults\pref on my laptop) with this content
// local-settings.js.cfg needs to start with a comment line
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);
then created another file mozilla.cfg in mozillainst folder (C:\Program Files (x86)\Mozilla Firefox on my laptop) with this content
// mozilla.cfg needs to start with a comment line

var {classes:Cc,interfaces:Ci,utils:Cu} = Components; /* set new tab page */ try {

 var newTabURL = "file:///C:/some/path/to/an/htmlfile.html";
 aboutNewTabService = Cc["@mozilla.org/browser/aboutnewtab-service;1"].getService(Ci.nsIAboutNewTabService);
 aboutNewTabService.newTabURL = newTabURL;

} catch(e){Cu.reportError(e);} // report errors in the Browser Console
and finally close and reopen firefox for this change to take effect