I want to write an addon firewall but it fails

#!/bin/bash # Verzeichnis erstellen mkdir FoxyAddOnFirewall cd FoxyAddOnFirewall || exit # package.json erstellen cat <<EOF > package.json { "title": "Foxy A… (xem thêm)

#!/bin/bash

# Verzeichnis erstellen
mkdir FoxyAddOnFirewall
cd FoxyAddOnFirewall || exit

# package.json erstellen
cat <<EOF > package.json
{
  "title": "Foxy AddOn Firewall",
  "name": "foxy-addon-firewall",
  "description": "A Firefox addon to control internet access for other addons",
  "author": "Your Name",
  "version": "1.0.0",
  "license": "MIT"
}
EOF

# background.js erstellen
cat <<EOF > background.js
var permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
                        .getService(Components.interfaces.nsIPermissionManager);

// Addon-Liste abrufen
function getAllAddons() {
    var {AddonManager} = Components.utils.import("resource://gre/modules/AddonManager.jsm", {});
    return new Promise(function(resolve, reject) {
        AddonManager.getAllAddons(function(addons) {
            resolve(addons);
        });
    });
}

// GUI aktualisieren
function updateUI() {
    getAllAddons().then(function(addons) {
        var addonList = document.getElementById("addon-list");
        addonList.innerHTML = ""; // Zurücksetzen der Liste

        addons.forEach(function(addon) {
            var listItem = document.createElement("li");
            listItem.textContent = addon.name;
            
            var blockButton = document.createElement("button");
            blockButton.textContent = "Block";
            blockButton.addEventListener("click", function() {
                blockInternetAccessForAddon(addon);
            });

            listItem.appendChild(blockButton);
            addonList.appendChild(listItem);
        });
    });
}

// Internetzugriff für ein bestimmtes Addon blockieren
function blockInternetAccessForAddon(addon) {
    var host = addon.getResourceURI("").host;
    permissionManager.remove(host, "allAccess");
    console.log("Internetzugriff für " + addon.name + " wurde blockiert.");
}

document.addEventListener("DOMContentLoaded", function() {
    updateUI(); // GUI beim Laden der Seite aktualisieren
});
EOF

# index.html erstellen
cat <<EOF > index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Foxy AddOn Firewall</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Foxy AddOn Firewall</h1>
  <p>Welcome to Foxy AddOn Firewall!</p>

  <h2>Installed Addons:</h2>
  <ul id="addon-list">
    <!-- Addon-Liste wird hier eingefügt -->
  </ul>

  <script src="background.js"></script>
</body>
</html>
EOF

# style.css erstellen
cat <<EOF > style.css
body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  text-align: center;
}

h1 {
  color: #007bff;
}

h2 {
  margin-top: 20px;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  margin-bottom: 10px;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}
EOF

# manifest.json erstellen
cat <<EOF > manifest.json
{
  "manifest_version": 2,
  "name": "Foxy AddOn Firewall",
  "version": "1.0",
  "description": "A Firefox addon to control internet access for other addons",
  "icons": {
    "48": "icon.png"
  },
  "permissions": [
    "management"
  ],
  "browser_action": {
    "default_popup": "index.html",
    "default_icon": "icon.png"
  }
}
EOF

# Icon herunterladen
wget -O icon.png "https://img.icons8.com/ios-filled/50/000000/firewall.png"

# Installationsanweisungen anzeigen
echo "FoxyAddOnFirewall wurde erfolgreich initialisiert!"
echo "Um das Addon in Firefox zu installieren:"
echo "1. Öffnen Sie Firefox und geben Sie 'about:debugging' in die Adressleiste ein."
echo "2. Klicken Sie auf 'Dieses Firefox installieren' unter 'Temporäre Add-ons laden'."
echo "3. Navigieren Sie zum Verzeichnis 'FoxyAddOnFirewall' und wählen Sie die 'manifest.json' Datei aus."
echo "4. Das Addon wird nun installiert und kann verwendet werden."

Được hỏi bởi j.sobiech 1 tuần trước

