comparison 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
comparison
equal deleted inserted replaced
116:0e108a9dc6d7 117:d9dc190bccaf
12 // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/medium-popup-disable.user.js 12 // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/medium-popup-disable.user.js
13 // ==/UserScript== 13 // ==/UserScript==
14 14
15 'use strict'; 15 'use strict';
16 16
17 function removeHighlightPopup () { 17 const popups = document.getElementsByClassName('highlightMenu');
18 const popups = document.getElementsByClassName('highlightMenu'); 18 const killPopup = function (popup) {
19 const killPopup = function (popup) { 19 popup.style.display = 'none';
20 popup.style.display = 'none'; 20 };
21 }; 21 const killPopups = function () {
22 const killPopups = function () { 22 Array.prototype.forEach.call(popups, killPopup);
23 Array.prototype.forEach.call(popups, killPopup); 23 };
24 }; 24 document.addEventListener('click', killPopups);
25 document.addEventListener('click', killPopups);
26 }
27
28 removeHighlightPopup();