From 69896c8c92aae688c34bc71e5b1078b06eed11e0 Mon Sep 17 00:00:00 2001 From: Lukasz Pakula Date: Mon, 22 Aug 2022 08:32:06 +0100 Subject: [PATCH] Fix duplicated star toggle --- dist/manifest.json | 6 +++--- src/content.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/manifest.json b/dist/manifest.json index 621bff6..7fb6396 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1,6 +1,6 @@ { - "name": "inboxy: Inbox Bundles for Gmail", - "version": "1.6.2", + "name": "inboxy: Inbox Bundles for Gmail (Unofficial)", + "version": "0.0.10", "description": "Adds Google Inbox bundles to Gmail", "homepage_url": "https://www.inboxymail.com", "background": { @@ -44,4 +44,4 @@ } ], "manifest_version": 3 -} \ No newline at end of file +} diff --git a/src/content.js b/src/content.js index 8ae51e1..f613bc0 100644 --- a/src/content.js +++ b/src/content.js @@ -205,7 +205,8 @@ function startObservers() { function addPinnedToggle() { const searchForm = document.querySelector(Selectors.SEARCH_FORM).parentNode; - searchForm.appendChild((new PinnedToggle()).create()); + let toggle = searchForm.querySelectorAll('.pinned-toggle') + if(!toggle.length) searchForm.appendChild((new PinnedToggle()).create()); } function hideBulkActionButtonsIfNecessary() {