Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created October 24, 2019 12:38
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 kazuph/1689cdf0f225bd1eeca39b61433ced55 to your computer and use it in GitHub Desktop.
Save kazuph/1689cdf0f225bd1eeca39b61433ced55 to your computer and use it in GitHub Desktop.
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