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… (read more)

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

Asked by j.sobiech 3 days ago

Last reply by jscher2000 - Support Volunteer 3 days ago

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… (read more)

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)

Asked by P J 2 days ago

Last reply by cor-el 2 days ago

Microsoft login Broken

Hey all, as of the past few days when I get the prompt to enter my password on Outlook.com (And microsoft.com) and hit 'sign in' the page just reloads and nothing happens… (read more)

Hey all, as of the past few days when I get the prompt to enter my password on Outlook.com (And microsoft.com) and hit 'sign in' the page just reloads and nothing happens. There is no failed login message, the page just reloads like I didn't hit sign in. I have disabled all of my extensions, cleared cookies and cache, ETP... with no luck.

Works fine on Chrome for android...

I'd really like to stay with Firefox so all help seriously appreciated

Asked by Person Guyerson 2 days ago

Last reply by zeroknight 2 days ago

Can't close a tab or a separate window without closing Firefox, and only then I need taskmgr

My Firefox can only be shut down by TaskManager, or by clicking on the three horizontal bars and then dropping to exit. So I can't close any single tab 'without closing … (read more)

My Firefox can only be shut down by TaskManager, or by clicking on the three horizontal bars and then dropping to exit.

So I can't close any single tab 'without closing them all', that's the real annoyance. I also can't close any individual windows I opened instead of a new tab, without closing all tabs and windows. Finally the classic windows ALT+F4 closure that's built into Windows doesn't close Firefox, and if it did I suspect ALT+F4 would close them all. Bottom line Firefox is seriously close-resistant.

What precipitated this was I allowed a previous Firefox update to download-install, and it tanked my performance, I figured your team would fix that issue, but in the meantime what I did was uninstall that version and reinstall the version I had been running before that update. Tilt! That action resulted in the close windows or tabs problem.

Summary: I am using the latest version now, but with it came this "can't close any individual tab without closing them all, and can only close even then except by Taskmanager or by clicking the 3 horizontal bars then dropping to Exit which also closes all Firefox tabs and Windows. This problem has surfaced before in this support, and none of the solutions worked, probably because I got to this place uniquely. I did read before submitting this.

Asked by Dean 3 days ago

Last reply by cor-el 3 days ago

recover passwords file

Hi, i locked my pc few days ago due to smart windows not recognizing my ( correct password ) repeatedly. anyway, im still trying to find a way to solve this issue. now, … (read more)

Hi, i locked my pc few days ago due to smart windows not recognizing my ( correct password ) repeatedly. anyway, im still trying to find a way to solve this issue.

now, i created an admin windows account get access to my old user files, found the bookmarks file. the only thing left for me now is the passwords file.i did not a Firefox online account before today

the only way currently if i did not solve the wind10 login issue is the find the passwords file physically just like i did with the bookmarks file.


can anyone help with this ??


thanks

Asked by OMVW 3 days ago

Last reply by cor-el 3 days ago

How do I disable automatic tab reopen in Thunderbird?

I normally open messages in tabs under exactly one circumstance: when I right-click on a message and explicitly open it in a tab. I've found that (until I changed the ha… (read more)

I normally open messages in tabs under exactly one circumstance: when I right-click on a message and explicitly open it in a tab.

I've found that (until I changed the handling of PDFs to "Save file") any PDFs that opened using Thunderbird's preview function would reopen if I closed and relaunched Thunderbird. This is not desired behavior.

I will also note that if I open Settings, it opens in a tab, rather than a separate window. This is neither expected nor desired (and my natural reaction is to click the close button on the window, closing Thunderbird, because "Settings" is something I expect to be in a window, not a tab. And that, too, reopens if I reopen Thunderbird.

And worst of all, those tabs that shouldn't be reopening at all are reopening in front of the main tab.

There was an extension called "Thunderbird-DontRestoreTabs," that would do exactly what I want, but that was made obsolete when the underlying extension technology was deprecated, so it is of no use in 115.9.0.

Asked by JHHL 1 week ago

Last reply by christ1 3 days ago

Thunderbird will not allow me past Add Screen on any Add-on

Process is below: 1. I can successfully navigate to add-ins and choose and add-in to download 2. I can successfully click Add to Thunderbird 3. The screen in the attac… (read more)

Process is below: 1. I can successfully navigate to add-ins and choose and add-in to download 2. I can successfully click Add to Thunderbird 3. The screen in the attachment below is shown 4. I cannot get past this screen. If i click Add nothing happens and Thunderbird eventually shuts down.

I am using Debian Linux in a virual env on chromebook currently on version 115.10.1 (64-bit) of thunderbird.

Need to be able to download TBSYNC and the appropriate add-ins to get caldav and Exchange active sync to work. PLEASE HELP :)

Asked by coxjustincox 2 days ago

Last reply by sfhowes 2 days ago

Group Policy Settings list with description

Hi, I would like to implement GPO settings for Firefox, and would like to review the list of the policies with description (explanation of what the policy is about and w… (read more)

Hi, I would like to implement GPO settings for Firefox, and would like to review the list of the policies with description (explanation of what the policy is about and what happens if its enabled or disabled) on a table or excel format. Is there a site or page that will give me that list?

Asked by aurel_dimaculangan 3 days ago

Last reply by cor-el 3 days ago

Microsoft Windows 11 user - font size for display resolution 3456 x 2160

I have to put my face within inches of the screen and strain to see the text in Firefox browser menus, tabs, and search bars. How do I adjust the font size? I'm not a p… (read more)

I have to put my face within inches of the screen and strain to see the text in Firefox browser menus, tabs, and search bars. How do I adjust the font size?

I'm not a programmer. If I need to enter code please be pedantic about descriptions of how to do that.

Asked by maxjen 3 days ago

Last reply by cor-el 3 days ago

Merge problem

I have two computers, one older with TB 115.9.0 32 bit, pop. The other has 115.9.0 64 bit, imap, same email address. I have tried to merge them, but when i do the Thund… (read more)

I have two computers, one older with TB 115.9.0 32 bit, pop. The other has 115.9.0 64 bit, imap, same email address. I have tried to merge them, but when i do the Thunderbird Import folder has zero messages and no subfolders. I also tried changing the old TB to IMAP, didnt work: "configuration problem". Any help would be appreciated.

Asked by bput71 2 weeks ago

Last reply by david 3 days ago

Repetitive update request

I keep getting this message that pops up in a private window to restart to keep using firefox. Everytime I click restart Firefox, it closes my tabs and opens them again. … (read more)

I keep getting this message that pops up in a private window to restart to keep using firefox. Everytime I click restart Firefox, it closes my tabs and opens them again. However, 5 minutes later the window pops up again. Even after repeated attempts of updating, even doing a full restart on the computer, Firefox continues to send this window to me. The private window in the bar says about:restartrequired.

I've tried uninstalling Firefox with a fresh install as well as doing a Refresh of Firefox. Neither seem to solve this problem.

Asked by rxs621 1 week ago

Last reply by NoahSUMO 3 days ago

Amazon not working

I was using Amazon just fine a few days ago. When I tried to open an amazon link yesterday, I got the message: Secure Connection Failed. I tried updating my browser and c… (read more)

I was using Amazon just fine a few days ago. When I tried to open an amazon link yesterday, I got the message: Secure Connection Failed. I tried updating my browser and clearing my cache and cookies. Please fix

Asked by cherryblossomshadow3 4 days ago

Last reply by jonzn4SUSE 3 days ago