Changes link under #FicReadLink
tag to remove &chapter=0
part.
Last active
August 31, 2019 09:35
-
-
Save pyhedgehog/6cdded6a39f5c4da6d353f52df608d25 to your computer and use it in GitHub Desktop.
FTF read all chapters link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FTF read all chapters link | |
// @description On FicToFile page change global read link to whole text | |
// @id [email protected] | |
// @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== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FTF read all chapters link | |
// @description On FicToFile page change global read link to whole text | |
// @id [email protected] | |
// @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