Skip to content

Instantly share code, notes, and snippets.

@pyhedgehog
Last active August 31, 2019 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyhedgehog/6cdded6a39f5c4da6d353f52df608d25 to your computer and use it in GitHub Desktop.
Save pyhedgehog/6cdded6a39f5c4da6d353f52df608d25 to your computer and use it in GitHub Desktop.
FTF read all chapters link

Changes link under #FicReadLink tag to remove &chapter=0 part.

Version 2

  • fanfics.me migrated to HTTPS.

Version 1

  • Change link under #FicReadLink tag to remove &chapter=0 part.
// ==UserScript==
// @name FTF read all chapters link
// @description On FicToFile page change global read link to whole text
// @id fanficsmeFicToFileReadAll@pyhedgehog.github.com
// @namespace https://gist.github.com/pyhedgehog/
// @homepage https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/
// @downloadURL https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/raw/fanficsmeFicToFileReadAll.user.js
// @updateURL https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/raw/fanficsmeFicToFileReadAll.meta.js
// @version 2
// @author Michael P. Dubner
// @match http://fanfics.me/ftf*
// @match https://fanfics.me/ftf*
// @grant unsafeWindow
// ==/UserScript==
// ==UserScript==
// @name FTF read all chapters link
// @description On FicToFile page change global read link to whole text
// @id fanficsmeFicToFileReadAll@pyhedgehog.github.com
// @namespace https://gist.github.com/pyhedgehog/
// @homepage https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/
// @downloadURL https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/raw/fanficsmeFicToFileReadAll.user.js
// @updateURL https://gist.github.com/pyhedgehog/6cdded6a39f5c4da6d353f52df608d25/raw/fanficsmeFicToFileReadAll.meta.js
// @version 2
// @author Michael P. Dubner
// @match http://fanfics.me/ftf*
// @match https://fanfics.me/ftf*
// @grant unsafeWindow
// ==/UserScript==
(function() {
'use strict';
var a=unsafeWindow.document.getElementById('FicReadLink').getElementsByClassName('red');
console.log(a);
Array.prototype.forEach.call(a,function(e){
console.log(e);
var oldhref=e.href;
var newhref=oldhref.replace('&chapter=0','');
e.href=newhref;
console.log(oldhref,'->',newhref);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment