summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsameerasw <[email protected]>2025-02-27 13:29:11 +0530
committersameerasw <[email protected]>2025-02-27 13:29:11 +0530
commita950299b28662029b86b61b4e9d6d5821d06912c (patch)
treedae8344e98048f3730d2f462bcb6e2553b1deae0
parent3f1bf3b9d31d5adc175ae5a5c736985968f3c5a6 (diff)
hide the feature name prefixes
-rw-r--r--manifest.json2
-rw-r--r--popup/popup.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index fa7aa43..1c89cd4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Zen Internet",
- "version": "1.2.1",
+ "version": "1.2.2",
"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 da8b093..4494916 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -133,6 +133,9 @@ new (class ExtensionPopup {
const features = styles[currentSiteKey];
for (const [feature, css] of Object.entries(features)) {
+ const displayFeatureName = feature.includes("-")
+ ? feature.split("-")[1]
+ : feature;
const isChecked =
this.browserStorageSettings.featureSettings?.[currentSiteKey]?.[
feature
@@ -141,7 +144,7 @@ new (class ExtensionPopup {
const featureToggle = document.createElement("div");
featureToggle.className = "feature-toggle";
featureToggle.innerHTML = `
- <span class="feature-name">${feature}</span>
+ <span class="feature-name">${displayFeatureName}</span>
<label class="toggle-switch">
<input type="checkbox" name="${currentSiteKey}|${feature}" ${
isChecked ? "checked" : ""