From 15b6a74002796d6d3532884f112bfe9ffc9763ae Mon Sep 17 00:00:00 2001 From: sn4il Date: Sat, 4 May 2024 19:33:08 +0300 Subject: Init --- ring/getid.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 ring/getid.js (limited to 'ring/getid.js') diff --git a/ring/getid.js b/ring/getid.js new file mode 100755 index 0000000..4aba45d --- /dev/null +++ b/ring/getid.js @@ -0,0 +1,28 @@ +var urls; +var id; + +fetch("./urls.txt").then(response => response.text()).then((data) => { + urls=data.split("\n"); + process(); +}) + +function process() { + var urlParams = new URLSearchParams(window.location.search); + id=urlParams.get('id'); + + if (!urlParams.has('id') || id.isNaN || id==0){ + id=-1; + var ref=document.referrer.replace(/[^/]*$/, ''); + + for (var i=0;i