Closed shellshocked59 closed 9 years ago
Ha, this is awesomely spastic :+1: :dancer:
I guess the only downside of doing the changes via JS is that when disco mode is disabled and a custom color has been selected by a user, there will probably be a short flash of the default blue before their color loads via the JS.
I'll probably just merge this in as-is, since I love disco, but perhaps you have an alternative implementation suggestion @shellshocked59?
Hey Alec, I got rid of the black flash by setting the default color to load with a drupal_add_css. The reason I originally didn't do this was because then the added
I added the ability for Disco mode to constantly change colors referenced in #96 . I did this by loading in all color stylesheets once and then turning all off but the active random one. I also make sure that the same color isn't chosen twice in a row. You can see this in action at http://dev-kalamuna-playbox.pantheon.io for some awesome Disco. I've only QA'd in Windows Chrome and Android Chrome (this being free work).
This pull request is a branch off of my other pull request from my battle_author branch, as it requires some features from it unless I refactor it. This pull request shouldn't be integrated before the request https://github.com/kalamuna/playbox/pull/110 gets finalized.
Compared with the battle_author branch the changes I made are at sites/all/themes/playbox_theme/js/custom.js and playbox_admin_init() inside sites/all/modules/playbox_admin/playbox_admin.module