More bug fixes
This commit is contained in:
parent
9fac6c3762
commit
584aa370b1
@ -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
|
||||||
|
24
copyurl.js
24
copyurl.js
@ -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}`);
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@ -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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user