Discussions » Demandes de création de scripts
Help wanted
After you changes your location the script stops.
Solutions:
1) you can match all links (script will run again for each new link) and you need to save index of current link
2) you can open new window (new tab)
Who can help me with the bext script.
This is the first time I try writing a script, but I have a problem. The script is not going to the next link in the script.
// ==UserScript==
// @name [LGL] Linkpayu cycle for FlyPass script
// @namespace http://xeryiar.gq
// @version 1.0
// @match https://linkpayu.xyz/links/currency/ltc
// @description Cycles through fly-inc shortlinks from linkpayu.xyz
// @grant none
(function() {
'use strict';
// Set the delay between shortlink visits (in milliseconds)
const DELAY = 10000; // 10 seconds
// Set the list of shortlinks to visit
const SHORTLINKS = [
// Round 1
'https://linkpayu.xyz/links/go/20/LTC', // Ezz
'https://linkpayu.xyz/links/go/19/LTC', // Fish
'https://linkpayu.xyz/links/go/25/LTC', // Uppper
'https://linkpayu.xyz/links/go/27/LTC', // Links
'https://linkpayu.xyz/links/go/14/LTC', // Clicks
'https://linkpayu.xyz/links/go/26/LTC', // Shorts
'https://linkpayu.xyz/links/go/21/LTC', // Urls
// Round 2
'https://linkpayu.xyz/links/go/20/LTC', // Ezz
'https://linkpayu.xyz/links/go/19/LTC', // Fish
'https://linkpayu.xyz/links/go/25/LTC', // Uppper
'https://linkpayu.xyz/links/go/27/LTC', // Links
'https://linkpayu.xyz/links/go/14/LTC', // Clicks
'https://linkpayu.xyz/links/go/26/LTC', // Shorts
'https://linkpayu.xyz/links/go/21/LTC', // Urls
// Round 3
'https://linkpayu.xyz/links/go/20/LTC', // Ezz
'https://linkpayu.xyz/links/go/19/LTC', // Fish
'https://linkpayu.xyz/links/go/25/LTC', // Uppper
'https://linkpayu.xyz/links/go/27/LTC', // Links
'https://linkpayu.xyz/links/go/14/LTC', // Clicks
'https://linkpayu.xyz/links/go/26/LTC', // Shorts
'https://linkpayu.xyz/links/go/21/LTC', // Urls
];
// Initialize the index to the first shortlink in the list
let currentIndex = 0;
// Function to visit the next shortlink in the list
setTimeout(visitNextShortlink, "10000")
function visitNextShortlink() {
// Navigate to the next shortlink
window.location = SHORTLINKS[currentIndex];
// Increment the index
currentIndex = (currentIndex + 1) % SHORTLINKS.length;
// Set a timeout to visit the next shortlink after the specified delay
setTimeout(visitNextShortlink, DELAY);
}
// Start the cycle by visiting the first shortlink
visitNextShortlink();
})();
Is there anyone who can fix this for me. Also the problem that if the link not exist it must skip it.
Thnxs....