Skip to content

Instantly share code, notes, and snippets.

@romuald
Last active September 1, 2015 08:11
Show Gist options
  • Save romuald/9038f90a3812e95b90ac to your computer and use it in GitHub Desktop.
Save romuald/9038f90a3812e95b90ac to your computer and use it in GitHub Desktop.
Stop Deezer player equalizer animation
// ==UserScript==
// @name Deezer equalizer stop
// @description Stop Deezer player equalizer from animating, saving CPU time in the process. Very useful to save battery
// @namespace http://chivil.com/
// @grant none
// @match https://*.deezer.com/
// @match http://*.deezer.com/
// @include http://*.deezer.com/
// @include https://*.deezer.com/
// @version 1
// ==/UserScript==
var cname = "g1FQxd34rcje";
var style = document.createElement('style');
style.style = 'text/css';
style.innerHTML = "." + cname + " *:after {" +
" animation: none !important;" +
" -webkit-animation: none !important" +
" -moz-animation: none !important" +
"}";
document.getElementsByTagName("head")[0].appendChild(style);
// setInterval because the element is sometimes re-added inside document
window.setInterval(function() {
if (window.jQuery) {
jQuery('.equalizer').addClass(cname);
}
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment