From d940a322bb3b986cdc9a91691f6c2e703d346c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 3 Dec 2025 09:40:01 +0100 Subject: [PATCH] r18dev_remove_duplicates.user.js: print number of removed elements --- r18dev_remove_duplicates.user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/r18dev_remove_duplicates.user.js b/r18dev_remove_duplicates.user.js index aba6087..5d0aec6 100644 --- a/r18dev_remove_duplicates.user.js +++ b/r18dev_remove_duplicates.user.js @@ -3,7 +3,7 @@ // @namespace Violentmonkey Scripts // @match https://r18.dev/videos/vod/movies/list/* // @grant none -// @version 1.0 +// @version 1.1 // @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 @@ -13,9 +13,11 @@ function filterVideos() { // Select all .video containers const videos = document.querySelectorAll('.video'); + console.log(`Found videos: ${videos.length}`) // Regex to match "Letters-Numbers" (e.g., AAA-111) const regex = /[a-zA-Z]+-[0-9]+/; + const removedCount = 0; videos.forEach(video => { const label = video.querySelector('.video-label'); @@ -28,9 +30,11 @@ function filterVideos() { // Remove if text doesn't match pattern OR label has more than 1 link if (!regex.test(text) || linkCount > 1) { video.remove(); + removedCount++ } } }); + console.log(`Removed videos: ${removedCount.length}`) } // Execute the function