Implement a copyurl.js file

This commit is contained in:
TropiiDev 2025-03-05 13:45:41 -05:00
parent ef98982be9
commit 5d786fa5b5
4 changed files with 26 additions and 4 deletions

View File

@ -1,4 +1,7 @@
## Changelog
## 0.0.1
- Alpha release.
- Added the starter functionality.
## 0.0.2
# Alpha release
- Added a copyurl.js file to copy the url.
- Added a css style. will be updated more later.
- Updated the main.html file to make the extension look better.

5
copyurl.js Normal file
View File

@ -0,0 +1,5 @@
const url = window.location.href;
const clipboard = navigator.clipboard;
clipboard.writeText(url);
console.log(`Wrote URL: ${url}`);

View File

@ -1,5 +1,16 @@
<html>
<head>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Copy URL</h1>
<h3>Copy the current url</h3>
<p>
The current URL was copied when you opened this extension. Thank
you!
</p>
<p>Made with love by Tropii.</p>
<a href="https://fstropii.com" target="_blank">Website</a>
<script src="copyurl.js"></script>
</body>
</html>

3
style.css Normal file
View File

@ -0,0 +1,3 @@
* {
background-color: gray;
}