mirror of
https://github.com/chylex/Userscripts.git
synced 2025-05-16 09:34:04 +02:00
Add 'YouTube Activity Check Removal'
This commit is contained in:
parent
f1158a4bbc
commit
2ddfdcd8cf
35
YouTube/ActivityCheckRemoval.user.js
Normal file
35
YouTube/ActivityCheckRemoval.user.js
Normal file
@ -0,0 +1,35 @@
|
||||
// ==UserScript==
|
||||
// @name YouTube Activity Check Removal
|
||||
// @description Removes activity check that interrupts video playback.
|
||||
// @version 1
|
||||
// @license MPL-2.0
|
||||
// @namespace https://chylex.com
|
||||
// @homepageURL https://github.com/chylex/Userscripts
|
||||
// @supportURL https://github.com/chylex/Userscripts/issues
|
||||
// @include https://youtube.com/*
|
||||
// @include https://*.youtube.com/*
|
||||
// @run-at document-end
|
||||
// @grant none
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
|
||||
var timeout = 0;
|
||||
|
||||
var check = setInterval(function(){
|
||||
if (_yt_www.J){
|
||||
clearInterval(check);
|
||||
|
||||
var prev = _yt_www.J;
|
||||
|
||||
_yt_www.J = function(cls){
|
||||
if (cls && cls.startsWith("youthere-")){
|
||||
return null;
|
||||
}
|
||||
|
||||
return prev.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
else if (++timeout > 500){ // average should be about 5-10
|
||||
clearInterval(check);
|
||||
}
|
||||
}, 1);
|
Loading…
Reference in New Issue
Block a user