For those interested: The reason why the script stopped working is because of security considerations. The core function in all of this, XMLHttpRequest, was deemed too unsafe by the powers that be - specifically when accessing sites outsides a very small scope, and that means that a script on your PC must not interact with the page hosted on neogaf servers. If the unmodified script still works then your Browser is either old or misconfigured/compromised.
There are ways to re-enable the old functionality, but I'm not quite sure EviLore would be willing to futz around with the servers just so we can have our spinny reload thingamabops.
Anyway. I've gotten it to work without that thanks to some unholy Frankenhack. I'm adding what I did and why so someone with actual javascript expertise can code something worthwhile.
Again: This terrifying monster works on the one PC I need it to work on. On one specific revision of the ancient v12 Opera Browser.
Also: Yes, hack. This is not my proudest work. Very far from it, actually. Use at your own risk. I'd rather you just used this hack as a guideline on what needs to be fixed, dear reader.
Since XMLHttpRequest won't work (really shitty of them to just return null and not throw an exception or otherwise indicate failure):
GM_xmlhttpRequest is deliberately pretending the (local) XMLHttpRequest is executed on the page from the server. Also, as an added Bonus: It's GreaseMonkey exclusive. Also, it doesn't support the required request type ("document"), so you get a string with HTML text back instead of what the rest of the scripts are expecting.
At this point in time, you have a couple of possible ways to go about that:
So, yeah.
With that addition the script resumes its work.
I'm just leaving this here as a general idea what needs to be done.
There are ways to re-enable the old functionality, but I'm not quite sure EviLore would be willing to futz around with the servers just so we can have our spinny reload thingamabops.
Anyway. I've gotten it to work without that thanks to some unholy Frankenhack. I'm adding what I did and why so someone with actual javascript expertise can code something worthwhile.
Again: This terrifying monster works on the one PC I need it to work on. On one specific revision of the ancient v12 Opera Browser.
Also: Yes, hack. This is not my proudest work. Very far from it, actually. Use at your own risk. I'd rather you just used this hack as a guideline on what needs to be fixed, dear reader.
Since XMLHttpRequest won't work (really shitty of them to just return null and not throw an exception or otherwise indicate failure):
GM_xmlhttpRequest is deliberately pretending the (local) XMLHttpRequest is executed on the page from the server. Also, as an added Bonus: It's GreaseMonkey exclusive. Also, it doesn't support the required request type ("document"), so you get a string with HTML text back instead of what the rest of the scripts are expecting.
At this point in time, you have a couple of possible ways to go about that:
- Use the dedicated functions to parse the HTML, namely DOMParser(); - Problem: it's not widely supported yet.
- Use jQuery to benefit from the hard work of your peers
- Write your own code
- Google a premade solution that throws a couple of exceptions depending on Browser, but generally works.
So, yeah.
With that addition the script resumes its work.
I'm just leaving this here as a general idea what needs to be done.
Code:
function str2Dom(html) {
//SOURCE: http://krasimirtsonev.com/blog/article/Convert-HTML-string-to-DOM-element
////DOMParser would be better, but doesn't work with text/html on Opera v12
////Alternative: jQuery
var frame = document.createElement('iframe');
frame.style.display = 'none';
document.body.appendChild(frame);
frame.contentDocument.open();
frame.contentDocument.write(html);
frame.contentDocument.close();
var el = frame.contentDocument;
document.body.removeChild(frame);
return el;
}
function updateRequest() {
clearInterval(STATE_TIMER);
STATE_TIMER = null;
STATE_PENDING = true;
UI_actionStart.textContent = TEXT_PENDING;
UI_message.textContent = TEXT_WAIT;
try {
////THIS IS A HACK, USE AT YOUR OWN RISK
GM_xmlhttpRequest({
method: "GET",
url: STATE_URL,
responseType: "document",
onload: function(response) {
checkReponse(str2Dom(response.responseText));
updateComplete();
},
onerror: function(response) {
STATE_FAIL_COUNT += 1;
updateComplete();
}
});
} catch (e) {
STATE_FAIL_COUNT += 1;
updateComplete();
}
}
I... I'm sorry. I just needed my spinny loady thing back. And I hate Javascript like I hate jabbing needles in my eyes. Desperate times call for desperate measures.