Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

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“.

Weitere Informationen

.config file

  • 4 Antworten
  • 1 hat dieses Problem
  • 1 Aufruf
  • Letzte Antwort von Mike Kaply

more options

Hello,

I am currently having an issue with Firefox 78.8 not reading .conf file.

i detected that the options bellow are not working now. We had it working with 52.9

Someting changed in the code? What am i missing?


//HM-Popup Exceptions Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://site.example.net", null, null); Services.perms.add(uri, "popup", 1);


//userchrome and usercontent // const Cc = Components.classes; const Ci = Components.interfaces; Components.utils.import("resource://gre/modules/Services.jsm"); var profileDir = Services.dirsvc.get("ProfD", Ci.nsILocalFile); profileDir.append("chrome"); if( !profileDir.exists() || !profileDir.isDirectory() ) {

 profileDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);

} profileDir.append("userChrome.css"); var fos = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); fos.init(profileDir, -1, -1, false); var css = "#nav-bar { display: none !important; } #toolbar-context-menu {display:none !important;} #TabsToolbar {display:none !important;}"; fos.write(css, css.length); fos.close();

Hello, I am currently having an issue with Firefox 78.8 not reading .conf file. i detected that the options bellow are not working now. We had it working with 52.9 Someting changed in the code? What am i missing? //HM-Popup Exceptions Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://site.example.net", null, null); Services.perms.add(uri, "popup", 1); //userchrome and usercontent // const Cc = Components.classes; const Ci = Components.interfaces; Components.utils.import("resource://gre/modules/Services.jsm"); var profileDir = Services.dirsvc.get("ProfD", Ci.nsILocalFile); profileDir.append("chrome"); if( !profileDir.exists() || !profileDir.isDirectory() ) { profileDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); } profileDir.append("userChrome.css"); var fos = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); fos.init(profileDir, -1, -1, false); var css = "#nav-bar { display: none !important; } #toolbar-context-menu {display:none !important;} #TabsToolbar {display:none !important;}"; fos.write(css, css.length); fos.close();

Geändert am von t.santos-ext

Alle Antworten (4)

more options

.....

Geändert am von t.santos-ext

more options

Check the Javascript console and see if there are any errors.

Changes in Firefox might have caused the script not to work anymore.

more options

If i insert the options above it will prompt:

Failed to read the configuration file. Please contact your system administrator.

For the popup exception i discovered that

This issue is that Services.perms.add no longer works.


Services.perms.addFromPrincipal(
      Services.scriptSecurityManager.createContentPrincipalFromOrigin("http://sriglx"),
      "popup", 1
    );

There's no need do a newURL anymore.

Am i correct?

Regarding the NAV BAR, Toolbar context menu, Tabs bar how can i hide it in the config file?

Can you help me please?

Thank you.

more options

I would recommend you use policies.json for blocking popups and not the autoconfig file.

https://github.com/mozilla/policy-templates/blob/master/README.md

Once you get that problem fixed, your other code for hiding the navbar and other things should still work.