Dodatki do przeglądarki Firefox
  • Rozszerzenia
  • Motywy
    • do Firefoksa
    • Słowniki i pakiety językowe
    • Inne strony
    • Dodatki na Androida
Zaloguj się
Podgląd „ConditionalRun”

ConditionalRun Autor: Ascoro

Execute conditionally javascript depending on some conditions

EksperymentalneEksperymentalne
0 (0 reviews)0 (0 reviews)
1 User1 User
Potrzebujesz Firefoksa, aby używać tego rozszerzenia
Pobierz Firefoksa i to rozszerzenie
Pobierz plik

Metadane rozszerzenia

Zrzuty ekranu
Top bar added by the conditionalRun add-on
O tym rozszerzeniu
I have developed this Add-on to be able to add or customize some behavior in some websites. I usually used it to create browser notifications if something happens on the page, hide some annoying elements on some specific websites, ...
This extension is very simplistic on propose. This allows it to be just a couple dozens lines of code that you can review for your peace of mind :)

To configure the Add-on go the the preference page of the Add-on "about:addons" .
Scripts settings is a json representing the configuration of the plugin. For example:

{
"scripts": [
{
"name": "Add top bar in firefox website",
"url": "://www.mozilla.org",
"conditions": "Math.random()<0.5",
"run": "var div = document.createElement('div'); div.style = 'background-color: red;color: white;text-align: center;position: sticky;z-index: 99999;'; div.innerText = 'Add-on enabled :)'; document.body.prepend(div);"
}
]
}


This example configuration will run add in the https://www.mozilla.org website a top red bar saying "Add-on enabled :)" 50% of the time the page is refreshed.

Parameters explained:
  • name: is just the displayname of the rule. It will be printed on the console when the rule is enabled
  • url: (Optional) if specified the website url must include this string to enable the action
  • conditions: (Optional) javascript condition that should evaluate true (action enabled)/false (action not enabled)
  • run: script that will be run if the url and conditions are met
Oceniony na 0 przez 0 recenzentów
Zaloguj się, aby ocenić to rozszerzenie
Nie ma jeszcze ocen

Zapisano ocenę w gwiazdkach

5
0
4
0
3
0
2
0
1
0
Nie ma jeszcze recenzji
Uprawnienia i daneWięcej informacji

Wymagane uprawnienia:

  • Mieć dostęp do kart przeglądarki
  • Mieć dostęp do danych użytkownika na wszystkich stronach
Więcej informacji
Wersja
0.0.4resigned1
Rozmiar
9,17 KB
Ostatnia aktualizacja
rok temu (26 kwi 2024)
Powiązane kategorie
  • Narzędzia twórców witryn
  • Karty
Licencja
Wszelkie prawa zastrzeżone
Historia wersji
  • Wszystkie wersje
Dodaj do kolekcji
Zgłoś ten dodatek
Więcej rozszerzeń od: Ascoro
  • Nie ma jeszcze ocen

  • Nie ma jeszcze ocen

  • Nie ma jeszcze ocen

  • Nie ma jeszcze ocen

  • Nie ma jeszcze ocen

  • Nie ma jeszcze ocen

Strona domowa Mozilli

Dodatki

  • O serwisie
  • Blog dodatków do Firefoksa
  • Warsztat rozszerzeń
  • Strefa autora
  • Zasady programistów
  • Blog społeczności
  • Forum
  • Zgłoś błąd
  • Wytyczne recenzji

Przeglądarki

  • Desktop
  • Mobile
  • Enterprise

Produkty

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Prywatność
  • Ciasteczka
  • Kwestie prawne

O ile nie wskazano inaczej, treść tej strony jest dostępna na warunkach licencji Creative Commons Attribution Share-Alike w wersji 3.0 lub nowszej.