Nettlesartillegg for Firefox
  • Utvidingar
  • Tema
    • for Firefox
    • Ordbøker og språkpakkar
    • Andre nettlesarplassar
    • Utvidingar for Android
Logg inn
Førehandsvising ConditionalRun

ConditionalRun av Ascoro

Execute conditionally javascript depending on some conditions

EksperimentellEksperimentell
0 (0 reviews)0 (0 reviews)
1 brukar1 brukar
Du treng Firefox for å bruke denne utvidinga
Last ned Firefox og få utvidinga
Last ned fil

Metadata for utvidingar

Skjermbilde
Top bar added by the conditionalRun add-on
Om denne utvidinga
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
Vurdert 0 av 0 meldarar
Logg inn for å vurdere denne utvidinga
Ingen vurderingar enno

Stjernevurdering lagra

5
0
4
0
3
0
2
0
1
0
Ingen vurderingar enno
Løyve og dataLes meir

Påkravde løyve:

  • Få tilgang til nettlesarfaner
  • Tilgang tiil dataa dine frå alle nettsider
Meir informasjon
Versjon
0.0.4resigned1
Storleik
9,17 KB
Sist oppdatert
eit år sidan (26. apr. 2024)
Liknande kategoriar
  • Web Development
  • Tabs
Lisens
All Rights Reserved
Versjonshistorikk
  • Vis alle versjonar
Legg til i samling
Rapporter dette tillegget
Fleire utvidingar av Ascoro
  • Ingen vurderingar enno

  • Ingen vurderingar enno

  • Ingen vurderingar enno

  • Ingen vurderingar enno

  • Ingen vurderingar enno

  • Ingen vurderingar enno

Gå til Mozilla-heimesida

Utvidingar

  • Om
  • Firefox tilleggsblogg
  • Utvidingsverkstad
  • Utviklarsenter
  • Utviklarpraksis
  • Fellesskaps-blogg
  • Forum
  • Rapporter ein feil
  • Vurderingsguide

Nettlesar

  • Desktop
  • Mobile
  • Enterprise

Produkt

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Personvern
  • Infokapslar
  • Juridisk

Om ikkje noko anna er spesifisert, er innhaldet på denne nettstaden lisensiert under Creative Commons Attribution Share-Alike License v3.0 eller ein seinare versjon.