From e52e7b7d85705fd8eb4875833b050dfdac4c2602 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Sun, 14 Jun 2020 19:47:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E7=BD=91=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/travelling.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/travelling.js b/assets/travelling.js index 69d77bb22..3ddecef74 100644 --- a/assets/travelling.js +++ b/assets/travelling.js @@ -110,12 +110,14 @@ function travelling(){ url[106]="https://www.ishells.cn"; url[107]="https://www.wztlink1013.com"; + if (document.referrer) { + var origin = new URL(document.referrer).origin; + url.splice(url.indexOf(origin), 1); + } - //修正概率 - url[108]="https://github.com/volfclub/travelling"; var ints=parseInt(Math.random()*(url.length)); window.location=url[ints]; - } \ No newline at end of file + } From 2db04a1c2d9d6af4818a73ffee02d7de3a908487 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Sun, 14 Jun 2020 19:58:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?=E6=95=B0=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/travelling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/travelling.js b/assets/travelling.js index 3ddecef74..76769a218 100644 --- a/assets/travelling.js +++ b/assets/travelling.js @@ -118,6 +118,6 @@ function travelling(){ - var ints=parseInt(Math.random()*(url.length)); + var ints=Math.floor(Math.random() * url.length); window.location=url[ints]; }