Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Extension/Auto_Copy_Pro/Posters/1400x560.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/400 X 280.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/640x400 (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/640x400 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/640x400 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/640x400 (5).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/640x400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/Posters/920x680.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Extension/Auto_Copy_Pro/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This extension can copy text automatically. you just have to select the text.
1 change: 1 addition & 0 deletions Extension/Auto_Copy_Pro/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

13 changes: 13 additions & 0 deletions Extension/Auto_Copy_Pro/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
button {
height: 30px;
width: 30px;
outline: none;
margin: 10px;
border: none;
border-radius: 2px;
}

button.current {
box-shadow: 0 0 0 2px white,
0 0 0 4px black;
}
Binary file added Extension/Auto_Copy_Pro/images/notepad128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/images/notepad16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/images/notepad32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Extension/Auto_Copy_Pro/images/notepad48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions Extension/Auto_Copy_Pro/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Auto Copy Pro",
"description": "Automatically copy selected text from any website to your clipboard!",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"css": ["script.css"],
"js": ["script.js"]
}
],

"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "/images/notepad16.png",
"32": "/images/notepad32.png",
"48": "/images/notepad48.png",
"128": "/images/notepad128.png"
}
},
"icons": {
"16": "/images/notepad16.png",
"32": "/images/notepad32.png",
"48": "/images/notepad48.png",
"128": "/images/notepad128.png"
},
"options_page": "options.html"
}
13 changes: 13 additions & 0 deletions Extension/Auto_Copy_Pro/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>

<head>
<link rel="stylesheet" href="button.css">
</head>

<body>
<h1>Features coming soon!</h1>
</body>
<script src="options.js"></script>

</html>
Empty file.
17 changes: 17 additions & 0 deletions Extension/Auto_Copy_Pro/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auto Copy</title>
</head>

<body>
<h1>New Features coming soon!</h1>

<script src="popup.js"></script>
</body>

</html>
Empty file.
24 changes: 24 additions & 0 deletions Extension/Auto_Copy_Pro/script.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.auto--copy {
display: block;
position: fixed;
bottom: 2.5rem;
right: 2.5rem;
z-index: 100000002;

/* button transition-property; */
color: #000000;
font-family: Helvetica, sans-serif;
/* transform: skewX(-9deg); */

font-size: 12.8px;
font-weight: 800;
text-align: center;
text-decoration: none;
background-color: #ffffff;
/* padding: 0.2rem 0.4rem; */
padding: 3.2px 6.4px;
border: 1.2px solid #b3b3b3;
border-radius: 2px;

box-shadow: 2.8px 2.8px #fa9f17;
}
53 changes: 53 additions & 0 deletions Extension/Auto_Copy_Pro/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//create copyText div
let div = document.createElement('div');

const button = function () {
div.innerHTML = 'Auto Copy ⭐';
div.classList.add('auto--copy');
document.body.appendChild(div);
const box = document.querySelector('.auto--copy');

setTimeout(() => {
box && box.remove();
}, 1000);
};

//copy selected text to clipboard
const updateClipboard = function (text) {
navigator.clipboard
.writeText(text)

.then(
(Response) => {
//remove child alertBox
console.log(Response);
},
(err) => {
/* clipboard write failed */
console.log(err);
}
)
.catch((err) => {
console.log(err);
});
};

//select text
const selectText = function () {
//copy selected text to a variable
let text = '';
if (window.getSelection) {
text = window.getSelection().toString();
} else if (document.selection && document.selection.type != 'Control') {
text = document.selection.createRange().text;
}

//calling the updateClipboard() and button() function
if (text.length > 0 && text !== undefined && text != '\n' && text != '') {
updateClipboard(text);
button();
}
};

document.addEventListener('select', selectText);
document.addEventListener('mouseup', selectText);