Skip to content

Commit

Permalink
1.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniopelusi committed Jan 8, 2025
1 parent 9b97a64 commit b3662d0
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 59 deletions.
Binary file modified assets/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 15 additions & 5 deletions assets/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,21 @@ const initializeLinks = () => {
input1.focus();

const saveInput = (status) => {
let newText1 = "";
let newText2 = "";
if (status === 0) {
newText1 = input1.value.trim().toLowerCase();
newText2 = input2.value.trim();
const newText1 = status === 0 ? input1.value.trim().toLowerCase() : "";
const newText2 = status === 0 ? input2.value.trim() : "";

if (newText1 === currentText1 && newText2 === currentText2) {
container.replaceWith(button);
return;
}

if (
currentText1 === "" &&
currentText2 === "" &&
(input1.value.trim().toLowerCase() === "" || input2.value.trim() === "")
) {
container.replaceWith(button);
return;
}

if (newText1 === "" || newText2 === "") {
Expand Down
34 changes: 0 additions & 34 deletions background.js

This file was deleted.

61 changes: 58 additions & 3 deletions extension-popup/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
body {
font-family: "Ubuntu Mono";
font-weight: bold;
display: flex;
font-size: 15px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: auto;
Expand All @@ -35,7 +36,61 @@ body {
color: var(--text);
padding: 10px;
overflow: hidden;
flex-direction: column;
gap: 15px;
transition: background-color 0.3s ease;
}

#dynamicBackgroundCheckbox {
margin-top: 4px !important;
appearance: none;
background-color: #dfe1e4;
border-radius: 72px;
border-style: none;
flex-shrink: 0;
height: 20px;
margin: 0;
position: relative;
width: 30px;
}

#dynamicBackgroundCheckbox::before {
bottom: -6px;
content: "";
left: -6px;
position: absolute;
right: -6px;
top: -6px;
}

#dynamicBackgroundCheckbox,
#dynamicBackgroundCheckbox::after {
transition: all 100ms ease-out;
}

#dynamicBackgroundCheckbox::after {
background-color: #fff;
border-radius: 50%;
content: "";
height: 14px;
left: 3px;
position: absolute;
top: 3px;
width: 14px;
}

#dynamicBackgroundCheckbox:hover {
background-color: #c9cbcd;
transition-duration: 0s;
}

#dynamicBackgroundCheckbox:checked {
background-color: #7790e1;
}

#dynamicBackgroundCheckbox:checked:hover {
background-color: #5a78db;
}

#dynamicBackgroundCheckbox:checked::after {
background-color: #fff;
left: 13px;
}
6 changes: 2 additions & 4 deletions extension-popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<label
>Enable Dynamic Background
<input type="checkbox" id="dynamicBackgroundCheckbox" />
</label>
<label>Enable Dynamic Background </label>
<input id="dynamicBackgroundCheckbox" type="checkbox" />
<script src="popup.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@
</div>
</div>
</body>
<script src="assets/scripts.js"></script>
</html>
<script language="JavaScript" type="text/javascript" src="assets/scripts.js"></script>
</html>
15 changes: 4 additions & 11 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"manifest_version": 3,
"name": "ToolsTab",
"version": "1.0",
"version": "1.1",
"description": "Minimal and responsive browser startpage with useful tools.",
"chrome_url_overrides": {
"newtab": "index.html"
},
"permissions": ["storage", "activeTab", "tabs"],
"host_permissions": ["<all_urls>"],
"background": {
"scripts": ["background.js"]
"chrome_settings_overrides": {
"homepage": "index.html"
},
"permissions": ["browserSettings"],
"action": {
"default_popup": "extension-popup/popup.html",
"default_icon": {
Expand All @@ -20,12 +19,6 @@
"icons": {
"128": "assets/icons/icon.png"
},
"web_accessible_resources": [
{
"resources": ["index.html"],
"matches": ["<all_urls>"]
}
],
"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
Expand Down

0 comments on commit b3662d0

Please sign in to comment.