Skip to content

Instantly share code, notes, and snippets.

@kazuph

kazuph/script.js

Created Oct 24, 2019
Embed
What would you like to do?
Chrome Extension Script Auto RunnerでSafari(O'Reilly)が日本語に翻訳されたあともNext/Prev/目次のリンクを有効にする
// load "//code.jquery.com/jquery-3.4.1.min.js"
let rebindClickEvent = () => {
$('a.next').on('click', () => location.href = $('a.next')[0].href );
$('a.prev').on('click', () => location.href = $('a.prev')[0].href );
$('li.toc-level1').map((i, li) => {
$(li).on('click', () => location.href = $(li).children()[0].href )
})
console.log("rebind")
}
setTimeout(rebindClickEvent, 1000 * 5);
setTimeout(rebindClickEvent, 1000 * 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.