Firefox-selaimen lisäosat
  • Laajennukset
  • Teemat
    • Firefoxille
    • Oikolukusanastot ja kielipaketit
    • Muiden selainten sivustot
    • Lisäosia Androidille
Kirjaudu sisään
ConditionalRun esikatselu

ConditionalRun tekijä Ascoro

Execute conditionally javascript depending on some conditions

KokeellinenKokeellinen
0 (0 reviews)0 (0 reviews)
1 käyttäjä1 käyttäjä
Tarvitset Firefoxin käyttääksesi tätä laajennusta
Lataa Firefox ja hanki laajennus
Lataa tiedosto

Laajennuksen metatiedot

Kuvakaappaukset
Top bar added by the conditionalRun add-on
Tietoja tästä laajennuksesta
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
Rated 0 by 0 reviewers
Kirjaudu sisään arvostellaksesi tämän laajennuksen
Ei vielä arvioita

Tähtiarvio tallennettu

5
0
4
0
3
0
2
0
1
0
Ei arvioita
Permissions and dataLue lisää

Vaaditut käyttöoikeudet:

  • Pääsyoikeus selaimen välilehtiin
  • Pääsy tietoihisi kaikilla verkkosivuilla
Lisätietoja
Versio
0.0.4resigned1
Koko
9,17 kt
Viimeksi päivitetty
vuosi sitten (26. huhti 2024)
Liittyvät luokat
  • Websivujen kehitys
  • Välilehdet
Lisenssi
Kaikki oikeudet pidätetään
Versiohistoria
  • Näytä kaikki versiot
Lisää kokoelmaan
Ilmoita tästä lisäosasta
Lisää laajennuksia tekijältä Ascoro
  • Ei vielä arvioita

  • Ei vielä arvioita

  • Ei vielä arvioita

  • Ei vielä arvioita

  • Ei vielä arvioita

  • Ei vielä arvioita

Siirry Mozillan verkkosivustolle

Lisäosat

  • Tietoja
  • Firefox-lisäosien blogi
  • Laajennustyöpaja
  • Kehityskeskus
  • Kehittäjäkäytännöt
  • Yhteisön blogi
  • Keskustelualue
  • Ilmoita ongelmasta
  • Opas arviointiin

Selaimet

  • Desktop
  • Mobile
  • Enterprise

Tuotteet

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Tietosuoja
  • Evästeet
  • Juridiset asiat

Jos ei erikseen mainita, tämän sivuston sisällön kattaa lisenssi Creative Commons Attribution Share-Alike License v3.0 tai mikä tahansa uudempi versio.