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… (читать ещё)

#!/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."

Задан j.sobiech 3 дня назад

Последний ответ от jscher2000 - Support Volunteer 3 дня назад

Problems Migrating Data

Moved to new country (UK) took TB data with me as instructed. Installed TB did put in email data. Uploaded TB data as per instructions. Opened TB and put in email passwor… (читать ещё)

Moved to new country (UK) took TB data with me as instructed. Installed TB did put in email data. Uploaded TB data as per instructions. Opened TB and put in email password etc. All my current emails show up no problems and email account appears to work but none of the uploaded data appears even though it took 15 min to upload. It feels like it was uploaded to the 'wrong' place but I uploaded the data it to the TB folder as instructed. Any idea what I did wrong??

Задан Andrew Waller 1 день назад

Последний ответ от Stans 1 день назад

Cox has tranferred my email accounts to Yahoo. I need to know how to connect back to Thunderbird.

Cox has tranferred my email accounts to Yahoo. I need to know how to connect back to Thunderbird. Had a discussion on your FB group with ANJE YELF.. She said to leav… (читать ещё)

Cox has tranferred my email accounts to Yahoo. I need to know how to connect back to Thunderbird. Had a discussion on your FB group with ANJE YELF.. She said to leave a message here and she would get back to me on how to do that. I have imap.

Linda Brody

Задан lindabrody 1 день назад

Последний ответ от Stans 1 день назад

Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window.

Unable to run firefox. I get the error message. (see attached screenshot) After terminating firefox processes, I attempted to create a new profile. and see an error mess… (читать ещё)

Unable to run firefox. I get the error message. (see attached screenshot) After terminating firefox processes, I attempted to create a new profile. and see an error message. (see attached screenshot)

Задан P J 2 дня назад

Последний ответ от cor-el 2 дня назад

mozilla monitor

I'm considering purchasing Mozilla monitor Plus. How many email addresses will I be able to have scanned if I sign up for that product? My wife & I currently have 3 e… (читать ещё)

I'm considering purchasing Mozilla monitor Plus. How many email addresses will I be able to have scanned if I sign up for that product? My wife & I currently have 3 email addresses we use.

Задан vpops 2 дня назад

Последний ответ от James 2 дня назад

Scrolling with up down arrow keys disables keyboard intermittently. HP laptop, Firefox 125.0.2 Win 11 pro

When browsing with Firefox, scrolling with the up/down arrow keys intermittently causes the keyboard to be disabled. Trackpad and touchscreen still function, but keyboar… (читать ещё)

When browsing with Firefox, scrolling with the up/down arrow keys intermittently causes the keyboard to be disabled. Trackpad and touchscreen still function, but keyboard becomes completely disabled, requiring a reboot.

This ONLY happens while browsing with Firefox browser. I cannot deliberately reproduce this, but it happens frequently - up to several times a day. It seems to be tied to multiple key hits on the down and/or up keys. This only happens in Firefox, not in any other apps, including Visual Studio.

This is a brand new HP laptop. HP support says that this is a Firefox support issue because it only happens on Firefox and no other programs or scenarios.

Can you please help me to identify, troubleshoot and resolve this issue? I am a software/database engineer but this is a little outside the scope of my knowledge. I should be able to conduct any tests or provide any needed feedback at a useful level with only a reasonable level of hand holding. I suspect that Firefox is somehow inhibiting or disrupting the keyboard driver.


Environment: FIREFOX 125.0.2 64 bit

Windows 11 Edition Windows 11 Pro Version 23H2 Installed on ‎2/‎13/‎2024 OS build 22631.3447 Experience Windows Feature Experience Pack 1000.22688.1000.0

Keyboard drivers: HID Keyboard Device

   ETD.sys            15.56.2.26           ELAN Microelectronics Corp. 
   kbdclass.sys    10.0.22621.1 (Winbuild.160101.0800)       Microsoft
   kbdhid.sys        10.0.22621.1 (Winbuild.160101.0800)       Microsoft

