feat: take care of reddit
This commit is contained in:
@@ -28,12 +28,18 @@ browser.webRequest.onBeforeRequest.addListener(
|
|||||||
return {
|
return {
|
||||||
redirectUrl: `https://${GOTHUB}/${org}/${repo}`
|
redirectUrl: `https://${GOTHUB}/${org}/${repo}`
|
||||||
};
|
};
|
||||||
|
} else if (url.hostname === "www.reddit.com") {
|
||||||
|
url.hostname = "old.reddit.com"
|
||||||
|
return {
|
||||||
|
redirectUrl: url.toString()
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ urls: [
|
{ urls: [
|
||||||
"*://www.youtube.com/*",
|
"*://www.youtube.com/*",
|
||||||
"*://youtube.com/*",
|
"*://youtube.com/*",
|
||||||
"*://github.com/*",
|
"*://github.com/*",
|
||||||
|
"*://www.reddit.com/*",
|
||||||
]},
|
]},
|
||||||
["blocking"]
|
["blocking"]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Desenshitifier",
|
"name": "Desenshitifier",
|
||||||
"version": "1.1",
|
"version": "1.2",
|
||||||
"description": "Rewrites YouTube URLs to embedded format.\nOpen Github links with Gothub",
|
"description": "Rewrites YouTube URLs to embedded format.\nOpen Github links with Gothub\nredirect reddit, www to old",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
|
|||||||
Reference in New Issue
Block a user