Mercurial > ec-userscripts
changeset 130:49658e99888a
[medium] update class name and use document level styling instead
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 26 Feb 2023 20:09:37 +0900 |
parents | dc960ef1248b |
children | 77c5ac0ae047 |
files | medium-popup-disable.user.js |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/medium-popup-disable.user.js Tue Feb 07 21:51:34 2023 +0900 +++ b/medium-popup-disable.user.js Sun Feb 26 20:09:37 2023 +0900 @@ -1,24 +1,22 @@ // ==UserScript== // @name Medium popup disable // @namespace https://nanaya.net -// @version 1.0.7 +// @version 1.1.0 // @description Strip out Medium's highlighting popup "feature" // @author nanaya // @match https://medium.com/* // @match https://blog.medium.com/* // @match https://m.signalvnoise.com/* // @match https://hackernoon.com/* -// @grant none +// @grant GM_addStyle // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/medium-popup-disable.user.js // ==/UserScript== 'use strict'; -const popups = document.getElementsByClassName('highlightMenu'); -const killPopup = function (popup) { - popup.style.display = 'none'; -}; -const killPopups = function () { - Array.prototype.forEach.call(popups, killPopup); -}; -document.addEventListener('click', killPopups); +/* global GM_addStyle */ +GM_addStyle(` + [data-popper-reference-hidden] { + display: none !important; + } +`);