I'm a bit hesitant to give out the website I'm writing a plugin for, but I can't seem to figure this out:
The plugin runs on a single page.
The website allows you to choose which theme you would like to use. Upon theme selection, the HTML of the page changes, but the URL remains the same.
Pseudo code:
if ( whiteTheme ) {
// do this
// I've solved this part
} else if ( blackTheme ) {
// do this
// solved this part as well
}
The white theme is the default theme, so my plugin works there. Since the URL doesn't change based on theme selection, I don't know the proper way to determine which theme is being used.
I've thought of sampling background color, but that seems very ineloquent.
What is the proper way to solve this?
Aucun commentaire:
Enregistrer un commentaire