Browse Source

initial commit

dev
Sam Blazes 3 years ago
commit
5e61293877
  1. 4
      README.md
  2. BIN
      noshorts.zip
  3. BIN
      noshorts/icons/noshorts-48.png
  4. BIN
      noshorts/icons/noshorts-96.png
  5. 23
      noshorts/manifest.json
  6. 11
      noshorts/noshorts.js

4
README.md

@ -0,0 +1,4 @@
NoShorts
========
This is a FireFox extension that redirects any YouTube shorts URLs to use the regular YouTube video player.

BIN
noshorts.zip

Binary file not shown.

BIN
noshorts/icons/noshorts-48.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
noshorts/icons/noshorts-96.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

23
noshorts/manifest.json

@ -0,0 +1,23 @@
{
"manifest_version": 2,
"name": "NoShorts",
"version": "1.0",
"description": "Opens YouTube Shorts in the regular YouTube player.",
"icons": {
"48": "icons/noshorts-48.png",
"96": "icons/noshorts-96.png"
},
"permissions": [
"tabs"
],
"background": {
"scripts": ["noshorts.js"],
"persistent": false
}
}

11
noshorts/noshorts.js

@ -0,0 +1,11 @@
browser.tabs.onUpdated.addListener(
(tabId, changeInfo, tabInfo) => {
if (changeInfo.url && changeInfo.url.includes("shorts/")) {
browser.tabs.update(tabId, {
loadReplace: true,
url: tabInfo.url.replace("shorts/", "watch?v=")
});
}
},
{ urls: ['*://*.youtube.com/shorts/*']}
)
Loading…
Cancel
Save