mirror of
https://github.com/nileshtrivedi/better
synced 2025-06-27 09:03:11 +02:00
Added close Button, removed activeTab permission, updated description and version bump
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user