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

Asked by j.sobiech 1 வாரத்திற்கு முன்பு

Last reply by jscher2000 - Support Volunteer 1 வாரத்திற்கு முன்பு

Username data field

While this is a Privacy and Security setting issue - at least tangentially - my question isn't about security so much as how this data is being stored/retrieved. I navig… (மேலும் படிக்க)

While this is a Privacy and Security setting issue - at least tangentially - my question isn't about security so much as how this data is being stored/retrieved.

I navigated to an entirely new site the other day and it requested a username and password. When the cursor was in the Username field, a set of proposed entries showed up. These were all (recognizable) first names - not emails. When I checked the Privacy and Security settings, I couldn't find any of the names in stored data. While this may be just cached entries for similar fields ("username" or "name" etc...), the list I saw was heavily curated. One of the names I don't ever recall even entering in any name field (and wouldn't have been used for any login) - but even if I had, the list that I saw was far from exhaustive and would only have been a very specific subset of any data I would have entered into any "name" or "username" field.

Is there somewhere I can find how that list was generated?

Thank you,

Asked by nikolai42 1 வாரத்திற்கு முன்பு

Last reply by jscher2000 - Support Volunteer 1 வாரத்திற்கு முன்பு

AOL icon link in Firefox

How do I setup AOL as my default email when I click on the Email link icon? Currently, only Gmail shows a link and I am not sure how to get AOL as the default.

Asked by Fred B 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Firefox informs me that I need to update every few days

Does Firefox really need to update repeatedly, every few days? I used to accept these but then I started losing my tabs.

Asked by Pamela Luft 2 வாரங்களுக்கு முன்பு

Last reply by cor-el 2 வாரங்களுக்கு முன்பு

Browser makes strange "sw.js" requests to servers, no plugin to blame

I'm developing a website and noticed while testing that firefox sends requests to "/sw.js" on my local webserver. When starting with a fresh profile folder, this does not… (மேலும் படிக்க)

I'm developing a website and noticed while testing that firefox sends requests to "/sw.js" on my local webserver. When starting with a fresh profile folder, this does not happen (and also not with other browsers). So, I thought, this might be one of my extensions, but in Troubleshooting mode, the browser still sends these requests, everytime a site is refreshed. It does not affect performance or anything, I am just afraid that I was somehow hacked as I did not make many settings in firefox. Do you know, how I could further diagnose the problem?

Asked by Dro 2 வாரங்களுக்கு முன்பு

Last reply by TyDraniu 2 வாரங்களுக்கு முன்பு

Firefox color won't let me change white backgrounds?

As you can see here, despite me setting custom colors and checking every setting i could find, i can't seem to find what will turn this white color to grey or black, doe… (மேலும் படிக்க)

As you can see here, despite me setting custom colors and checking every setting i could find, i can't seem to find what will turn this white color to grey or black,

does anyone know how to fix this?

Asked by Heather Peterson 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Firefox suddenly goes slow, then speeds back up

So I'll be typing like normal (I type 100 WPM), and all of a sudden, I'll type a sentence, but each individual letter starts taking about 3 seconds to show up on the scre… (மேலும் படிக்க)

So I'll be typing like normal (I type 100 WPM), and all of a sudden, I'll type a sentence, but each individual letter starts taking about 3 seconds to show up on the screen. I have to sit and wait a super long time for everything I typed to finally show up. Other times, I move my mouse over something I should be able to click on, and have to wait a long time for the arrow to turn into a hand, letting me click on it. These periods of slowness will last a few minutes, then disappear.

What's really interesting is that when the slowness starts, I can type just fine up in the URL bar. I might type my entire message there, then copy paste it down to where ever I was wanting to post it. However, when I do that, if I have another tab open and that tab is playing music, the music will start to break up and lag as I type. Again, after a while, the slowness disappears and we're back to normal.

Can anyone tell me what's going on?

Asked by Trenton Knight 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Kiosk mode and Firefox popups, cannot suppress them?

I'm running a UI deployment with a web-app and Firefox on an Ubuntu system. I'm running Firefox with the flag "--kiosk" to place it into kiosk mode (booted from the comm… (மேலும் படிக்க)

I'm running a UI deployment with a web-app and Firefox on an Ubuntu system.

I'm running Firefox with the flag "--kiosk" to place it into kiosk mode (booted from the command line upon system boot). This works fine, and boots up Firefox to the page I want (my web-app) in kiosk mode (full-screen, etc.)

However, I get very annoying popups that are not acceptable for deployments in front of customers. I have tried, but CANNOT suppress all of them, or, when I thought I did, they came back a month later.

Popups:

1. "Keep pesky trackers off your tail. Open my links with Firefox" 2. "Welcome back" 3. Others like this...

These are Firefox browser popups, not related to popups that other websites can put up, and block the entire screen with an overlay until they are dismissed. My deployments are only going to a single web-page that I control (which has no popups) and there is no keyboard on the deployed system, so people cannot navigate elsewhere.

Things I've tried:

1. Firefox is installed via snap, which provides "snapshotting" configuration for the Firefox snap. I loaded Firefox, cleared the annoying dialogs, and then took a snapshot (theorying that I set Firefox configuration when doing this, and I capture that in the snapshot) and re-installed it onto a new system. Still go popups 2. Looked into user.js preferences. I can install this file onto the system, so I looked through https://searchfox.org/mozilla-release/source/remote/shared/RecommendedPreferences.sys.mjs and this is how I initially got all the popups to disable themselves. I looked through that list and tested most of the recommended settings until the popups disappeared. However, after a month or so, I'm beginning to see the popups again.


Any suggestions from Mozilla or others that run into this issue?

Asked by Devin 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Background Files running

After just turning on my computer running Windows 10, I opened Firefox. I open 1 web site and noticed my computer showed a (16) prefix when loading Firefox. I opened the… (மேலும் படிக்க)

After just turning on my computer running Windows 10, I opened Firefox. I open 1 web site and noticed my computer showed a (16) prefix when loading Firefox. I opened the Task Manager and it showed that there were 15 instances of "firefox" running in the background. All showed a UAC Virtulization of "Disabled". But they also showed using 638.8MB of memory. I do not know whether these are necessary files that must run in the background or if the number of files indicates that my system has been hacked and someone else is in my system from outside. Any suggestions as to validity of these files running or how I might confirm that they should be running. I have noticed the number of excessive background files before but the number is never consistent which makes me fear I may have been hacked.

Asked by svillecb 2 வாரங்களுக்கு முன்பு

Last reply by cor-el 2 வாரங்களுக்கு முன்பு

Unable to remove the popup survey that shows up on new tab open

Please help remove this crap survey each that shows up for each new tab, Not sure who does such things

Best, Hari

Asked by Hari Haran 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Disabling Hotkeys on Mac (Browser)

Hi there, I need to be able to use Command-I (for italics) or Command-B (for bold) when using Firefox to write emails and enter information on other websites WITHOUT Fir… (மேலும் படிக்க)

Hi there,

I need to be able to use Command-I (for italics) or Command-B (for bold) when using Firefox to write emails and enter information on other websites WITHOUT Firefox opening Page Information or Bookmarks.

This is basic browser functionality! People use browsers to write emails and other online documents, and the hotkey combo for things like Bold and Italics on Macs are Cmd-B and Cmd-I. All such websites I use recognize that as a standard, but Firefox insists on using those same commands for browser features I almost never use and certainly don't need hotkeys for.

All the information I'm finding online on how to fix this is deeply unhelpful and far more complicated than I can handle. Can you please tell me if there is a simple way to stop Firefox from pulling up Page Information and Bookmarks as a result of keyboard commands, or at least for me to change what those commands are so that they don't conflict with industry standard commands for text formatting on the vast majority of websites?

-Nic

Asked by Nicolas Carrier 2 வாரங்களுக்கு முன்பு

Last reply by cor-el 2 வாரங்களுக்கு முன்பு

firefox private mode language error

I use firefox on fedora 38 and after update firefox about a month ago . i got this error when use private mode ,for thai languge it just error but in normal mode it ok . … (மேலும் படிக்க)

I use firefox on fedora 38 and after update firefox about a month ago . i got this error when use private mode ,for thai languge it just error but in normal mode it ok .

Asked by SD SD 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Unintended scroll to top of page

browsing website (reddit or amazon for example), the window scrolls to the top every time I move the mouse. doesn't happen all the time though, and only in Firefox. I've … (மேலும் படிக்க)

browsing website (reddit or amazon for example), the window scrolls to the top every time I move the mouse. doesn't happen all the time though, and only in Firefox. I've serached the internet and can't find anything related. Please help

Asked by myblackfrog 2 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Firefox has done it again

The pinned shortcuts on my newtab page have all disappeared once again. I've gone to about:config > browser.newtabpage.pinned and my shortcuts are all listed. But o… (மேலும் படிக்க)

The pinned shortcuts on my newtab page have all disappeared once again. I've gone to about:config > browser.newtabpage.pinned and my shortcuts are all listed. But only blank boxes show up on the page. It will not accept a new entry when I try to enter one. It goes back to the blank white box. Why does this keep happening? Can anyone give me a Firefox for Dummies way to fix this?? Thanks!

Email removed for privacy

Asked by raydle1101 3 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு

Download file failed

Issue description: Similar as https://support.mozilla.org/en-US/questions/1294366 But I'm not using USB wireless receiver, I'm using wired network adapter for connection … (மேலும் படிக்க)

Issue description: Similar as https://support.mozilla.org/en-US/questions/1294366 But I'm not using USB wireless receiver, I'm using wired network adapter for connection

I've been using the Firefox browser, and recently when downloading files with Firefox, sometimes it prompts: .part could not be saved, because the source file could not be read. # see image #1 I'm trying to download file to disk D. But the fail tips is download .part file to disk C. Maybe firefox is using some file cache policy which I don't know. I also checked both two location, my account have read/write access.

I can try to resume the download, and the download progress will increase, but about half a second later it will fail again. If the file is small and my internet speed is fast enough, after several attempts the file will eventually download successfully. # see image #2 I have tried using "private window" or enter "about:profiles" to create/use a new and clean profile, but the issue still persists. # see image #3 I tried using other download tools like "Internet Download Manager", and the download was successful. It's ok for use chrome to download the same file to same disk location. The problem recently emerged, it didn't exist before. At least a month ago, the same computer didn't have this issue. I'm not using parental controls.

Enivronment: OS: Windows 10 professional 22H2 Firefox version: "124.0.2 (64 位)", auto update is enabled, it should be the newest version. security software: windows defender

Asked by 1142003595 3 வாரங்களுக்கு முன்பு

Last reply by zeroknight 2 வாரங்களுக்கு முன்பு