Lần cuối trả lời bởi jscher2000 - Support Volunteer 1 tuần trước

adblocker

I frequently attempt to open news articles or other pages requiring form fill-in but instead get a page that advises me to disable an adblocker. I have no idea what Firef… (xem thêm)

I frequently attempt to open news articles or other pages requiring form fill-in but instead get a page that advises me to disable an adblocker. I have no idea what Firefox (yes, up-to-date) uses or how I could set it to allow pop-ups for a particular site. Help!

Được hỏi bởi dennis_crowe 2 tuần trước

Lần cuối trả lời bởi zeroknight 2 tuần trước

Trying to update email address

Am trying to update my email address. When I try to make the secondary the primary, it wants a verification code entered. The field for this code will not let me paste it… (xem thêm)

Am trying to update my email address. When I try to make the secondary the primary, it wants a verification code entered. The field for this code will not let me paste it or enter it manually. Will this glitch be fixed soon?

Được hỏi bởi Carmen 1 tuần trước

How to Keep macOS Awake During Firefox Downloads?

Hello, Firefox currently does not prevent macOS from going to sleep when a download is active. How do I know this? 1) I downloaded a file from the internet. 1.5 GB in s… (xem thêm)

Hello,

Firefox currently does not prevent macOS from going to sleep when a download is active.

How do I know this? 1) I downloaded a file from the internet. 1.5 GB in size. 2) I opened a Terminal window in macOS, and ran `pmset -g`. 3) I searched for "sleep" in the "Currently in use:" list, and checked if Firefox was listed. It was not.

Is there a setting that I can enable that I can download to make this happen?

I think extensions don't have the capability to prevent macOS from going to sleep. Correct me if I'm wrong.

A quick fix for now would be the `caffeinate`-command in the Terminal-app, but I think this is very resource-wasteful.

Thank you in advance! Kind regards.

Được hỏi bởi Oushima 10 giờ trước

How do I get curvy tabs?

Hello, I want to get funky looking tabs like this: https://imgur.com/a/Xbc4Kih But I can't figure out how to do it. I've tried searching for a way to do this, but every… (xem thêm)

Hello, I want to get funky looking tabs like this:

https://imgur.com/a/Xbc4Kih

But I can't figure out how to do it. I've tried searching for a way to do this, but everything I find is very old and doesn't work. One thing I keep finding is this: https://github.com/wilfredwee/photon-australis

But that doesn't work for me, it just makes the tabs less tall. I've tried switching to nightly and that didn't do anything so I'm pretty lost. I don't know CSS or anything so I cant do it myself.

If anyone knows how to do this then please tell me!! thx!

Được hỏi bởi ScriptGoober 5 ngày trước

Lần cuối trả lời bởi cor-el 4 ngày trước

Click shortcut for opening link in private mode

Hello, I'm looking for a way to add a shortcut, similar to: CTRL + Click = open link in new tab SHIFT + Click = open link in new window What I want it to do is open a l… (xem thêm)

Hello, I'm looking for a way to add a shortcut, similar to:

CTRL + Click = open link in new tab SHIFT + Click = open link in new window

What I want it to do is open a link in a Private mode window, to avoid having to open the right-click menu.

I came across this person asking for something similar (they specifically want the private window to not appear on top, I do not care if it gets automatically focused or not) https://support.mozilla.org/bm/questions/1317416

The only answer links to a list of "command line options" and points to the private ones. I understand how you can use these to change how the Firefox shortcut behaves, or to open Firefox in a specific way from the "Run" command, but I do not know how, or if it is even possible to apply these settings to a specific shortcut-click combination.

Được hỏi bởi deramos603 5 ngày trước

moz-extension keeps loading at startup but no related extension appears in my extension list

Hi and thanks for your help. I was playing around with my DMARC settings for my new site and was looking around at who was hosting my WordPress domain for http://ibizign… (xem thêm)

