From 56776d7e7cfbb5d15d5045c4f0002dffbd11cefe Mon Sep 17 00:00:00 2001
From: SinTan1729 <sayantan.santra689@gmail.com>
Date: Thu, 23 Nov 2023 19:29:21 -0600
Subject: [PATCH] feat: Tag for temporarily disabling piped forwarding

---
 youtube2piped.user.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/youtube2piped.user.js b/youtube2piped.user.js
index 6b7f431..2a30255 100644
--- a/youtube2piped.user.js
+++ b/youtube2piped.user.js
@@ -1,7 +1,7 @@
 // ==UserScript==
 // @name         YouTube2Piped
 // @namespace    YouTube
-// @version      1.3.0
+// @version      1.4.0
 // @description  Redirect YouTube to chosen Piped instance
 // @author       SinTan
 // @match        *://*.youtube.com/*
@@ -14,10 +14,15 @@
 
 (function () {
   "use strict";
+
+  if (location.href.endsWith('#no-piped')) {
+    exit;
+  }
+
   // Edit instance url here to go to any instance of choice
   const instance = "https://piped.video";
 
-  const url = new URL(window.location.href.replace('/shorts/','/watch?v='));
+  const url = new URL(window.location.href.replace('/shorts/', '/watch?v='));
   let url_new = null;
 
   let id = url.searchParams.get('v');
@@ -54,4 +59,4 @@
     window.location.replace(url_new);
   }
 }
-)();
+)();
\ No newline at end of file