Google Shut Up! Stop Annoying Cookies Request!

try to take over the world!

目前为 2020-09-05 提交的版本。查看 最新版本

// ==UserScript==
// @name         Google Shut Up! Stop Annoying Cookies Request!
// @namespace    http://tampermonkey.net/
// @version      0.1.6.1
// @description  try to take over the world!
// @author       You
// @include      /^https\:\/\/[a-z]*\.(google|youtube)\.[a-z]*/
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {

    document.cookie = "CONSENT=YES+EN.en+V13+BX; expires=Fri, 01 Jan 2038 00:00:00 GMT; domain="+document.URL.match(/^https\:\/\/[a-z]*\.((google|youtube)\.[a-z]*)/)[1]+"; path =/;";

    var style = document.createElement("style");
    style.innerHTML = "#lb, iron-overlay-backdrop.opened[style^='z-index: 2201;'], ytd-consent-bump-lightbox[id='consent-bump']{display: none !important}";

    /*if(document.URL.match(/https\:\/\/www\.youtube\.com/i) === null){
        style.innerHTML += "html{overflow-y: scroll !important}";
    }*/

    var headCheckInterval = window.setInterval( function (){
        if(document.head !== null){
            window.clearInterval(headCheckInterval);
            document.head.appendChild(style);
        }
    }, 20);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址