Hi and thanks for your help. I was playing around with my DMARC settings for my new site and was looking around at who was hosting my WordPress domain for http://ibizignite.com, and Google directed me to GoDaddy. That was wrong. However, in my fooling around, somehow GoDaddy and this associate Westechnologies keeps popping up when I open up my browser after booting up my computer, and I cannot get rid of it. I don't know where to find it, because there is no associated extension anywhere in my extension list.

Here is the address that came up: moz-extension://dfdaa01e-fa7e-4241-8590-a19edb2ec40f/data/blocked/index.html?url=https://www.godaddy.com/forsale/www.westechnologies.com?utm_source=TDFS_BINNS&utm_medium=parkedpages&utm_campaign=x_corp_tdfs-binns_base&traffic_type=TDFS_BINNS&traffic_id=binns&

I tried to use another add-on to block it, and it does, but the darn site keeps appearing every startup after a fresh boot, and neither Westechnologies not GoDaddy appear anywhere in my Zone Map or anywhere else in my registry. Can anyone help me get rid of it please?

Được hỏi bởi iBizIgnite 1 tuần trước

Lần cuối trả lời bởi jscher2000 - Support Volunteer 1 tuần trước

Login page

I cannot open the login page on my hosts website. My host is https://ventraip.com.au/ based in Melbourne Australia. That means I cannot access the Cpanel so I cannot uplo… (xem thêm)

I cannot open the login page on my hosts website. My host is https://ventraip.com.au/ based in Melbourne Australia. That means I cannot access the Cpanel so I cannot upload data on my web site. Other people can open that login page on their computers buy I can't on mine. Where is the problem?

This is the message I get


'Secure Connection Failed

An error occurred during a connection to vip.ventraip.com.au. PR_CONNECT_RESET_ERROR

Error code: PR_CONNECT_RESET_ERROR

   The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
   Please contact the website owners to inform them of this problem.'

Được hỏi bởi Rug8Int 1 giờ trước

Update has scrambled bookmarks

The latest updated to Firefox for Mac (125.0.2) has completely scrambled accessing my bookmarks. Before the update I could type T in the search bar and up popped the URL … (xem thêm)

The latest updated to Firefox for Mac (125.0.2) has completely scrambled accessing my bookmarks. Before the update I could type T in the search bar and up popped the URL for The Globe and Mail; or N and the URL for the New York Times popped up. (This works because no other bookmark begins with these letters.) Both are in my Toolbar (no bookmarks have actually changed or disappeared with the update). Now when I type T, a completely different URL turns up, plus a drop-down menu of other URLs randomly selected from any of my bookmark lists IN WHICH A T APPEARS ANYWHERE in it; and when I type N, a website I've NEVER EVEN SEEN BEFORE (name.com) shows up, plus a drop-down menu with URLs from my bookmarks that contain an N anywhere in the URL. Why is this happening, and how to fix it? Please don't tell me I have to switch back to Safari.

Được hỏi bởi gtintner 1 tuần trước

Lần cuối trả lời bởi cor-el 6 ngày trước

firefox extension can't read and change data on this site

why can't I use the lingq importer extention? I get a message for all my extentions that says: firefox extension can't read and change data on this site. It's preventing … (xem thêm)

why can't I use the lingq importer extention? I get a message for all my extentions that says: firefox extension can't read and change data on this site. It's preventing me from using the LingQ importer extention.

Được hỏi bởi ElJay1951 1 tuần trước

Lần cuối trả lời bởi jscher2000 - Support Volunteer 1 tuần trước

FPS dropping smooth scroll

Hello, I need your help because i can't find solution to problem. On my apple macbooks air m1 i experience a very annoying thing: Often while i'm scrolling on websites… (xem thêm)

Hello,

I need your help because i can't find solution to problem. On my apple macbooks air m1 i experience a very annoying thing:

Often while i'm scrolling on websites smooth scroll animation get choppy/sluggish for few moments and lagging. It's like animation is FPS dropping during the scroll. I tried lot of things on both device:

