Add r18.dev filtering script
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// ==UserScript==
|
||||
// @name r18.dev duplicate movie remover
|
||||
// @namespace Violentmonkey Scripts
|
||||
// @match https://r18.dev/videos/vod/movies/list/*
|
||||
// @grant none
|
||||
// @version 1.0
|
||||
// @author Lukáš Kucharczyk
|
||||
// @description Removes duplicate entries in the list of movies on r18.dev.
|
||||
// @downloadURL https://git.kucharczyk.xyz/lukas/userscripts/raw/branch/main/r18dev_remove_duplicates.user.js
|
||||
// @supportURL https://git.kucharczyk.xyz/lukas/userscripts
|
||||
// ==/UserScript==
|
||||
|
||||
function filterVideos() {
|
||||
// Select all .video containers
|
||||
const videos = document.querySelectorAll('.video');
|
||||
|
||||
// Regex to match "Letters-Numbers" (e.g., AAA-111)
|
||||
const regex = /[a-zA-Z]+-[0-9]+/;
|
||||
|
||||
videos.forEach(video => {
|
||||
const label = video.querySelector('.video-label');
|
||||
|
||||
// Safety check if label exists
|
||||
if (label) {
|
||||
const text = label.textContent.trim();
|
||||
const linkCount = label.querySelectorAll('a').length;
|
||||
|
||||
// Remove if text doesn't match pattern OR label has more than 1 link
|
||||
if (!regex.test(text) || linkCount > 1) {
|
||||
video.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Execute the function
|
||||
filterVideos();
|
||||
Reference in New Issue
Block a user