Skip to content

Commit 6826b49

Browse files
committed
fix
1 parent beb14fa commit 6826b49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Kill Baidu AD/Kill Baidu AD.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@
176176
}
177177
setTimeout(()=>{clearAD();},2000);
178178
if(killBaijiaType==1){
179-
if(location.href.indexOf("+-baijiahao")==-1){
180-
location.href=location.href.replace(/(&wd=.*?)(&|$)/,'$1+-baijiahao&');
179+
if(location.href.split("wd=")[1].split("&")[0].indexOf("+-baijiahao")==-1){
180+
location.href=location.href.replace(/((&|\?)wd=.*?)(&|$)/,'$1+-baijiahao&');
181181
}
182182
document.addEventListener('DOMContentLoaded', function () {
183183
if(location.href.indexOf("+-baijiahao")!=-1){

0 commit comments

Comments
 (0)