commit
5e61293877
6 changed files with 38 additions and 0 deletions
@ -0,0 +1,4 @@
|
||||
NoShorts |
||||
======== |
||||
|
||||
This is a FireFox extension that redirects any YouTube shorts URLs to use the regular YouTube video player. |
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
@ -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 |
||||
} |
||||
|
||||
} |
||||
@ -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…
Reference in new issue