mirror of
https://github.com/SinTan1729/userscripts.git
synced 2025-02-05 14:12:32 -06:00
fix: Executing inside embedded players
This commit is contained in:
parent
8500554a2d
commit
7cd853fae1
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name YouTube2Piped
|
// @name YouTube2Piped
|
||||||
// @namespace YouTube
|
// @namespace YouTube
|
||||||
// @version 1.4.1
|
// @version 1.4.2
|
||||||
// @description Redirect YouTube to chosen Piped instance
|
// @description Redirect YouTube to chosen Piped instance
|
||||||
// @author SinTan
|
// @author SinTan
|
||||||
// @match *://*.youtube.com/*
|
// @match *://*.youtube.com/*
|
||||||
|
@ -15,6 +15,12 @@
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
// Do not execute inside embedded players
|
||||||
|
if (window.location !== window.parent.location) {
|
||||||
|
exit;;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use #no-piped as an escape term
|
||||||
if (location.href.endsWith('#no-piped')) {
|
if (location.href.endsWith('#no-piped')) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue