More bug fixes

This commit is contained in:
TropiiDev 2025-03-05 14:08:54 -05:00
parent 9fac6c3762
commit 584aa370b1
4 changed files with 32 additions and 14 deletions

View File

@ -1,5 +1,7 @@
## Changelog ## Changelog
## 0.0.4 ## 0.0.5
# Alpha release # Alpha release
- Updated the copyurl.js file to fix the error - Update the manifest.json file to include a shortcut keybind.
- Update the copyurl.js file to copy the url based on the shortcut
- Update the style.css file to add a larger width, and some color other than gray and black

View File

@ -1,11 +1,13 @@
const url = window.location.href; chrome.commands.onCommand.addListener(function (command) {
navigator.clipboard.writeText(url).then( if (command === "Copy URL") {
function () { const url = window.location.href;
console.log(`Copied URL: ${url}`); navigator.clipboard.writeText(url).then(
}, function () {
function (err) { console.log(`Copied URL: ${url}`);
console.error(`Something went wrong..`, err); },
}, function (err) {
); console.error(`Something went wrong..`, err);
},
console.log(`Wrote URL: ${url}`); );
}
});

View File

@ -9,5 +9,13 @@
}, },
"background": { "background": {
"service_worker": "copyurl.js" "service_worker": "copyurl.js"
},
"commands": {
"Copy URL": {
"suggested_key": {
"default": "Ctrl+Shift+C"
},
"description": "Copy the URL of the current tab"
}
} }
} }

View File

@ -1,4 +1,10 @@
* { * {
background-color: gray; background-color: gray;
width: 100px; width: 200px;
}
h3,
p,
a {
color: white;
} }