Advertisement
LuaTenshi

Fixes for Headphone Actor Chrome theme

Jan 18th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Headphone Actor Theme
  3. // @namespace    http://twisted.cat/
  4. // @version      0.1
  5. // @description  Fix and add stuff to the Headphone Actor Chrome theme.
  6. // @author       Ani ( https://github.com/LuaTenshi )
  7. // @require      http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
  8. // @include      http://www.google.*
  9. // @include      https://www.google.*
  10. // @grant        none
  11. // ==/UserScript==
  12.  
  13. const REGEXP = /^https?:\/\/www.google.[a-z.]+\/\_\/chrome\/newtab.*/;
  14. var isDefaultNewTab = REGEXP.test(top.location.href);
  15. if(isDefaultNewTab){
  16.     setTimeout(function(){ $("body").css("background-size", "cover"); },500)
  17. }else{
  18.     function main(){
  19.        $("body").css("background-color", "#fff");
  20.        $("body").css("background-image", "url(https://i.imgur.com/TNeJetL.jpg)");
  21.        $("body").css("background-attachment", "fixed");
  22.        $("body").append("<div class='what' style=\"position:fixed;top: 0px;width:100%;height: 100%;background-color: rgba(255, 255, 255, 0.92);z-index: -1;\">");
  23.     } window.addEventListener("load",function(e){main()});
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement