View Single Post
Old 19.05.2020, 19:29
mgpai mgpai is offline
Script Master
Join Date: Sep 2013
Posts: 1,200

// Toggle packagizer extension
// Trigger: Toolbar button pressed
// Customize main toolbar > add new "Eventscripter Trigger" button > Rename it to "Toggle Packagizer Extension" (without quotes, case-sensitive) > Change Icon (Optional)

if (name == "Toggle Packagizer Extension") {
    var interfaceName = "org.jdownloader.controlling.packagizer.PackagizerSettings";
    var key = "PackagizerEnabled";

    var currentState = callAPI("config", "get", interfaceName, null, key);
    var message = currentState ? "Pacagizer was disabled" : "Packagzier was enabled";

    callAPI("config", "set", interfaceName, null, key, !currentState);
Reply With Quote