Skip to content

Added callback #11

@ftlie

Description

@ftlie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions