Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Learn More

Start firefox with -chrome in command line

  • Keine Antworten
  • 1 hat dieses Problem
  • 13 Aufrufe
more options

Hello,

I use 'firefox -P *** -no-remote -chrome 'http://localhost:***' in ff 40, it works well. After I updated to ff52, message 'If you're trying to load a webpage, do not pass --chrome' returned. So I view the source code in nsBrowserContentHandler.js, I found the follow code:

         let isLocal = uri => {
         let localSchemes = new Set(["chrome", "file", "resource"]);
         if (uri instanceof Ci.nsINestedURI) {
           uri = uri.QueryInterface(Ci.nsINestedURI).innerMostURI;
         }
         return localSchemes.has(uri.scheme);
       };
       if (isLocal(resolvedURI)) {
         // If the URI is local, we are sure it won't wrongly inherit chrome privs
         let features = "chrome,dialog=no,all" + this.getFeatures(cmdLine);
         // Provide 1 null argument, as openWindow has a different behavior
         // when the arg count is 0.
         let argArray = Cc["@mozilla.org/array;1"]
                          .createInstance(Ci.nsIMutableArray);
         argArray.appendElement(null);
         Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, argArray);
         cmdLine.preventDefault = true;
       } else {
         dump("*** Preventing load of web URI as chrome\n");
         dump("    If you're trying to load a webpage, do not pass --chrome.\n");
       }

We can see for the new version of ff, only 'chrome', 'file', 'resource' can go with -chrome while 'http' and 'https' can't. What I need is to load the webpage with -chrome and profile to start the browser Browser without Header/Scroll/Toolbar/BookmarBar/MenuBar/TabBar etc. and Right click disabled, so is there any way to let 'http' and 'https' go with -chrome or any other solutions? Thanks a lot!

Hello, I use 'firefox -P *** -no-remote -chrome 'http://localhost:***' in ff 40, it works well. After I updated to ff52, message 'If you're trying to load a webpage, do not pass --chrome' returned. So I view the source code in nsBrowserContentHandler.js, I found the follow code: let isLocal = uri => { let localSchemes = new Set(["chrome", "file", "resource"]); if (uri instanceof Ci.nsINestedURI) { uri = uri.QueryInterface(Ci.nsINestedURI).innerMostURI; } return localSchemes.has(uri.scheme); }; if (isLocal(resolvedURI)) { // If the URI is local, we are sure it won't wrongly inherit chrome privs let features = "chrome,dialog=no,all" + this.getFeatures(cmdLine); // Provide 1 null argument, as openWindow has a different behavior // when the arg count is 0. let argArray = Cc["@mozilla.org/array;1"] .createInstance(Ci.nsIMutableArray); argArray.appendElement(null); Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, argArray); cmdLine.preventDefault = true; } else { dump("*** Preventing load of web URI as chrome\n"); dump(" If you're trying to load a webpage, do not pass --chrome.\n"); } We can see for the new version of ff, only 'chrome', 'file', 'resource' can go with -chrome while 'http' and 'https' can't. What I need is to load the webpage with -chrome and profile to start the browser Browser without Header/Scroll/Toolbar/BookmarBar/MenuBar/TabBar etc. and Right click disabled, so is there any way to let 'http' and 'https' go with -chrome or any other solutions? Thanks a lot!