Standard PS/2 Keyboard

   ETD.sys            15.56.2.26           ELAN Microelectronics Corp. 
   i8042prt.sys    10.0.22621.1 (Winbuild.160101.0800)       Microsoft
   kbdclass.sys    10.0.22621.1 (Winbuild.160101.0800)       Microsoft


HP Envy laptop model 17t-cw000 Processor 13th Gen Intel(R) Core(TM) i7-13700H 2.40 GHz Installed RAM 32.0 GB (31.7 GB usable) Product ID 00355-61386-37102-AAOEM System type 64-bit operating system, x64-based processor Pen and touch Touch support with 10 touch points

Задан cliffb1 1 день назад

Последний ответ от zeroknight 1 день назад

I am a senior citizen, not very computer literate and just want some technical support from Mozilla

Most of the time I cannot print my emails because an "add blocker" is installed. So now, I no longer use Firefox, since when I use Microsoft, I have no such problem. … (читать ещё)

Most of the time I cannot print my emails because an "add blocker" is installed. So now, I no longer use Firefox, since when I use Microsoft, I have no such problem.

Задан samandmort2 2 дня назад

Последний ответ от cor-el 2 дня назад

where to find the cast-cast media to device icon in firefox browser

in the firefox browser is there any way to see the casting the browser screen to chromecast on tv. similar to 'cast to media device' in edge browser or chrome browser. … (читать ещё)

in the firefox browser is there any way to see the casting the browser screen to chromecast on tv. similar to 'cast to media device' in edge browser or chrome browser.

Задан k.Indrakanth K 2 дня назад

Последний ответ от zeroknight 2 дня назад

My bookmarks and history are gone.

I get the following message when going online with Firefox: "The bookmarks and history system will not be functional because one of Firefox's files is in use by another a… (читать ещё)

I get the following message when going online with Firefox: "The bookmarks and history system will not be functional because one of Firefox's files is in use by another application. Some security software can cause this problem." I've followed all the prompts to restart the computer, refresh the computer, delete the favicons.sqlite and places.sqlite and it won't allow me to delete them. This happened yesterday as well. Yesterday I could delete those files and everything was restored. But today I can't get it to work.

Задан Lana Patterson 3 дня назад

Последний ответ от zeroknight 2 дня назад

Bad/Rogue Current Session of Firefox (Windows 7) Redux

Sorry, posted recently and had then trouble finding out how to respond to help offered (jscher2000)! Noticed that the email version was "no-reply" so I didn't figure that… (читать ещё)

Sorry, posted recently and had then trouble finding out how to respond to help offered (jscher2000)! Noticed that the email version was "no-reply" so I didn't figure that would work! So, I tried to 'cut and paste' my reply (on a smartphone) and I ended up losing even the email reply text so here is a reconstruction. I tried the suggestions in order and the first one didn't have a "Restore previous session" option and the second one had "Recently closed windows" greyed out! And, when I entered "about.support" in the address bar (top rightish), I received a notice that I couldn't reach Google (Remember that I don't currently have internet access on my laptop). So, no joy there either! Can I not just change some current setting to prevent Firefox v 115.9lesr from saving the current 'Windows' and Tabs so that, when I again open Firefox, the previous session 'Windows' and Tabs would be used?!?

Задан balls69bc 3 дня назад

Последний ответ от jscher2000 - Support Volunteer 1 день назад

Billón- refund

Please refund m money for the yearly subscription amount which I never agreed to purchase . I sent 3-3 messages asking for a refund. When I pushed the submit button it … (читать ещё)

Please refund m money for the yearly subscription amount which I never agreed to purchase . I sent 3-3 messages asking for a refund. When I pushed the submit button it won’t allowed me

Задан Maritza Stenehjem 2 дня назад

Последний ответ от jscher2000 - Support Volunteer 2 дня назад

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 … (читать ещё)

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.

Задан ElJay1951 2 дня назад

Последний ответ от jscher2000 - Support Volunteer 2 дня назад

Browser no longer asking for primary password

This started a few weeks ago. I thought it might have been because I synced the passwords with other devices. I reverted it back. When in about:logins, I click on the l… (читать ещё)