- tried without extensions - created new profiles - use without syncing data - disabling hardware acceleration (gets worst) - disable smooth scroll in settings (get worst) - completely remove firefox with AppCleaner and reinstall it - Reinstall macOS and just install firefox alone. I tried latest Ventura and Sonoma

I don't have clue why this happening but ruin user experience very bad. With Safari everything is fine and smooth. On my wife's device (macbook air m3) have same issue.

Do you have any idea how can i fix it?

Được hỏi bởi Tiburtius 3 tuần trước

Default speaker settings do not work correctly in Firefox

Hello. Our organization is experiencing an issue where sound settings are not carrying over correctly to Firefox. Specifically, this is with speaker settings. In multiple… (xem thêm)

Hello. Our organization is experiencing an issue where sound settings are not carrying over correctly to Firefox. Specifically, this is with speaker settings. In multiple calling platforms (tested in Genesys Cloud and Teams), we are not able to adjust the settings for the speaker that audio plays from. We can adjust the default microphone setting, but not the speaker setting. This is only occurring in Firefox (works fine in Edge and Chrome).

Additionally, we've tried adjusting the default audio settings by going to Windows > Sound settings > App volume and device preferences, and changing the settings specifically for Firefox on this page. This does not work. When we check Teams or Genesys Cloud, it seems like Firefox is just picking any default without a rhyme or reason.

Any assistance would be greatly appreciated.

Được hỏi bởi gbishop61 1 tuần trước

Lần cuối trả lời bởi zeroknight 1 tuần trước

Need help restoring browser bookmarks from backup

This morning, I was unable to log into Discord to watch a livestream because my hard drive was overfull and it was unable to install a mandatory update. Because this was … (xem thêm)

This morning, I was unable to log into Discord to watch a livestream because my hard drive was overfull and it was unable to install a mandatory update. Because this was a time sensitive issue, I wiped a bunch of crap off my drive as fast as I could, and I guess somehow I deleted my browser bookmarks because the field now shows as empty when I open Firefox. I was able to track down the backup file, but it throws an error when I tell it to restore. Is there anything I can do about this?

Được hỏi bởi 3gold5u 3 tuần trước

Lần cuối trả lời bởi cor-el 3 tuần trước

I am stuck on "Widevine Content Decryption Module provided by Google Inc. will be installed shortly"

I'm trying to watch videos on Disney plus and Amazon prime. I can't get them to work. I tried various tutorials but many were irrelevant because they referred to google c… (xem thêm)

I'm trying to watch videos on Disney plus and Amazon prime. I can't get them to work. I tried various tutorials but many were irrelevant because they referred to google chrome which I don't even have. I tried checking and unchecking the enable DRM checkbox. Widevine never seems to update. I do not know how to install in manually.

Được hỏi bởi Terra Jones 6 ngày trước

Lần cuối trả lời bởi zeroknight 6 ngày trước

recaptcha problem

Until yesterday everything was fine. I was able to complete recaptcha. But when I tried searching something today, I couldn't do it because of the recaptcha. It was stuck… (xem thêm)

Until yesterday everything was fine. I was able to complete recaptcha. But when I tried searching something today, I couldn't do it because of the recaptcha. It was stuck on infinite loading. Every website I visited the problem was there. I tried fixing it from the tips I found in the forum here but nothing seems to work. I was frustrated. Then I tried Brave browser and it was working. Please help me fix this problem. Thank you.

Được hỏi bởi MOVIE BOSS 4 ngày trước

Lần cuối trả lời bởi cor-el 1 ngày trước

hyatt.com still does not work

Hyatt.com can be loaded on other browsers but not on Firefox. There is just a blank page with no error message. There is an archived thread on support.mozilla.or called "… (xem thêm)

Hyatt.com can be loaded on other browsers but not on Firefox. There is just a blank page with no error message. There is an archived thread on support.mozilla.or called "hyatt.com". The suggested solutions don't work or are too complicated. So please solve the problem. And STOP archiving threads that are still an unsolved problem! Am using Win8.1 and auto-updating Firefox.

Được hỏi bởi janeintoronto 1 giờ trước