Warning: fopen(/www/sites/update.greasyfork.icu/index/store/forever/490cae06a843b26437aaa122b637269f.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript== // @name Auto Full HD Resolution for Viu.com Video Playing // @version 0.1 // @description The script is to auto click the "全高清" Button for viu.com videos (only avaliable for paid member) // @match https://www.viu.com/ott/*/vod/* // @icon https://www.google.com/s2/favicons?domain=viu.com // @grant none // @namespace https://greasyfork.org/users/371179 // @downloadURL none // ==/UserScript== (function() { 'use strict'; let p = 0; var fn = function() { if (p == 5) return; this.setAttribute('__userscript_viu_force_selected', 'true') }; setInterval(function() { let s = document.querySelector('.vjs-menu-item[data-r="1080"]:not([aria-disabled=""]):not([aria-disabled="true"]):not([aria-checked="true"]):not([aria-checked=""]):not([__userscript_viu_loaded])'); if (s) { s.setAttribute('__userscript_viu_loaded', 'true') for (const menuBtn of s.parentNode.querySelectorAll('.vjs-menu-item[data-r]')) { menuBtn.addEventListener("click", fn, true) } window.requestAnimationFrame(() => { if (s.parentNode.querySelector('[__userscript_viu_force_selected]')) return; p = 5; s.click(); setTimeout(() => (p = 0), 300) }) } }, 33) // Your code here... })();