Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 hushin/891fe48218c9c7c5402598ea71a5b3b7 to your computer and use it in GitHub Desktop.
Save hushin/891fe48218c9c7c5402598ea71a5b3b7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name ニコレポを見やすくするやつ
// @namespace https://twitter.com/hush_in
// @version 0.1
// @description ニコレポを見やすくするやつ
// @author hush_in
// @match https://www.nicovideo.jp/my/top
// @grant none
// ==/UserScript==
{
const $ = jQuery
$(() => {
setTimeout(() => {
const main = () => {
$('.NicorepoTimelineItem').each((i, elm) => {
const $elm = $(elm)
const logText = $elm.find('.log-body').text()
const ignorePattern = /再生を達成しました|動画を登録しました|ランキングで|生放送を開始しました|生放送を予約しました。/
if (ignorePattern.test(logText)) $elm.remove()
})
}
main()
const observer = new MutationObserver((mutations) => {
main()
})
const config = {
childList: true
}
observer.observe($('.NicorepoTimeline').get(0), config)
}, 1500)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment