Added close Button, removed activeTab permission, updated description and version bump

This commit is contained in:
Nilesh 2020-08-11 01:24:45 +05:30
parent 3d4bdaefef
commit 6b7e95d273
2 changed files with 14 additions and 6 deletions

View File

@ -70,14 +70,22 @@ function showBetter(match) {
}
let dismissButton = document.createElement("button");
dismissButton.innerHTML = "✗ Dismiss suggestion for this URL";
dismissButton.setAttribute("style", "display: block; font-size: 14px; margin: 16px auto;");
dismissButton.innerHTML = "✗ Do not show suggestion for this URL";
dismissButton.setAttribute("style", "display: block; font-size: 14px; margin: 16px auto; cursor:pointer;");
dismissButton.addEventListener("click", () => {
document.body.removeChild(betterdiv);
dismissPermanently(match);
})
betterdiv.appendChild(dismissButton);
let closeButton = document.createElement("button");
closeButton.innerText = "❌";
closeButton.setAttribute("style", "position: absolute; top: -10px; right: -10px; cursor:pointer; background-color: white; border-radius: 15px; border: thin solid #aaa;");
closeButton.addEventListener("click", () => {
document.body.removeChild(betterdiv);
})
betterdiv.appendChild(closeButton);
document.body.appendChild(betterdiv);
}

View File

@ -1,6 +1,6 @@
{
"name": "Better",
"version": "0.0.1",
"version": "0.1.0",
"icons": {
"48": "images/48.png",
"128": "images/128.png"
@ -10,8 +10,8 @@
"id": "{02d8a7bd-79ba-4808-8e11-f3e19af43f90}"
}
},
"description": "Find better products & services than the one you're currently visiting",
"permissions": ["activeTab", "storage"],
"description": "This extension looks at your current URL, and recommends BETTER product/service alternatives via an in-page pop-up. BETTER could mean ethical / privacy-conscious / secure / local / cheaper / high-quality etc. The extension ships with a default list of recommendations but you can subscribe to lists maintained by others. This allows different interpretations of BETTER to exist and you can subscribe to those that appeals to your preferences the most.",
"permissions": ["storage"],
"background": {
"scripts": ["background.js"],
"persistent": false