mirror of
https://github.com/chylex/Userscripts.git
synced 2025-04-18 17:15:44 +02:00
Compare commits
No commits in common. "7319ee255e561303d3ea9e7995c97b37d498f0e0" and "9dc53e3e1d9ffeef5c5b3c29cc33aef5705ec691" have entirely different histories.
7319ee255e
...
9dc53e3e1d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
.idea
|
28
README.md
28
README.md
@ -66,7 +66,11 @@ Before you [report an issue](https://github.com/chylex/Userscripts/issues/new) (
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="110px" rowspan="5">YouTube</th>
|
||||
<td width="325px"><a href="#block-youtube-playlists">Block YouTube Playlists</a></td>
|
||||
<td width="325px"><a href="#activity-check-removal">Activity Check Removal</a></td>
|
||||
<td>Script</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#block-youtube-playlists">Block YouTube Playlists</a></td>
|
||||
<td>Script</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -77,10 +81,6 @@ Before you [report an issue](https://github.com/chylex/Userscripts/issues/new) (
|
||||
<td><a href="#hide-youtube-seek-bar--duration">Hide YouTube Seek Bar & Duration</a></td>
|
||||
<td>Script</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#redirect-youtube-shorts">Redirect YouTube Shorts</a></td>
|
||||
<td>Script</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#theater-fullscreen--transparent-chat">Theater Fullscreen + Transparent Chat</a></td>
|
||||
<td>Script</td>
|
||||
@ -154,11 +154,19 @@ Overlays Twitch chat over the video to save space. Includes many customizations
|
||||
---
|
||||
### YouTube
|
||||
|
||||
#### Activity Check Removal
|
||||
Removes activity check that interrupts video playback. **This script is obsolete**.
|
||||
\[ [Automatically updated](https://github.com/chylex/Userscripts/raw/master/YouTube/ActivityCheckRemoval.user.js) \]
|
||||
\-
|
||||
\[ [Manually updated](https://github.com/chylex/Userscripts/raw/2ddfdcd8cffb796830ff04847f43f2bf91fb0ffc/YouTube/ActivityCheckRemoval.user.js) \]
|
||||
\-
|
||||
\[ [Source code](https://github.com/chylex/Userscripts/blob/master/YouTube/ActivityCheckRemoval.user.js) \]
|
||||
|
||||
#### Block YouTube Playlists
|
||||
Removes playlists from YouTube video URLs.
|
||||
\[ [Automatically updated](https://github.com/chylex/Userscripts/raw/master/YouTube/BlockPlaylists.user.js) \]
|
||||
\-
|
||||
\[ [Manually updated](https://github.com/chylex/Userscripts/raw/98097ef8c14ab84ff0dc7463bbe55a363890bb6d/YouTube/BlockPlaylists.user.js) \]
|
||||
\[ [Manually updated](https://github.com/chylex/Userscripts/raw/b74c26ed01640db4f6d0a06f67d6e25627fb07be/YouTube/BlockPlaylists.user.js) \]
|
||||
\-
|
||||
\[ [Source code](https://github.com/chylex/Userscripts/blob/master/YouTube/BlockPlaylists.user.js) \]
|
||||
|
||||
@ -178,14 +186,6 @@ Hides all mentions of video durations by default. Press 'AltGr' to toggle.
|
||||
\-
|
||||
\[ [Source code](https://github.com/chylex/Userscripts/blob/master/YouTube/HideSeekBarAndDuration.user.js) \]
|
||||
|
||||
#### Redirect YouTube Shorts
|
||||
Redirects YouTube shorts to normal video URLs.
|
||||
\[ [Automatically updated](https://github.com/chylex/Userscripts/raw/master/YouTube/RedirectShorts.user.js) \]
|
||||
\-
|
||||
\[ [Manually updated](https://github.com/chylex/Userscripts/raw/035aed7554c89fee66a6278f4fcf73292821b7f5/YouTube/RedirectShorts.user.js) \]
|
||||
\-
|
||||
\[ [Source code](https://github.com/chylex/Userscripts/blob/master/YouTube/RedirectShorts.user.js) \]
|
||||
|
||||
#### Theater Fullscreen + Transparent Chat
|
||||
In theater mode, it expands video to full screen, makes chat transparent and overlays it over the video. Note that colors of images in chat will be inverted, and the player controls may behave strangely. **Requires classic YouTube layout,** you can use the third-party [Youtube - Restore Classic](https://greasyfork.org/en/scripts/34818-youtube-restore-classic) script for that.
|
||||
\[ [Automatically updated](https://github.com/chylex/Userscripts/raw/master/YouTube/TheaterFullscreenTransparentChat.user.js) \]
|
||||
|
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);
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Block YouTube Playlists
|
||||
// @description Removes playlists from YouTube video URLs.
|
||||
// @version 2
|
||||
// @version 1
|
||||
// @license MPL-2.0
|
||||
// @namespace https://chylex.com
|
||||
// @homepageURL https://github.com/chylex/Userscripts
|
||||
@ -13,11 +13,18 @@
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
|
||||
function redirectPlaylist() {
|
||||
if (location.pathname === "/watch" && location.search.includes("&list=")) {
|
||||
location.replace(location.href.replace(/&list=(.*)/, ""));
|
||||
}
|
||||
if (location.pathname == "/watch" && location.search.includes("&list=")){
|
||||
history.replaceState({}, document.title, location.search.replace(/&list=(.*)/, ""));
|
||||
location.reload();
|
||||
}
|
||||
|
||||
redirectPlaylist();
|
||||
document.addEventListener("yt-navigate-start", redirectPlaylist);
|
||||
document.addEventListener("spfclick", function(e){
|
||||
var url = e.detail.url;
|
||||
|
||||
if (url.includes("youtube.com/watch?") && url.includes("&list=")){
|
||||
// forces a normal page load
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}, true);
|
||||
|
@ -1,23 +0,0 @@
|
||||
// ==UserScript==
|
||||
// @name Redirect YouTube Shorts
|
||||
// @description Redirects YouTube shorts to normal video URLs.
|
||||
// @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-start
|
||||
// @grant none
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
|
||||
function redirectShort() {
|
||||
if (location.pathname.startsWith("/shorts/")) {
|
||||
location.replace(location.href.replace("/shorts/", "/watch?v="));
|
||||
}
|
||||
}
|
||||
|
||||
redirectShort();
|
||||
document.addEventListener("yt-navigate-start", redirectShort);
|
Loading…
Reference in New Issue
Block a user