TorcAddons-watch-json-file

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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.2.11
// ==/UserScript==
(function () {
    let t = torcAddons;

    t.addEventListener('load', ()=>{
        let code = `{
  "install": {
    "include": [
      "^.torc-update"
    ]
  },
  "throttle": 10
}`;
        var gg = $('<div class="torc-update">Add json</div>').insertAfter($(".show-app-wrapper"))
        gg.on("click", function(){
            $(gg).remove();
        let FI = application.fileByPath("watch.json");
        if (FI === undefined) {
            application.newFile("watch.json").then(f => {
                application.writeToFile(f, code);
            });
        } else {
            application.writeToFile(FI, code);
        }
    });
    })
})();