Advertisement
SerlitePD

Primedice 4 Dark Theme

Mar 10th, 2017
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. //  PD4 Dark Theme
  3. //  Created by Serlite
  4. //
  5. //  - Creates a more night-friendly interface using dark, muted colours
  6. //  - To run, open your console (usually F12 > Console), paste it into the textbox, and press Enter
  7. */
  8.  
  9. var lightBackgroundColor = "#393939";
  10. var midBackgroundColor = "#2B2B2B";
  11. var backgroundColor = "#222";
  12.  
  13. var lightTextColor = "#CCC";
  14. var textColor = "#B9B9B9";
  15. var darkTextColor = "#888";
  16.  
  17. var linkColor = "#5fa0f1";
  18.  
  19. var confirmColor = "#3e4961";
  20. var confirmHoverColor = "#445579";
  21.  
  22. var disabledColor = "#CCC";
  23. var disabledHoverColor = "#EEE";
  24. var disabledTextColor = "#474c6c";
  25.  
  26. var brandColor = "#49505d";
  27. var dangerColor = "rgb(188, 82, 104)";
  28. var successColor = "#b3ce84";
  29.  
  30. loadjQuery();
  31. initializeTheme();
  32.  
  33. // Adds jQuery to document if needed
  34. function loadjQuery(){
  35.   if (!window.jQuery){
  36.     var script = document.createElement("SCRIPT");
  37.     script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js';
  38.     script.type = 'text/javascript';
  39.     document.getElementsByTagName("head")[0].appendChild(script);
  40.   }
  41. }
  42.  
  43. function initializeTheme(){
  44.   // Give time for jQuery to load
  45.   if (!window.jQuery){
  46.     setTimeout(initializeTheme, 500);
  47.   }
  48.   else{
  49.     jQuery("head").append(
  50.       '<style>'+
  51.  
  52.       // Control styles
  53.       ' .chat__nav__submenu__sub__item button.accept, .account .btn__logout, .api .btn__logout, .btn, .chat__footer__menu__buttons button, .faq .btn__logout, .hall .btn__logout, .chat__footer__meta input, .dice__control button, .index__home__indicator__button{'+
  54.       '   background:' + confirmColor +';'+
  55.       '   color:' + lightTextColor +';'+
  56.       ' }'+
  57.       ' .btn:hover, .dice__control button:hover, .chat__footer__menu__buttons button.on:hover, .chat__nav__submenu__sub__item button.accept:hover{'+
  58.       '   background:' + confirmHoverColor +';'+
  59.       ' }'+
  60.       ' .account .off.btn__logout, .api .off.btn__logout, .btn.off, .chat__footer__menu__buttons button.off, .faq .off.btn__logout, .hall .off.btn__logout, .dice__control__switch button.off, .chat__nav__submenu__sub__item button.decline{'+
  61.       '   background:' + disabledColor +';'+
  62.       '   color:' + disabledTextColor +';'+
  63.       ' }'+
  64.       ' .dice__control__switch button.off:hover, .chat__nav__submenu__sub__item button.decline:hover{'+
  65.       '   background:' + disabledHoverColor +';'+
  66.       ' }'+
  67.       ' .dice__control button{'+
  68.       '   border-right: 1px solid #475a75;'+
  69.       ' }'+
  70.       ' .checkbox__wrap p {'+
  71.       '   color:' + textColor +';'+
  72.       ' }'+
  73.       ' .input{'+
  74.       '   background:' + lightBackgroundColor +';'+
  75.       '   color:' + textColor +';'+
  76.       ' }'+
  77.       ' .input::placeholder{'+
  78.       '   color:' + textColor +';'+
  79.       ' }'+
  80.       ' button.user-mute{'+
  81.       '   background:' + confirmColor +' !important;'+
  82.       '   color:' + lightTextColor +';'+
  83.       ' }'+
  84.       ' button.user-mute-perm{'+
  85.       '   background:' + dangerColor +' !important;'+
  86.       '   color:' + lightTextColor +';'+
  87.       ' }'+
  88.  
  89.       // Chat styles
  90.       ' .chat__nav, .chat__channel, .chat__channel__message__tool-tip, .chat__nav__item__tool-tip, .chat__nav__submenu, .chat__footer, .chat__footer__menu{'+
  91.       '   background:' + backgroundColor +';'+
  92.       '   color:' + textColor +';'+
  93.       ' }'+
  94.       ' .chat__nav__submenu{'+
  95.       '   background:' + backgroundColor +';'+
  96.       '   color:' + darkTextColor +';'+
  97.       ' }'+
  98.       ' .chat__channel__message__meta, .chat__nav__submenu__header p, .chat__nav__submenu__sub__item button.decline, .chat__footer__menu__heading{'+
  99.       '   color:' + darkTextColor +';'+
  100.       ' }'+
  101.       ' .chat__channel__message__meta__msg, .chat__nav__submenu__sub__item p, .chat__nav__submenu__header__cancel, .chat__footer__meta__status {'+
  102.       '   color:' + textColor +';'+
  103.       ' }'+
  104.       ' .chat__channel__message strong{'+
  105.       '   color:' + linkColor +';'+
  106.       ' }'+
  107.       ' .chat__channel__message__meta__timestamp{'+
  108.       '   opacity:0.75;'+
  109.       ' }'+
  110.       ' .chat__nav__item:after{'+
  111.       '   border: none;'+
  112.       ' }'+
  113.  
  114.       // Main styles
  115.       ' .nav__main, .footer{'+
  116.       '   background:' + brandColor +';'+
  117.       '   background-image: none !important;'+
  118.       ' }'+
  119.       ' .index__home{'+
  120.       '   background:' + midBackgroundColor +';'+
  121.       '   background-image: none !important;'+
  122.       ' }'+
  123.       ' .index, .index__home__dice__tab__item.active, .index__home__dice__tab__item:hover, .index__home__dice__card__bet-ui, .index__game-stats, .account, .api, .faq, .hall{'+
  124.       '   background:' + backgroundColor +';'+
  125.       '   color:' + textColor +';'+
  126.       ' }'+
  127.       ' .index__home__dice__tab__item, .dice__control input, .index__home__dice__stats, .index__home__dice__wrap__option__rolls, .index__home__dice__wrap__option__rolls input{'+
  128.       '   background:' + lightBackgroundColor +';'+
  129.       '   color:' + textColor +' !important;'+
  130.       ' }'+
  131.       ' .dice__control__label, .account-label__soft{'+
  132.       '   color:' + darkTextColor +';'+
  133.       ' }'+
  134.       ' .nav{'+
  135.       '   color:' + lightTextColor +';'+
  136.       ' }'+
  137.       ' .index__home__dice__wrap__option__profit, .index__home__dice__stats .state, .index__home__dice__stats__item__info__drop-down__data span, .index__home__dice__stats__item__info__drop-down__data span:after{'+
  138.       '   color:' + textColor +';'+
  139.       ' }'+
  140.       ' .index__game-stats__table div li{'+
  141.       '   background:' + backgroundColor +' !important;'+
  142.       '   color:' + textColor +';'+
  143.       ' }'+
  144.       ' .index__home__dice__stats__item{'+
  145.       '   background:' + lightBackgroundColor +' !important;'+
  146.       '   border-radius:0;'+
  147.       ' }'+
  148.       ' .index__home__indicator.is-reversed .index__home__indicator__inner, .index__game-stats__list__unread{'+
  149.       '   background:' + dangerColor +';'+
  150.       ' }'+
  151.       ' .index__home__indicator.is-reversed{'+
  152.       '   background:' + successColor +';'+
  153.       ' }'+
  154.       ' .index__big-stats__carousel__item__amount, .index__big-stats__carousel__item__amount, .index__big-stats__carousel__item__amount {'+
  155.       '   color:' + successColor +';'+
  156.       ' }'+
  157.  
  158.       // Subpage styles
  159.       ' .account__affiliate__nav a.active{'+
  160.       '   background:' + backgroundColor +';'+
  161.       '   color:' + textColor +';'+
  162.       ' }'+
  163.       ' .account__nav{'+
  164.       '   background:' + midBackgroundColor +';'+
  165.       '   background-image: none !important;'+
  166.       ' }'+
  167.       ' .account__footer, .account__footer:after, .account__footer:before{'+
  168.       '   background:' + midBackgroundColor +';'+
  169.       ' }'+
  170.       ' .account__statistics__wrap, .hall__periods a.active, .hall__periods a:hover{'+
  171.       '   background:' + lightBackgroundColor +';'+
  172.       ' }'+
  173.       ' .account__affiliate__nav a{'+
  174.       '   color:' + textColor +';'+
  175.       ' }'+
  176.       ' .account__affiliate__nav a:hover{'+
  177.       '   color:' + textColor +';'+
  178.       ' }'+
  179.       ' .account__affiliate__dashboard > p{'+
  180.       '   color:' + darkTextColor +' !important;'+
  181.       '   opacity: 1 !important;'+
  182.       ' }'+
  183.       ' .account__list.is-even li:nth-child(2n), .is-even.hall__list li:nth-child(2n){'+
  184.       '   background:' + lightBackgroundColor +' !important;'+
  185.       '   color:' + textColor +';'+
  186.       ' }'+
  187.      
  188.       // Modal styles
  189.       ' .bet-info__modal__content__wrap, .account__statistics__stat, .account__achievements__wrap, .modal__content, .fair__modal__content__footer, .deposit__modal__content__footer{'+
  190.       '   background:' + backgroundColor +' !important;'+
  191.       '   color:' + textColor +';'+
  192.       ' }'+
  193.       ' .fair__modal__content__footer__look-up input{'+
  194.       '   background:' + lightBackgroundColor +';'+
  195.       '   color:' + textColor + ';'+
  196.       ' }'+
  197.       ' .bet-info__modal__content__target, .bet-info__modal__content__target__tooltip{'+
  198.       '   background:' + backgroundColor +';'+
  199.       ' }'+
  200.       ' .bet-info__modal__content__stats, .bet-info__modal__content p.bet-info__modal__content__footer__description, .hot-keys__modal__content__key p, .withdraw__modal__content__coins__label span, .withdraw__modal__content__coins__label span{'+
  201.       '   color:' + textColor +';'+
  202.       ' }'+
  203.       ' .bet-info__modal__content p, .hot-keys__modal__content__desc, .withdraw__modal__content p, .deposit__modal__content__extra, .fair__modal__content p, .fair__modal__content__footer strong, .password__modal__content p{'+
  204.       '   color:' + darkTextColor +';'+
  205.       ' }'+
  206.       ' .bet-info__modal__content__target__line{'+
  207.       '   background:' + dangerColor +';'+
  208.       ' }'+
  209.  
  210.       '</style>'
  211.     );
  212.   }
  213. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement