summaryrefslogtreecommitdiff
path: root/popup/popup.js
diff options
context:
space:
mode:
authorsameerasw <[email protected]>2025-04-10 15:23:31 +0530
committersameerasw <[email protected]>2025-04-10 15:23:31 +0530
commit02950d3ba50e3db6ac4c4a3f61cec1117f933cde (patch)
tree828cdbb003bd94b0f2e850fc7297262281007b43 /popup/popup.js
parent3be3f2d5b07b3af1957fabad58be4863bc5b9ac1 (diff)
What's new button
Diffstat (limited to 'popup/popup.js')
-rw-r--r--popup/popup.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/popup/popup.js b/popup/popup.js
index 82fc942..8feac4d 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -20,6 +20,7 @@ new (class ExtensionPopup {
skipForceThemingList = [];
reloadButton = document.getElementById("reload");
modeIndicator = document.getElementById("mode-indicator");
+ whatsNewButton = document.getElementById("whats-new");
constructor() {
if (logging) console.log("Initializing ExtensionPopup");
@@ -54,6 +55,9 @@ new (class ExtensionPopup {
this.handleWhitelistModeChange.bind(this)
);
+ // Add event listener for the "What's New" button
+ this.whatsNewButton.addEventListener("click", this.openWhatsNew.bind(this));
+
// Add event listener for the data viewer button
document.getElementById("view-data")?.addEventListener("click", () => {
browser.tabs.create({
@@ -546,4 +550,11 @@ new (class ExtensionPopup {
this.siteToggleLabel.textContent = "Skip Forcing for this Site";
}
}
+
+ // Open the What's New page
+ openWhatsNew() {
+ browser.tabs.create({
+ url: "https://addons.mozilla.org/en-US/firefox/addon/zen-internet/versions/",
+ });
+ }
})();