mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-06-02 18:44:36 +12:00
16 lines
401 B
JavaScript
16 lines
401 B
JavaScript
|
|
import FimFic2Epub from './FimFic2Epub'
|
|
|
|
const STORY_ID = document.location.pathname.match(/^\/story\/(\d*)/)[1]
|
|
|
|
const ffc = new FimFic2Epub(STORY_ID)
|
|
|
|
const epubButton = document.querySelector('.story_container ul.chapters li.bottom a[title="Download Story (.epub)"]')
|
|
|
|
if (epubButton) {
|
|
epubButton.addEventListener('click', function (e) {
|
|
e.preventDefault()
|
|
ffc.download()
|
|
}, false)
|
|
}
|