#1
|
|||
|
|||
Create Toolbar Checkbox Button
Is there any documentation to create 'Toolbar Button' with checkbox similar to
'Clipboard Monitoring', 'Premium Downloads' & 'Silent Mode'? Want to use in EventScripter, return button IsCheck. Code:
var IsCheck = true or 1 | false or 0 //get IsCheck status switch(IsCheck) { case 0: alert('IsUserCheckbox = false or 0'); //if check is uncheck break; case 1: alert('IsUserCheckbox = true or 1'); //if checkbox is checked break; } |
#2
|
|||
|
|||
just found out from @mgpai that new checkbox button cannot be created as of right now.
@Mods could we have a sticket for this option? find it to be useful to implement into eventscripter as manual switch. e.g if checkboxN is checked do 'A work', else if uncheck then do 'B work' for right now the existing buttons status can be returned to do desired work. if interested. here are the buttons described. Code:
// Name : get checkbox status // Trigger : "Toolbar Button Pressed" Click 'Main Toolbar' above to create button or goto Settings > User Interface > Main Toolbar //-------------------------------------------------------- disablePermissionChecks(); //no prompting persmision dialog //enablePermissionChecks(); //required prompting permision //-------------------------------------------------------- //setDisableOnException(Boolean); // enable/disable script on error exceptions //setNotifyOnException(Boolean); // enable/disable notification on exceptions //--------------------------------------------------------- if (name == "aManualSwitch") { //var key = 'EnableChatExtension'; //checkbox enable/disable //var key = 'ClipboardMonitored'; //checkbox enable/disable //var key = 'UseAvailableAccounts'; //Premiunum Account checkbox enable/disable var key = 'ManualEnabled'; //Silent mode checkbox enable/disable switch (key) { case 'EnableChatExtension': var interfaceName = "org.jdownloader.settings.GraphicalUserInterfaceSettings"; break; case 'ClipboardMonitored': var interfaceName = "org.jdownloader.settings.GraphicalUserInterfaceSettings"; break; case 'UseAvailableAccounts': var interfaceName = "org.jdownloader.settings.GeneralSettings"; break; case 'ManualEnabled': var interfaceName = "org.jdownloader.settings.SilentModeSettings"; break; default: break; } var IsCheck = callAPI("config", "get", interfaceName, null, key); //alert(IsCheck); if (IsCheck) { alert(key + ': ' + IsCheck + ' - do A work'); } else { alert(key + ': ' + IsCheck + ' - do B work'); } } Last edited by zreenmkr; 29.03.2020 at 03:12. |
#3
|
||||
|
||||
Ticket:
-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|