CCDarkMode

Change some styles in ChopCoin interface

  1. // ==UserScript==
  2. // @name CCDarkMode
  3. // @namespace HPrivakosScripts
  4. // @description Change some styles in ChopCoin interface
  5. // @author HPrivakos
  6. // @include http://chopcoin.io/*
  7. // @version 0.3
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. addCSS();
  12. ifDark();
  13.  
  14. setInterval(function(){ifDark();}, 100);
  15.  
  16. function addCSS(){
  17. var sheet = document.createElement('style')
  18. sheet.innerHTML = "#chopcoinlogonew {animation-name: animationcc;animation-duration: 3s;animation-delay: 1s;} #coindadiframe {animation: ads 2s infinite alternate} @keyframes animationcc {0% {transform: rotate(0deg);} 100% {transform: rotate(360deg);}} @keyframes ads {0% {transform: rotateY(0);} 100% {transform: rotateY(360);}}";
  19. document.body.appendChild(sheet);
  20. }
  21.  
  22. function ifDark(){
  23. try{
  24. var wrap = document.getElementById("wrapper");
  25. if(document.body.className == "dark" || document.body.className == "dark interface_hidden" || document.body.className == "dark loading" ){
  26. if(document.body.className == "dark" && wrap.className != "dark"){wrap.style.filter = "hue-rotate(100deg) invert(1)";}
  27. else if(document.body.className == "dark interface_hidden"){wrap.style.filter = "hue-rotate(100deg) invert(1)"; wrap.style.display = "none";}
  28. else if(document.body.className == "dark loading"){wrap.style.filter = "hue-rotate(100deg) invert(1)";}
  29. wrap.className = "dark";
  30. //document.getElementById("chatroom").style.filter = "hue-rotate(100deg) invert(1)";
  31. //document.getElementById("chatshowhide").style.filter = "hue-rotate(100deg) invert(1)";
  32. }
  33. else {
  34. wrap.style.filter = "";
  35. wrap.className = "light";
  36. }
  37. }catch(err){console.log(err);}
  38. }