您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
provides a watch.json button, to spawn a watch.json file, and set it's contents automatically to that to be compatible with torcAddons-ManualUpdate
当前为
- // ==UserScript==
- // @name TorcAddons-watch-json-file
- // @namespace http://torcado.com
- // @description provides a watch.json button, to spawn a watch.json file, and set it's contents automatically to that to be compatible with torcAddons-ManualUpdate
- // @author torcado and J-Tech-Foundation
- // @license MIT
- // @icon http://torcado.com/torcAddons/icon.png
- // @run-at document-start
- // @grant none
- // @include http*://glitch.com/edit/*
- // @version 0.0.1.20200117000931
- // ==/UserScript==
- (function () {
- let t = torcAddons;
- t.addEventListener("load", () => {
- let JSON_ = $('<div class="torc-watch">update</div>').insertAfter($('.torc-update'));
- JSON_.on("click", function () {
- let FI = application.fileByPath("watch.json");
- if (!FI) {
- FI = application.newFile("watch.json");
- }
- application.writeToFile(FI, `{
- "install": {
- "include": [
- "^.torc-update"
- ]
- },
- "throttle": 10
- }`)
- })
- });
- /* ======== css ======== */
- t.addCSS(`
- .torc-json {
- line-height: 28px;
- border: 1px dashed #666666;
- border-radius: 7px;
- padding: 0 10px;
- margin-left: 16px;
- font-size: 12px;
- cursor: pointer;
- }
- .torc-json:hover {
- background-color: rgba(255,255,255,0.1);
- }
- .torc-json:active {
- background-color: rgba(255,255,255,0);
- }
- `);
- })