diff --git a/README.md b/README.md
index 8752b37..b98bbb3 100644
--- a/README.md
+++ b/README.md
@@ -39,4 +39,4 @@ You can open an issue and there you must describe the feedback, the bug or the n
See folder screenshots
to see screenshots also of the older versions.
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/css/style.css b/css/style.css
index 49b2d88..eac4278 100644
--- a/css/style.css
+++ b/css/style.css
@@ -37,6 +37,7 @@ body {
font-family: open-sans, sans-serif;
margin: 0px;
padding: 0px;
+ border-radius: 0px;
}
#popup-content {
@@ -68,7 +69,7 @@ body {
color: #ffffff;
}
-.section-boder-bottom {
+.section-border-bottom {
border-bottom: 1px solid #eeeeee;
}
@@ -278,11 +279,12 @@ textarea {
#all-websites-dedication-section {
background-color: #eeeeee;
padding: 5px;
- width: 70%;
+ width: 100%;
height: 100%;
margin-left: auto;
margin-right: auto;
overflow: auto;
+ border-radius: 0px;
}
.section, .sub-section, .section-empty {
@@ -406,6 +408,15 @@ tr:hover {
font-size: 13px;
}
+.button-delete {
+ min-width: 50px;
+}
+
+
+.padding-left-55-px {
+ padding-left: 55px;
+}
+
.small-button {
font-size: 12px;
height: 27px;
@@ -433,6 +444,7 @@ h2, th {
padding-left: 10px;
font-family: open-sans;
height: 35px;
+ white-space: nowrap;
}
th {
@@ -510,6 +522,10 @@ h3 {
float: right;
}
+.float-left {
+ float: left;
+}
+
.margin-right-5-px {
margin-right: 5px;
}
@@ -518,6 +534,14 @@ h3 {
margin-top: 5px;
}
+.margin-left-5-px {
+ margin-left: 5px;
+}
+
+.margin-left-minus-50-px {
+ margin-left: -50px;
+}
+
.overflow-auto {
overflow: auto;
}
diff --git a/js/all-websites.js b/js/all-websites.js
index a6c2b10..963dd57 100644
--- a/js/all-websites.js
+++ b/js/all-websites.js
@@ -47,15 +47,15 @@ function loadDataFromBrowser(generate_section = true) {
}
function deleteAllData() {
- let confirmationClearAllNotes = confirm("Are you sure you want to clear all notes?\nYou can cancel this process once started.");
- if (confirmationClearAllNotes) {
+ let confirmation = confirm("Are you sure you want to clear all data?\nYou can cancel this process once started.");
+ if (confirmation) {
let clearStorage = browser.storage.local.clear();
clearStorage.then(onCleared, onError);
}
}
function deleteAWebsite(url) {
- let confirmation = confirm("Are you sure you want to clear the selected notes?\nYou can cancel this process once started.");
+ let confirmation = confirm("Are you sure you want to clear the selected website (https://" + url + ") and the time spent on it?\nYou can cancel this process once started.");
if (confirmation) {
//delete the selected page
delete websites_json[url];
@@ -67,7 +67,7 @@ function deleteAWebsite(url) {
}
function onCleared() {
- //all notes clear || successful
+ //all websites clear || successful
loadDataFromBrowser(true);
}
@@ -165,12 +165,15 @@ function loadAllWebsites() {
}
all_dates = getAllDates(smallest_date, getToday());
+ all_dates.reverse();
let section = document.createElement("div");
section.classList.add("section", "overflow-auto", "no-padding");
+ section.id = "table-section";
let tableElement = document.createElement("table");
+ let tableTHeadElement = document.createElement("thead");
let tableRowElement = document.createElement("tr");
let tableHeaderElement = document.createElement("th");
@@ -192,8 +195,10 @@ function loadAllWebsites() {
tableRowElement.append(tableHeaderElement);
}
- tableElement.append(tableRowElement);
+ tableTHeadElement.append(tableRowElement);
+ tableElement.append(tableTHeadElement);
+ let tableTBodyElement = document.createElement("tbody");
for (let index in websites_json_by_domain) {
tableRowElement = document.createElement("tr");
@@ -206,8 +211,17 @@ function loadAllWebsites() {
browser.tabs.create({url: "https://" + current_website});
}
+ let buttonDelete = document.createElement("input");
+ buttonDelete.type = "button";
+ buttonDelete.value = "Delete";
+ buttonDelete.classList.add("button", "button-delete", "very-small-button", "float-left", "margin-left-minus-50-px", "margin-top-5-px", "text-align-center");
+ buttonDelete.onclick = function () {
+ deleteAWebsite(current_website);
+ }
+
let tableDataElement = document.createElement("td");
- tableDataElement.append(currentWebsiteElement);
+ tableDataElement.classList.add("padding-left-55-px");
+ tableDataElement.append(buttonDelete, currentWebsiteElement);
tableRowElement.append(tableDataElement);
let status_to_show = true;
@@ -265,8 +279,9 @@ function loadAllWebsites() {
tableRowElement.append(tableDataElement);
}
- tableElement.append(tableRowElement);
+ tableTBodyElement.append(tableRowElement);
}
+ tableElement.append(tableTBodyElement);
section.append(tableElement);
document.getElementById("all-websites-sections").append(section);
diff --git a/manifest.json b/manifest.json
index dd8d9b0..4c5b3f7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Limite",
- "version": "1.2",
+ "version": "1.2.1",
"description": "Check how much time you spend on each website every day.\nOptimise your productivity, your time and your life as well.\nDon't lose precious time!",
"icons": {
"16": "./img/icon-16.png",
diff --git a/popup.html b/popup.html
index aa542a6..02bbb29 100644
--- a/popup.html
+++ b/popup.html
@@ -32,8 +32,8 @@