-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Thanks a lot for a brilliant Super Theme Switcher ,
(Sorry, new to this, so if I forked or did anything wrong, please help enlighten me)
I have taken me the freedom to modify it a little, adding another callback called onchoose , as onselect is called both if called onload, or onclick
onchoose is called only onCiick , ie when the user have actively selected a different theme.
I needed this to do some other refresh of frames and stuff, not needed when called onload.
If you like it, please add to next release, if not, the please toss away
main Change
function updateTheme(data, clicked){
if( settings.onselect !== null )
settings.onselect();
//Added this:
if( settings.onchoose !== null && clicked )
settings.onchoose();
see
https://github.com/ftlie/Super-Theme-Switcher (forkeds