B2G/gecko/browser/base/content/browser.js
/**
 *  Handle load of some pages (about:*) so that we can make modifications
 *  to the DOM for unprivileged pages.
 */
Handle load of some pages (about:*) so that we can make modifications
to the DOM for unprivileged pages.
Handle load of some pages ( about : * ) so that we can make modifications to the DOM for unprivileged pages .
function BrowserOnAboutPageLoad(document) {
  if (/^about:home$/i.test(document.documentURI)) {
    if (getBoolPref("browser.aboutHome.apps", false))
      document.getElementById("apps").removeAttribute("hidden");
    let ss = Components.classes["@mozilla.org/browser/sessionstore;1"].
             getService(Components.interfaces.nsISessionStore);
    if (ss.canRestoreLastSession)
      document.getElementById("launcher").setAttribute("session", "true");
    let docElt = document.documentElement;
    docElt.setAttribute("snippetsURL", AboutHomeUtils.snippetsURL);
    docElt.setAttribute("searchEngineName",
                        AboutHomeUtils.defaultSearchEngine.name);
    docElt.setAttribute("searchEngineURL",
                        AboutHomeUtils.defaultSearchEngine.searchURL);
  }
}
function BrowserOnAboutPageLoad ( document ) { if ( / ^about:home$ / i . test ( document . documentURI ) ) { if ( getBoolPref ( "browser.aboutHome.apps" , false ) ) document . getElementById ( "apps" ) . removeAttribute ( "hidden" ) ; let ss = Components . classes [ "@mozilla.org/browser/sessionstore;1" ] . getService ( Components . interfaces . nsISessionStore ) ; if ( ss . canRestoreLastSession ) document . getElementById ( "launcher" ) . setAttribute ( "session" , "true" ) ; let docElt = document . documentElement ; docElt . setAttribute ( "snippetsURL" , AboutHomeUtils . snippetsURL ) ; docElt . setAttribute ( "searchEngineName" , AboutHomeUtils . defaultSearchEngine . name ) ; docElt . setAttribute ( "searchEngineURL" , AboutHomeUtils . defaultSearchEngine . searchURL ) ; } }
Handle load of some pages (about:*) so that we can make modifications
  to the DOM for unprivileged pages.
Handle load of some pages ( about : * ) so that we can make modifications to the DOM for unprivileged pages .
// XXX bug 738646 - when Marketplace is launched, remove this statement and // the hidden attribute set on the apps button in aboutHome.xhtml // Inject search engine and snippets URL.