Last active
July 1, 2023 04:49
-
-
Save shantanuo/ae0a41b1a13618f6cbc1df1906bca096 to your computer and use it in GitHub Desktop.
hide some users from "Recent Changes" page of Marathi wikipedia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and install TamperMonkey add-on for firefox or chrome: https://www.tampermonkey.net/ | |
# Add this user-script to hide the trusted users so that you can check new users | |
// ==UserScript== | |
// @name Hide usernames from the "Recent changes" page | |
// @version 0.1 | |
// @author double-beep | |
// @description test this | |
// @match https://mr.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:%E0%A4%85%E0%A4%B2%E0%A5%80%E0%A4%95%E0%A4%A1%E0%A5%80%E0%A4%B2_%E0%A4%AC%E0%A4%A6%E0%A4%B2* | |
// @match https://mr.wikisource.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:%E0%A4%85%E0%A4%B2%E0%A5%80%E0%A4%95%E0%A4%A1%E0%A5%80%E0%A4%B2_%E0%A4%AC%E0%A4%A6%E0%A4%B2* | |
// @require https://gist.githubusercontent.com/BrockA/2625891/raw/waitForKeyElements.js | |
// @require https://code.jquery.com/jquery-3.6.3.min.js | |
// | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=wikipedia.org | |
// @grant none | |
// ==/UserScript== | |
/* globals waitForKeyElements */ | |
(function() { | |
const hidelisted = ['अभय नातू', 'Khirid Harshad', 'InternetArchiveBot', 'Dharmadhyaksha', 'अमर राऊत', 'आर्या जोशी', 'Nitin.kunjir', 'संतोष गोरे', 'Dhondudagde', 'Komal Sambhudas', 'Sarikakalaskar21398', 'Pooja Jadhav', 'कल्पनाशक्ती', 'Priyanka Choudhari']; | |
waitForKeyElements('.special li', ([element]) => { | |
const userLink = element.querySelector('.mw-userlink'); | |
const username = userLink?.textContent.trim(); | |
if (!hidelisted.includes(username)) return; // not listed | |
element.style.display = 'none'; | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment