diff --git a/app/pages/popup.html b/app/pages/popup.html index fb47ab1..697433c 100644 --- a/app/pages/popup.html +++ b/app/pages/popup.html @@ -70,6 +70,17 @@ +
+
+ +
+
+ +
+
diff --git a/app/scripts/shared.js b/app/scripts/shared.js index ba51da7..abe7a3e 100644 --- a/app/scripts/shared.js +++ b/app/scripts/shared.js @@ -1,15 +1,24 @@ /* Shared file with utilities and constants */ +/** + * Builds and sends css required to hide the element + * @param id {string} + * @return {string} + */ +const getCSSStyle = (id) => { + return `#dashboard .${id} { display: none; }`; +} // CSS Styles required to hide various feed items // Key names should match the checkbox id in the popup.html export const CSSStyles = { - releases: `#dashboard .release { display: none; }`, - stars: `#dashboard .watch_started { display: none; }`, - follows: `#dashboard .follow { display: none; }`, - forks: `#dashboard .fork { display: none; }`, - push: `#dashboard .push { display: none; }`, + releases: getCSSStyle('release'), + stars: getCSSStyle('watch_started'), + follows: getCSSStyle('follow'), + forks: getCSSStyle('fork'), + push: getCSSStyle('push'), + sponsors: getCSSStyle('sponsor') }; export const STORAGE_KEY = 'refinedGithubData';