Fanfiction.net story export script.

Writes all chapters of the story on one page.

< Fanfiction.net story export script. 피드백으로 돌아가기

질문/댓글

§
게시: 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);
}

답글 게시

답글을 게시하려면 로그인하세요.