您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Script for Hide Notch in android devices
当前为
// ==UserScript== // @name HideNotch // @namespace http://tampermonkey.net/ // @version 0.1.1 // @description Script for Hide Notch in android devices // @author You // @match *://*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // @grant none // @run-at document-start // ==/UserScript== (function() { let e,i,videos,url,meta,style,css; videos = document.getElementsByTagName('video'); url = window.location.href; meta = document.createElement('meta'); meta.name = 'viewport'; meta.content = 'width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no'; style = document.createElement('style'); style.type = 'text/css'; css = '.fillVideoCSS{ NavigationUI: hide!important; top: 0!important; left: 0!important; height: 100vh!important; width: 100vw!important; object-fit: fill!important; orientation: landscape!important; }'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } document.getElementsByTagName('head')[0].appendChild(meta); document.getElementsByTagName('head')[0].appendChild(style); function fillVideos(){ var timeOuts = [100,1000,2000,3000]; timeOuts.forEach(function(timeOut){ setTimeout(function(){ if(window.innerHeight == screen.height) { for(i=0;i<videos.length;i++){ if(videos[i]!=null){videos[i].classList.add('fillVideoCSS');} } screen.orientation.lock('landscape'); } else { for(i=0;i<videos.length;i++){ if(videos[i]!=null){videos[i].classList.remove('fillVideoCSS');} } } }, timeOut); }); } window.addEventListener('resize', function(){ fillVideos(); }); function setUserAgentPC() { var userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36'; Object.defineProperty(navigator, 'userAgent', { value: userAgent, writable: false, configurable: false, enumerable: true }); Object.defineProperty(navigator, 'appVersion', { value: '5.0 (Windows)', writable: false, configurable: false, enumerable: true }); } if (window.location.href === 'https://mail.google.com/mail/u/1') { setUserAgentPC(); } setTimeout(function(){console.clear()}, 10000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址