about summary refs log tree commit diff stats
path: root/src/assets
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-02-08 22:35:46 +0300
committerManeraKai <manerakai@protonmail.com>2022-02-08 22:35:46 +0300
commitf99b6e3538fab825db79d3fbd48403f038e6ebd2 (patch)
tree9663d59770d9fe545262151b56aa6094b1abec6e /src/assets
parentFixing colors and some bugs #27 (diff)
downloadlibredirect-f99b6e3538fab825db79d3fbd48403f038e6ebd2.zip
Reverting scribe's regex at it's almost crashes browser #19
Diffstat (limited to 'src/assets')
-rw-r--r--src/assets/javascripts/helpers/medium.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/assets/javascripts/helpers/medium.js b/src/assets/javascripts/helpers/medium.js
index 65afba53..bc5455f4 100644
--- a/src/assets/javascripts/helpers/medium.js
+++ b/src/assets/javascripts/helpers/medium.js
@@ -2,9 +2,9 @@ import commonHelper from './common.js'
 
 
 const targets = [
-  /(?:.*\.)*(?<!(link\.|cdn\-images\-\d+\.))medium\.com(\/.*)?$/,
-  // /^medium\.com/,
-  // /.*\.medium\.com/,
+  // /(?:.*\.)*(?<!(link\.|cdn\-images\-\d+\.))medium\.com(\/.*)?$/,
+  /^medium\.com/,
+  /.*\.medium\.com/,
   // // Other domains of medium blogs, source(s): https://findingtom.com/best-medium-blogs-to-follow/#1-forge
   // /towardsdatascience\.com/,
   // /uxdesign\.cc/,
@@ -66,12 +66,13 @@ function setDisableMedium(val) {
 
 
 function redirect(url, initiator, type) {
+
   if (disableMedium) return null;
 
   if (url.pathname == "/") return null;
 
-  if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other")
-    return null;
+  if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return null;
+
 
   let instancesList = [...scribeRedirectsChecks, ...scribeCustomRedirects];
   if (instancesList.length === 0) return null;