Skip to content

Commit 5afa186

Browse files
authored
Merge pull request #199 from kidonng/patch-1
忽略来源网站
2 parents 3609588 + 5076ef1 commit 5afa186

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

assets/travelling.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ function travelling(){
134134
url[130]="https://sorryfu.top";
135135

136136

137-
138-
139-
//修正概率
140-
url[131]="https://github.com/volfclub/travelling";
137+
if (document.referrer) {
138+
var origin = new URL(document.referrer).origin;
139+
url.splice(url.indexOf(origin), 1);
140+
}
141141

142142

143-
var ints=parseInt(Math.random()*(url.length));
143+
var ints=Math.floor(Math.random() * url.length);
144144
window.location=url[ints];
145-
}
145+
}

0 commit comments

Comments
 (0)