Greasy Fork is available in English.

Discussions » Development

Suddenly broken

§
Posted: 2015-12-19
Edited: 2015-12-22

Suddenly broken

i was using a script for a site but since 17-18th it has stopped working have uninstalled, reinstalled fresh and still nothing happening, i am not good with computer stuff, script was from userscript site, was working for a few months before the failure day or 2 ago, any info would be very appreciated

§
Posted: 2015-12-20

Which script, please?

§
Posted: 2015-12-20
Edited: 2015-12-22

copy of the script now not working

==UserScript==
// @name        Dragcave egg monitor
// @namespace   http://localhost
// @description Monitor the location page and catch the egg you want.
// @include     http://dragcave.net/locations/*
// @version     1
// @grant   none
// ==/UserScript==
var opened = 0;
var MAX_OPEN = 1;
var container = document.getElementsByClassName("eggs");
for (var l = 0; l < container.length; l++) {
    container[l].setAttribute('id', 'eggs');
    var eggs = document.getElementById("eggs");
    var divs = eggs.getElementsByTagName("div");
    for (var i = 0; i < divs.length; i++) {
        // See how the pattern goes and update the text for new releases and all the good stuff ^_^
        if ((divs[i].innerHTML.indexOf("polished stone") != -1) || (divs[i].innerHTML.indexOf("metallic") != -1) || (divs[i].innerHTML.indexOf("beautiful glow") != -1) || (divs[i].innerHTML.indexOf("gleams") != -1)) {
            var div = divs[i];
            var link = divs[i].innerHTML.href;
            for (var b = 0; b < div.childNodes.length; b++) {
                var test = div.childNodes[0].href;
                //window.location.href = test;
                if (opened < MAX_OPEN) {
                  opened++;
                  open_in_new_tab(test);
                } else {
                  console.log('Skipping '+test);
                }
            }
        }
    }
}
setTimeout(function() {
    window.location.href = window.location.href
}, 500);
function open_in_new_tab(url) {
    var win = window.open(url, '_blank');
    win.focus();
}
woxxomMod
§
Posted: 2015-12-20

It's not a complete script. Edit the post and add the header.

§
Posted: 2015-12-21

think i have added the rest

§
Posted: 2015-12-24

anyone have an answer as to why all of a sudden not working please

Post reply

Sign in to post a reply.