Created
April 22, 2021 22:48
-
-
Save inxomnyaa/c3b79a816d380fb747fa46f58e3c6ce3 to your computer and use it in GitHub Desktop.
Disable ping on reply in Discord (PWA)
This file contains hidden or 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
// ==UserScript== | |
// @name autounping | |
// @namespace Violentmonkey Scripts | |
// @match *://discord.com/* | |
// @grant none | |
// @version 1.1 | |
// @author - | |
// @description 4/21/2021, 6:00:42 PM | |
// @noframes | |
// ==/UserScript== | |
/* jshint esversion: 6 */ | |
(function() { | |
'use strict'; | |
var skipper = setInterval(function() { | |
let mentionButtons = document.querySelectorAll('[aria-label="Mention"]'); | |
if(mentionButtons.length > 0) { | |
let grandparent = mentionButtons[0].parentNode.parentNode; | |
let didManuallyClick = (grandparent.getAttribute('aria-checked') != null && grandparent.getAttribute('aria-checked') == 'false'); | |
if (grandparent && !didManuallyClick) { | |
console.log('unpinging'); | |
grandparent.click(); | |
} | |
} | |
}, 500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment