From 302b1ca6bb7a524ce3701f4c5cb17057aa926e3b Mon Sep 17 00:00:00 2001 From: LencoDigitexer Date: Fri, 19 Aug 2022 23:33:30 +0300 Subject: [PATCH] change domain --- background.js | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/background.js b/background.js index 6da310e..b12616c 100644 --- a/background.js +++ b/background.js @@ -5,7 +5,7 @@ let habra = '/geekr.vercel.app/post/$2/' // regex here: https://regex101.com/r/JZ46fx const regex = { // https://habr.com/ru/post/(493192)(/#comments) - post: /\/(m?\.?habr\.com|habra\.js\.org)\/.+\/([0-9]{1,})(\/?.{1,})?/, + post: /\/(m?\.?habr\.com|geekr\.vercel\.app)\/.+\/([0-9]{1,})(\/?.{1,})?/, // https://*.habr.com/ru/post sub_domain: /[^\m]{0,}\.habr\.com\/.+\/([0-9]{1,})(\/?.{1,})/, @@ -32,7 +32,7 @@ chrome.webRequest.onBeforeRequest.addListener( return {redirectUrl: redirect}; }, { - urls: ["*://*.habr.com/*", "*://*.habra.js.org/*"], + urls: ["*://*.habr.com/*", "*://*.geekr.vercel.app/*"], types: ["main_frame", "sub_frame"]//, "stylesheet", "script", "image", "object", "xmlhttprequest", "other"] }, ["blocking"] diff --git a/manifest.json b/manifest.json index 4d4a2c6..f3be2b7 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "description" : "Extension for open posts from habr.com in habra.vercel.app", "version": "1.0", "manifest_version": 2, - "permissions": ["webRequest", "*://*.habr.com/*", "*://*.habra.js.org/*", "webRequestBlocking", "storage"], + "permissions": ["webRequest", "*://*.habr.com/*", "*://*.geekr.vercel.app/*", "webRequestBlocking", "storage"], "background": { "scripts": ["background.js"], "persistent": true