🏠 Home 

Fanfiction.net story export script.

Writes all chapters of the story on one page.

< Feedback on Fanfiction.net story export script.

Question/comment

§
Posted: 2015-12-11

fix for partly broken script

After a little debugging, it seems GM_xmlhttpRequest() in loadChapter() does no longer work as expected.
The GM_xmlhttpRequest() can be substituted with ordinary javascript XMLHttpRequest()
and the script works again (I am using the script with Firefox 42.0) :

function loadChapter(num,callback){
var replStr='\/'+String(num)+'\/';
var hr=location.href;
var currentURL=hr.replace(/\/\d{1,3}\//,replStr);
var htpreq = new XMLHttpRequest();
htpreq.onreadystatechange = function() {
if (htpreq.readyState == XMLHttpRequest.DONE ) {
callback(htpreq,num-1);
}
}
htpreq.open('GET',currentURL, true);
htpreq.send(null);
}

Post reply

Sign in to post a reply.