var timehelper = 0; var thelength = $(".giveaways-page-item").length; var giveaways = $(".giveaways-page-item");
for (var i = 0; i < thelength; i++) { if (giveaways[i].innerHTML.indexOf("ENTERED") == -1) { if (giveaways[i].innerHTML.indexOf("FREE") != -1) { JoinGA(giveaways[i].querySelector(".giveaways-page-item-img-btn-enter").href); } } }
function JoinGA(hreflink) { setTimeout(function () { $.post(hreflink); console.log("Entered giveaway: " + hreflink); console.log("This script is deprecated. It will not be updated anymore."); }, Math.floor((timehelper * 450) + 450)); timehelper++; }
I reworked the script a little bit and now it works)
// ==UserScript==
// @name Opium Pulses giveaway Auto join
// @namespace Opium Pulses auto
// @author SaddestPanda
// @description Opium Pulses giveaway Auto joiner
// @match http*://www.opiumpulses.com/giveaways*
// @homepage https://greasyfork.org/en/scripts/19858-opium-pulses-giveaway-auto-join
// @supportURL https://greasyfork.org/en/scripts/19858-opium-pulses-giveaway-auto-join/feedback
// @version 3.5
// @grant none
// ==/UserScript==
var timehelper = 0;
var thelength = $(".giveaways-page-item").length;
var giveaways = $(".giveaways-page-item");
for (var i = 0; i < thelength; i++) {
if (giveaways[i].innerHTML.indexOf("ENTERED") == -1) {
if (giveaways[i].innerHTML.indexOf("FREE") != -1) {
JoinGA(giveaways[i].querySelector(".giveaways-page-item-img-btn-enter").href);
}
}
}
function JoinGA(hreflink) {
setTimeout(function () {
$.post(hreflink);
console.log("Entered giveaway: " + hreflink);
console.log("This script is deprecated. It will not be updated anymore.");
}, Math.floor((timehelper * 450) + 450));
timehelper++;
}
I reworked the script a little bit and now it works)