Implement a copyurl.js file
This commit is contained in:
parent
ef98982be9
commit
5d786fa5b5
@ -1,4 +1,7 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
## 0.0.1
|
## 0.0.2
|
||||||
- Alpha release.
|
# Alpha release
|
||||||
- Added the starter functionality.
|
|
||||||
|
- 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
5
copyurl.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const url = window.location.href;
|
||||||
|
const clipboard = navigator.clipboard;
|
||||||
|
clipboard.writeText(url);
|
||||||
|
|
||||||
|
console.log(`Wrote URL: ${url}`);
|
13
main.html
13
main.html
@ -1,5 +1,16 @@
|
|||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="style.css" />
|
||||||
|
</head>
|
||||||
<body>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user