Skip to content

Instantly share code, notes, and snippets.

@inxomnyaa
Created April 22, 2021 22:48
Show Gist options
  • Save inxomnyaa/c3b79a816d380fb747fa46f58e3c6ce3 to your computer and use it in GitHub Desktop.
Save inxomnyaa/c3b79a816d380fb747fa46f58e3c6ce3 to your computer and use it in GitHub Desktop.
Disable ping on reply in Discord (PWA)
// ==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