mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-11 17:37:21 +10:00
Create goofyHistory.js
This commit is contained in:
20
js-helper/goofyHistory.js
Normal file
20
js-helper/goofyHistory.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const unique = new Set();
|
||||
|
||||
function Gofy_history(e, urlForm, idBox) {
|
||||
|
||||
const uri = e?.item?.uri;
|
||||
|
||||
if (uri && uri.includes('spotify:track:') && !unique.has(uri)) {
|
||||
|
||||
unique.add(uri);
|
||||
|
||||
fetch(urlForm, {
|
||||
"headers": {
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
"body": "entry." + idBox + "=" + uri,
|
||||
"method": "POST",
|
||||
"mode": "no-cors",
|
||||
}).catch(error => console.error('error sending uri to google form:', error));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user