Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kdmsnr/08594ce619a4b46c6ac378293836854b to your computer and use it in GitHub Desktop.
Save kdmsnr/08594ce619a4b46c6ac378293836854b to your computer and use it in GitHub Desktop.
Remove watched programs for TVer
// ==UserScript==
// @name Remove watched programs for TVer
// @namespace https://kdmsnr.com
// @version 0.1.7
// @description Remove watched programs from the mypage of TVer
// @author kdmsnr
// @match https://tver.jp/mypage/fav
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
function hideWatched() {
document.querySelectorAll('a[class^="EpisodeItem_"]').forEach(a => {
const progress = a.querySelector('span[class^="ProgressBar_progress"]');
const li = a.closest('li');
if (progress && progress.style.width === "100%") {
if (li) {
li.style.display = 'none';
} else {
a.style.display = 'none';
}
} else {
if (li) {
li.style.display = '';
}
a.style.display = '';
}
});
}
hideWatched();
const observer = new MutationObserver(hideWatched);
observer.observe(document.body, { childList: true, subtree: true });
})();
@kdmsnr
Copy link
Author

kdmsnr commented Nov 21, 2023

ご使用のブラウザにTampermonkeyの機能拡張をインストールしてから、右上の[Raw]をクリックするとインストールできる。

@KazFujimoto
Copy link

使用させていただいているのですが、視聴済動画が消えません・・・
Tampermonkey 使用しています。ヘルプ頂けると助かります。

@kdmsnr
Copy link
Author

kdmsnr commented Mar 7, 2025

昨日、サイトの構造が変わったみたいですね。修正してみましたが、どうでしょうか。

@KazFujimoto
Copy link

早速のご対応ありがとうございます。
完璧です。本当に助かりました。

@penta-blip
Copy link

ver 0.1.7 待ってました!更新ありがとうございます!
めっちゃ感謝してます!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment