Firefox 瀏覽器附加元件
  • 擴充套件
  • 佈景主題
    • 用於 Firefox
    • 字典與語言套件
    • 其他瀏覽器網站
    • Android 版的附加元件
登入
ConditionalRun 預覽

ConditionalRun 作者: Ascoro

Execute conditionally javascript depending on some conditions

實驗中實驗中
0 (0 reviews)0 (0 reviews)
1 User1 User
必須使用 Firefox 才能使用此擴充套件
下載 Firefox 並安裝擴充套件
下載檔案

擴充套件後設資料

畫面擷圖
Top bar added by the conditionalRun add-on
關於此擴充套件
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
由 1 位評論者給出 0 分
登入後即可幫此擴充套件評分
目前沒有評分

已儲存星等

5
0
4
0
3
0
2
0
1
0
還沒有評論
權限與資料了解更多

必要權限:

  • 存取瀏覽器分頁
  • 存取您所有網站中的資料
更多資訊
版本
0.0.4resigned1
大小
9.17 KB
最近更新
1 年前 (2024年4月26日)
相關分類
  • 網頁開發
  • 分頁
授權條款
保留所有權利
版本紀錄
  • 瀏覽所有版本
新增至收藏集
檢舉此附加元件
Ascoro 製作的更多擴充套件
  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

  • 目前沒有評分

前往 Mozilla 官網

附加元件

  • 關於
  • Firefox 附加元件部落格
  • 擴充套件工作坊
  • 開發者交流中心
  • 開發者政策
  • 社群部落格
  • 討論區
  • 回報 Bug
  • 評論撰寫指南

瀏覽器

  • Desktop
  • Mobile
  • Enterprise

產品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隱私權
  • Cookie
  • 法律資訊

除另有註明外,本站內容皆採用創用 CC 姓名標示—相同方式分享條款 3.0 或更新版本授權大眾使用。