summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsameerasw <[email protected]>2025-02-27 11:46:57 +0530
committersameerasw <[email protected]>2025-02-27 11:46:57 +0530
commit3f1bf3b9d31d5adc175ae5a5c736985968f3c5a6 (patch)
treea363c07f7e5d09b1decef9a78a9c19e0aacaf9df
parent4d9e41e4faabe4424636a247815b865b8b6c44d5 (diff)
Added request theme button for missing websites which directly creates a new github issue.
-rw-r--r--manifest.json2
-rw-r--r--popup/popup.js13
2 files changed, 11 insertions, 4 deletions
diff --git a/manifest.json b/manifest.json
index 733eaa6..fa7aa43 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Zen Internet",
- "version": "1.2.0",
+ "version": "1.2.1",
"description": "Inject custom css from my repository in real time",
"browser_specific_settings": {
"gecko": {
diff --git a/popup/popup.js b/popup/popup.js
index a444060..da8b093 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -119,8 +119,15 @@ new (class ExtensionPopup {
);
if (!currentSiteKey) {
- this.currentSiteFeatures.innerHTML =
- "<div class='feature-toggle'>No styles available for this site.</div>";
+ const requestThemeButton = document.createElement("button");
+ requestThemeButton.className = "action-button primary";
+ requestThemeButton.innerHTML = `Request Theme for ${this.currentSiteHostname}`;
+ requestThemeButton.addEventListener("click", () => {
+ const issueUrl = `https://github.com/sameerasw/my-internet/issues/new?template=website-theme-request.md&title=[THEME] ${this.currentSiteHostname}&body=Please add a theme for ${this.currentSiteHostname}`;
+ window.open(issueUrl, "_blank");
+ });
+
+ this.currentSiteFeatures.appendChild(requestThemeButton);
return;
}
@@ -308,7 +315,7 @@ new (class ExtensionPopup {
"addon-version"
).textContent = `Version: ${version}`;
}
-
+
setupAutoUpdate() {
if (this.autoUpdateSwitch.checked) {
browser.runtime.sendMessage({ action: "enableAutoUpdate" });