From 876b7ba40fb6440d330e25b3114d59a354b0412c Mon Sep 17 00:00:00 2001 From: HIMlaoS_Misa Date: Wed, 17 Jan 2024 03:23:19 +0800 Subject: [PATCH] Fix RegEx bug on referrer-detect.js wrong question mark dude --- docs/.vuepress/public/referrer-detect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/public/referrer-detect.js b/docs/.vuepress/public/referrer-detect.js index 2f461cb..a24996b 100644 --- a/docs/.vuepress/public/referrer-detect.js +++ b/docs/.vuepress/public/referrer-detect.js @@ -5,7 +5,7 @@ const referrer = document.referrer.toLowerCase(); const searchEngineReg = /^https?:\/\/([\da-zA-Z\-]*)\.?(sogou|soso|baidu|google|youdao|yahoo|bing|118114|biso|gougou|ifeng|ivc|sooule|niuhu|biso|so|haosou|sm)\.(.{2,})/; const originReg = /^https:\/\/([\da-zA-Z\-]*)\.?midrai\.cn/; - const localHostReg = /^https?:\/\/((localhost|127\.0\.0\.1)(:\d{1,5}))?/; + const localHostReg = /^https?:\/\/((localhost|127\.0\.0\.1)(:\d{1,5})?)/; if (!referrer || referrer == '') return; if (referrer.indexOf('https://github.com/crackmidrai') === 0) return; @@ -18,4 +18,4 @@ alert('检测到您是来自第三方网站的游客。\r\n\r\n本组从未授权给任何第三方个人/团体宣传、使用、挂名本组及本组劳动成果的权利,请您注意辨别。\r\n\r\n如果对方涉及金钱交易,请立刻尝试退款举报并不遗余力地曝光 TA!'); res(true); }); -})(); \ No newline at end of file +})();