Mercurial > ec-userscripts
diff medium-popup-disable.user.js @ 117:d9dc190bccaf
Undo combining fixes into single script per site
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 15 Jan 2023 23:49:35 +0900 |
parents | ef21ef445fc6 |
children | 8de2d53a4cb1 |
line wrap: on
line diff
--- a/medium-popup-disable.user.js Sun Jan 15 23:46:56 2023 +0900 +++ b/medium-popup-disable.user.js Sun Jan 15 23:49:35 2023 +0900 @@ -14,15 +14,11 @@ 'use strict'; -function removeHighlightPopup () { - 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); -} - -removeHighlightPopup(); +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);