This started a few weeks ago. I thought it might have been because I synced the passwords with other devices. I reverted it back.

When in about:logins, I click on the log in button but nothing happens.

Задан l s p 2 дня назад

Последний ответ от cor-el 2 дня назад

account setup

Since installing Ubuntu 23.10 on my new desktop pc, Thunderbird is failing to see the account details in .thunderbird I copied all the files from my backup into a new acc… (читать ещё)

Since installing Ubuntu 23.10 on my new desktop pc, Thunderbird is failing to see the account details in .thunderbird I copied all the files from my backup into a new account directory (/home/cfi/.thunderbird/y4xyxmli.default), a technique that has worked many times in the past, but not this time. Previously, thunderbird has simply taken the settings from the backed up files and used those to connect to my organisation's mail server. Any ideas? How can I force Thunderbird to read the old account settings?

Many thanks.

Задан cfi2 2 дня назад

Последний ответ от christ1 2 дня назад

New Mail Composition Window Background Color

I am attempting to transition to Thunderbird. I have become quickly familiar with the HTML/CSS underlying the UI, and with the older userChrome.css structure for personal… (читать ещё)

I am attempting to transition to Thunderbird. I have become quickly familiar with the HTML/CSS underlying the UI, and with the older userChrome.css structure for personal customization.

However, I can not figure out how to change the default background color of the message composition window -- which exists in a separate window from the main message viewer window -- from #2a2a2e to basic white.

Cracking open a copy of omni.ja in the app package, the only ID that I can find that seem to possibly be relevant is #messageArea, found in the following .css files:

chrome/classic/skin/classic/messenger/messageQuotes.css chrome/classic/skin/classic/messenger/shared/editorContent.css chrome/classic/skin/classic/messenger/shared/messengercompose.css

I have tried to override the default #2a2a2e color of the message composition area in my userChrome.css file, but to no success. (By contrast, it was easy to change the background color of the message viewing area with #messagePane)

I have tried the obvious step of changing the background color to white in the color settings option. Even after multiple app restarts, this setting does not affect the dark grey default background of the composition window.

Is there a name to this window div and a class or ID that i could access and customize through my userChrome.css file?

Thanks!

Задан stevenstromer 2 дня назад

Последний ответ от david 2 дня назад

over 30 obsolete tabs open when I repopen Firefox

I received a scam Apple (security) popup (on which I never clicked) and from that point on, some 30+ obsolete tabs congregate across the top Firefox browser window. How… (читать ещё)

I received a scam Apple (security) popup (on which I never clicked) and from that point on, some 30+ obsolete tabs congregate across the top Firefox browser window. How do i lose all these unwanted tabs?

Задан Ed Weingold 2 дня назад

Последний ответ от cor-el 2 дня назад

'Bad' Current Session of Firefox (Windows)!

I currently have a 'bad/rouge' session of Windows 7 Firefox (don't really know how that happened) open (7 'Windows', each with one empty Tab plus 1 'Window', with only 1 … (читать ещё)

I currently have a 'bad/rouge' session of Windows 7 Firefox (don't really know how that happened) open (7 'Windows', each with one empty Tab plus 1 'Window', with only 1 populated tab (Yahoo Mail)! I need to close Firefox in order to restart my laptop (strange things have been happening, including not being able to access the internet)!! On restarting, I want to be able to open Firefox with the previous session I had with my 8 'Windows', each with dozens and dozens of Tabs! Please help, I sorely need those many 'Windows' and Tabs!!!

Задан balls69bc 3 дня назад

Последний ответ от cor-el 2 дня назад

Lags whenever I tried to use Web Developer Tools

Firefox slows down when I use web developer tools, I use this whenever I try to save an image on Instagram or other sites that I go to just to save an image or look for t… (читать ещё)

Firefox slows down when I use web developer tools, I use this whenever I try to save an image on Instagram or other sites that I go to just to save an image or look for the video using the web tools.

Is there a way to fix this issue it lags the browser or it freezes for a second.

Задан mark_vincent_16 2 дня назад

Последний ответ от cor-el 2 дня назад