Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
- Fixed some bugs
- Increased the width of the "all spent time" page
- Added "delete" button for each website
- New screenshots
  • Loading branch information
Sav22999 committed Aug 3, 2021
1 parent 2b3d3e4 commit 35eed0d
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ You can open an issue and there you must describe the feedback, the bug or the n

See folder <code>screenshots</code> to see screenshots also of the older versions.

<img src="screenshots/1.0/1.png" width="400px"></img>
<img src="screenshots/1.2/1.png" width="400px"></img><img src="screenshots/1.2/2.png" width="400px"></img><img src="screenshots/1.2/3.png" width="400px"></img>
27 changes: 25 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ body {
font-family: open-sans, sans-serif;
margin: 0px;
padding: 0px;
border-radius: 0px;
}

#popup-content {
Expand Down Expand Up @@ -68,7 +69,7 @@ body {
color: #ffffff;
}

.section-boder-bottom {
.section-border-bottom {
border-bottom: 1px solid #eeeeee;
}

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -511,6 +522,10 @@ h3 {
float: right;
}

.float-left {
float: left;
}

.margin-right-5-px {
margin-right: 5px;
}
Expand All @@ -519,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;
}
Expand Down
19 changes: 14 additions & 5 deletions js/all-websites.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -67,7 +67,7 @@ function deleteAWebsite(url) {
}

function onCleared() {
//all notes clear || successful
//all websites clear || successful
loadDataFromBrowser(true);
}

Expand Down Expand Up @@ -211,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;
Expand Down
4 changes: 2 additions & 2 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
</div>
</div>
<div id="open-all-websites"
class="section-popup no-border-radius background-primary section-link section-boder-bottom">
See more details
class="section-popup no-border-radius background-primary section-link section-border-bottom">
See all spent time
</div>
<div id="buy-me-a-coffee-section" class="section-popup border-radius-bottom background-primary section-link">
☕ Buy me a coffee on PayPal
Expand Down
Binary file added screenshots/1.2/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/1.2/1.xcf
Binary file not shown.
Binary file added screenshots/1.2/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/1.2/2.xcf
Binary file not shown.
Binary file added screenshots/1.2/3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/1.2/3.xcf
Binary file not shown.

0 comments on commit 35eed0d

Please sign in to comment.