Created
October 24, 2019 12:38
-
-
Save kazuph/1689cdf0f225bd1eeca39b61433ced55 to your computer and use it in GitHub Desktop.
Chrome Extension Script Auto RunnerでSafari(O'Reilly)が日本語に翻訳されたあともNext/Prev/目次のリンクを有効にする
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
// 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