Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
ConditionalRun 预览

ConditionalRun 作者: Ascoro

Execute conditionally javascript depending on some conditions

实验性实验性
0 (0 reviews)0 (0 reviews)
1 个用户1 个用户
您需要 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
评分 0(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
0
4
0
3
0
2
0
1
0
尚无评价
权限与数据详细了解

必要权限:

  • 获取浏览器标签页
  • 访问您在所有网站的数据
更多信息
版本
0.0.4resigned1
大小
9.17 KB
上次更新
1 年前 (2024年4月26日)
相关分类
  • 网页开发
  • 标签页
许可证
保留所有权利
版本历史
  • 查看所有版本
添加到收藏集
举报此附加组件
Ascoro 制作的更多扩展
  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

浏览器

  • Desktop
  • Mobile
  • Enterprise

产品

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

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。