Last active
September 16, 2019 06:54
-
-
Save koyo-miyamura/41539f265d650b625db051a1860263cd to your computer and use it in GitHub Desktop.
cometsでコメント数を取得する拡張ブックマークレット
This file contains hidden or 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
| javascript:void function(){document.body.appendChild(document.createElement("script")).src="//comets.nabettu.com/presenter/script.js";document.body.appendChild(document.createElement("script")).appendChild(document.createTextNode("let count = -1;setTimeout(() => {$(document).on('animationstart', '.comment',function(){count++;$('.status').text(`コメント数 ${count}`)})},2000)"));document.body.appendChild(document.createElement("style")).appendChild(document.createTextNode(".status{font-size: 32px !important;}"));}(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
setTimeoutしてるのは動的に読み込んだ
cometsの実行完了を待っている(中で読み込んでいるjQueryとDOM要素の生成待ち)