Sleazy Fork is available in English.

自动隐藏pornhub上已经观看的视频

2023/9/30 00:54:13

// ==UserScript==
// @name         自动隐藏pornhub上已经观看的视频
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  2023/9/30 00:54:13
// @author       xiaoxiao
// @match        *://*/*
// @grant        none
// ==/UserScript==
// 获取所有包含 class="pcVideoListItem js-pop videoblock" 的元素
var elements = document.querySelectorAll('.pcVideoListItem.js-pop.videoblock, .pcVideoListItem.js-pop.videoblock.videoBox');

// 遍历每个元素
elements.forEach(function(element) {
  // 检查元素的子级是否包含文本 "已观看"
  var hasWatchedText = Array.from(element.querySelectorAll('*')).some(function(childElement) {
    return childElement.textContent.includes("已观看");
  });

  // 如果包含 "已观看" 文本,就删除整个元素
  if (hasWatchedText) {
    element.remove();
  }
});