diff --git a/README.md b/README.md index 1461915..d77c136 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ Swift Cookie Wipe extension for Chrome browser +## Release Notes + +You can find the release notes for the extension [here](./ReleaseNotes.md) ## Installation @@ -21,7 +24,7 @@ Swift Cookie Wipe extension for Chrome browser ## License -[Lisense](./LICENSE) +[License](./LICENSE) ## Privacy Policy diff --git a/ReleaseNotes.md b/ReleaseNotes.md new file mode 100644 index 0000000..132bc3c --- /dev/null +++ b/ReleaseNotes.md @@ -0,0 +1,14 @@ +# SwiftWipe Release Notes + +## Version 1.1 + +- Confirmation dialog added to the "Clear Site Data" button +- Format button color + + +## Version 1.0 + +- Initial release +- Added "Clear Site Data" button to delete all cookies from the current website +- Multilingual support: English, Hungarian + diff --git a/_locales/en/messages.json b/_locales/en/messages.json index fd8e2a7..ce80bd2 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -7,6 +7,18 @@ }, "clearDataButton": { "message": "Clear Site Data" + }, + "confirmationMessage" : { + "message": "Are you sure you want to delete cookies for this site?" + }, + "clearSuccess":{ + "message": "Cookies has been deleted successfully" + }, + "clearFailure": { + "message": "An error occurred while deleting" + }, + "clearAbort": { + "message": "Deletion aborted" } } \ No newline at end of file diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json index 5b46389..3da2da8 100644 --- a/_locales/hu/messages.json +++ b/_locales/hu/messages.json @@ -7,6 +7,17 @@ }, "clearDataButton": { "message": "Weboldal adatainak törlése" + }, + "confirmationMessage" : { + "message": "Biztosan törölni szeretné az oldalhoz tartozó sütiket?" + }, + "clearSuccess":{ + "message": "Sütik sikeresen törölve" + }, + "clearFailure": { + "message": "Hiba történt a törlés során!" + }, + "clearAbort": { + "message": "A törlés megszakítva." } - } \ No newline at end of file diff --git a/background.js b/background.js index fbb876b..f4e8f1d 100644 --- a/background.js +++ b/background.js @@ -1,5 +1,4 @@ chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { - console.log("Üzenet érkezett a popup-tól:", request); if (request.action === "clearData") { chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { const tab = tabs[0]; diff --git a/manifest.json b/manifest.json index a2586c0..6ccb1b3 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "__MSG_extensionName__", "description": "__MSG_extensionDescription__", - "version": "1.0", + "version": "1.1", "default_locale": "en", "permissions": ["cookies", "activeTab", "scripting"], "host_permissions": [""], diff --git a/popup.html b/popup.html index bc14368..4cd1f7f 100644 --- a/popup.html +++ b/popup.html @@ -2,13 +2,14 @@ - ClearData + SwiftWipe
logo -

Swift Wipe ()

- +

Swift Wipe  ()

+

diff --git a/popup.js b/popup.js index 50e985a..085dd3f 100644 --- a/popup.js +++ b/popup.js @@ -1,4 +1,8 @@ document.addEventListener('DOMContentLoaded', function () { + // Version + var manifest = chrome.runtime.getManifest(); + document.getElementById('extensionVersion').textContent = manifest.version; + // Translation document.querySelectorAll('[data-i18n]').forEach(function (elem) { let msg = elem.getAttribute('data-i18n'); @@ -7,7 +11,14 @@ document.addEventListener('DOMContentLoaded', function () { // Event document.getElementById('clearData').addEventListener('click', function () { - chrome.runtime.sendMessage({ action: "clearData" }); + var confirmAction = confirm(chrome.i18n.getMessage("confirmationMessage")); + if (confirmAction) { + chrome.runtime.sendMessage({ action: "clearData" }, function (response) { + alert(chrome.i18n.getMessage("clearSuccess")); + }); + } else { + alert(chrome.i18n.getMessage("clearAbort")); + } }); });