Showing questions tagged: Show all questions

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

  1. !/bin/bash
  1. Verzeichnis erstellen

mkdir FoxyAddOnFirewall cd FoxyAddOnFirewall || exit

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

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

  1. index.html erstellen

cat <<EOF > index.html <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">

Foxy AddOn Firewall

Welcome to Foxy AddOn Firewall!

Installed Addons:

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

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

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

  1. Icon herunterladen

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

  1. 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 26 minutes ago

How to return to previously viewed tab when I close a tab, without extensions.

Others asked and were pointed to extensions. As long as extensions get access to my pages, I'm not willing to use any. So, is there an option in advanced settings, to ret… (read more)

Others asked and were pointed to extensions. As long as extensions get access to my pages, I'm not willing to use any. So, is there an option in advanced settings, to return to previously viewed tab when I close a tab? Thanks, Cat

Asked by CatFox 1 hour ago

yubikey stops working after X hours

hello everyone; i have a strange issue with my yubikey and firefox on redhat linux 8. (i can't upgrade to red hat 9 and it's technically oracle linux) its works fine fo… (read more)

hello everyone; i have a strange issue with my yubikey and firefox on redhat linux 8. (i can't upgrade to red hat 9 and it's technically oracle linux)

its works fine for the first x hours (where x is usually between 1 and 3 hours) and then firefox will invariably stop recognizing the yubikey touch. yubikey works with any other application in that journalctl shows that systemd is aware of it's existence when i plug/unplug it and i get a string in my terminal and text editors whenever i touch they key both before and after it stops working with firefox.

i've tried these things but the behavior is still the same: - regenerating my ~/.mozilla configuration directory - toggling all *webauth* keys in about:config - switching from yum to flatpak firefox installation - switching from gnome to kde to xfce - switching from Wayland to X11

there are no error messages; journalctl doesn't show any either; and chrome doesn't seem to have this problem, but i don't trust chrome and, interestingly, chrome exhibits the same behavior when using xfce.

the only thing that works reliability is rebooting each time it happens and, as you can imagine, that's 100% intrusive and i lose all momentum in my productivity.

here's details on my system:

Firefox version: 115.10.0esr (64-bit)

OS: Red Hat Enterprise Linux release 8.9 (Ootpa) Oracle Linux Server release 8.9 5.15.0-205.149.5.1.el8uek.x86_64

X Windows info: gnome-session-wayland-session.x86_64 3.28.1-21.0.1.el8 @AppStream libwayland-client.x86_64 1.21.0-1.el8 @AppStream libwayland-cursor.x86_64 1.21.0-1.el8 @AppStream libwayland-egl.x86_64 1.21.0-1.el8 @AppStream libwayland-server.x86_64 1.21.0-1.el8 @AppStream qt5-qtwayland.x86_64 5.15.3-1.el8 @AppStream xorg-x11-server-Xwayland.x86_64 21.1.3-12.el8 @AppStream

I have support licensing from both Oracle and Yubikey and i've asked them for help and they both point the finger at each other so i'm stuck with this; any help would be appreciated!

Asked by davidalphagamma 22 hours ago