From c24872a57cbc246a8924c4f8cad07f14675d1a64 Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 30 Apr 2021 13:02:29 +0200 Subject: [PATCH] Damn linting --- content/install-hook-userstylesworld.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/content/install-hook-userstylesworld.js b/content/install-hook-userstylesworld.js index a8dbd67d..9f38a0bc 100644 --- a/content/install-hook-userstylesworld.js +++ b/content/install-hook-userstylesworld.js @@ -1,19 +1,18 @@ -/* global API */// msg.js 'use strict'; (() => { function watchForStylusButton() { // Use 1 function so we won't have duplicate code around. - const stylusQuery = () => document.querySelector("a#stylus"); + const stylusQuery = () => document.querySelector('a#stylus'); if (!stylusQuery()) { - const stylusButtonObserver = new MutationObserver(() => { - if (stylusQuery()) { - stylusButtonObserver.disconnect(); - stylusQuery().remove(); - } - }); - stylusButtonObserver.observe(document.body, {childList: true, subtree: true}); + const stylusButtonObserver = new MutationObserver(() => { + if (stylusQuery()) { + stylusButtonObserver.disconnect(); + stylusQuery().remove(); + } + }); + stylusButtonObserver.observe(document.body, {childList: true, subtree: true}); } else { stylusQuery().remove(); } @@ -37,5 +36,5 @@ } else { watchForStylusButton(); } - -})() + +})();