From fb325a7ae4619f564678b14004545bbdff9caca9 Mon Sep 17 00:00:00 2001 From: Zamicol Date: Mon, 19 Nov 2018 23:59:07 -0700 Subject: [PATCH] add support for poll pages --- background.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/background.js b/background.js index e7eedfc..a9cb78e 100644 --- a/background.js +++ b/background.js @@ -2,6 +2,12 @@ const oldReddit = "https://old.reddit.com" chrome.webRequest.onBeforeRequest.addListener( function(details) { + + // Exclude poll pages + if (details.url.match(/^https?:\/\/(www.)*reddit.com\/poll/)){ + return + } + return {redirectUrl: oldReddit + details.url.match(/^https?:\/\/[^\/]+([\S\s]*)/)[1]} }, {