From 5195b84ecc1e7d2e254f8099d3043d75b0d63189 Mon Sep 17 00:00:00 2001 From: Lasse Boisen Andersen Date: Thu, 3 Dec 2015 23:23:37 +0100 Subject: [PATCH] fixes bug with button being injected on non-board pages --- README.md | 4 ++-- content-scripts.js | 5 +++-- manifest.json | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ff3ca0e..40727fd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Trello BirdsEye +# Trello Birds-eye View -> Chrome Extension for minimal board styling giving you a birds-eye view in Trello +> Chrome Extension for minimalistic board/card styling giving you a birds-eye view in Trello ![Before & after](images/screenshot-comparison.gif) diff --git a/content-scripts.js b/content-scripts.js index 84ee7c8..73579cb 100644 --- a/content-scripts.js +++ b/content-scripts.js @@ -41,8 +41,9 @@ function clickButton() { // Checks whether the button element is present - if not (user switched page/board), then init function shouldInit(event) { - var buttonTarget = document.getElementsByClassName('birdseye-button'); - if (buttonTarget.length === 0) { + var buttonTarget = document.getElementsByClassName('board-header-btns mod-right'); + var buttonContainer = document.getElementsByClassName('birdseye-button'); + if (buttonTarget.length !== 0 && buttonContainer.length === 0) { initApplication(); } } diff --git a/manifest.json b/manifest.json index 9abd05a..793aef4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "manifest_version": 2, - "name": "Trello BirdsEye", + "name": "Trello Birds-eye", "short_name": "trello-birdseye", "description": "Minimalize the Trello board interface for better overview", - "version": "1.0.0", + "version": "1.0.1", "icons": { "16": "images/icon-16.png", "48": "images/icon-48.png",