Greasy Fork is available in English.

Panda Crazy Helper Emulation

Meant to be @included in other scripts to communicate with Panda Crazy.

Fra 2017-12-08 23:33:52 UTC. Se den seneste versjonen.

Dette scriptet burde ikke installeres direkte. Det er et bibliotek for andre script å inkludere med det nye metadirektivet // @require https://greasyfork.org/scripts/36173-panda-crazy-helper-emulation/code/Panda%20Crazy%20Helper%20Emulation.js?version=235816

var PandaCrazy = (function createPandaCrazy() {
    let _self = this;

    function addJob(gid, once) {
        let commandString = once ? "addOnceJob" : "addJob";

        localStorage.setItem("JR_message_pandacrazy", JSON.stringify({
            time: Date.now(),
            command: commandString,
            data: {
                groupId: gid
            }
        }));
    }

    function startJob(gid) {
        localStorage.setItem("JR_message_pandacrazy", JSON.stringify({
            time: Date.now(),
            command: "startcollect",
            data: {
                groupId: gid
            }
        }));
    }

    return {
        addJob,
        startJob
    };
})();