diff --git a/Extension/Auto_Copy_Pro/Posters/1400x560.png b/Extension/Auto_Copy_Pro/Posters/1400x560.png new file mode 100644 index 0000000..cdc7b1c Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/1400x560.png differ diff --git a/Extension/Auto_Copy_Pro/Posters/400 X 280.png b/Extension/Auto_Copy_Pro/Posters/400 X 280.png new file mode 100644 index 0000000..010d81f Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/400 X 280.png differ diff --git a/Extension/Auto_Copy_Pro/Posters/640x400 (2).png b/Extension/Auto_Copy_Pro/Posters/640x400 (2).png new file mode 100644 index 0000000..c036510 Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/640x400 (2).png differ diff --git a/Extension/Auto_Copy_Pro/Posters/640x400 (3).png b/Extension/Auto_Copy_Pro/Posters/640x400 (3).png new file mode 100644 index 0000000..ba3fc64 Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/640x400 (3).png differ diff --git a/Extension/Auto_Copy_Pro/Posters/640x400 (4).png b/Extension/Auto_Copy_Pro/Posters/640x400 (4).png new file mode 100644 index 0000000..8e91b51 Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/640x400 (4).png differ diff --git a/Extension/Auto_Copy_Pro/Posters/640x400 (5).png b/Extension/Auto_Copy_Pro/Posters/640x400 (5).png new file mode 100644 index 0000000..418c795 Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/640x400 (5).png differ diff --git a/Extension/Auto_Copy_Pro/Posters/640x400.png b/Extension/Auto_Copy_Pro/Posters/640x400.png new file mode 100644 index 0000000..93dd41d Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/640x400.png differ diff --git a/Extension/Auto_Copy_Pro/Posters/920x680.png b/Extension/Auto_Copy_Pro/Posters/920x680.png new file mode 100644 index 0000000..7b8ca17 Binary files /dev/null and b/Extension/Auto_Copy_Pro/Posters/920x680.png differ diff --git a/Extension/Auto_Copy_Pro/README.txt b/Extension/Auto_Copy_Pro/README.txt new file mode 100644 index 0000000..277fce1 --- /dev/null +++ b/Extension/Auto_Copy_Pro/README.txt @@ -0,0 +1 @@ +This extension can copy text automatically. you just have to select the text. \ No newline at end of file diff --git a/Extension/Auto_Copy_Pro/background.js b/Extension/Auto_Copy_Pro/background.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Extension/Auto_Copy_Pro/background.js @@ -0,0 +1 @@ + diff --git a/Extension/Auto_Copy_Pro/button.css b/Extension/Auto_Copy_Pro/button.css new file mode 100644 index 0000000..66b2a79 --- /dev/null +++ b/Extension/Auto_Copy_Pro/button.css @@ -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; +} \ No newline at end of file diff --git a/Extension/Auto_Copy_Pro/images/notepad128.png b/Extension/Auto_Copy_Pro/images/notepad128.png new file mode 100644 index 0000000..e5facd7 Binary files /dev/null and b/Extension/Auto_Copy_Pro/images/notepad128.png differ diff --git a/Extension/Auto_Copy_Pro/images/notepad16.png b/Extension/Auto_Copy_Pro/images/notepad16.png new file mode 100644 index 0000000..bb6447d Binary files /dev/null and b/Extension/Auto_Copy_Pro/images/notepad16.png differ diff --git a/Extension/Auto_Copy_Pro/images/notepad32.png b/Extension/Auto_Copy_Pro/images/notepad32.png new file mode 100644 index 0000000..c00d1e6 Binary files /dev/null and b/Extension/Auto_Copy_Pro/images/notepad32.png differ diff --git a/Extension/Auto_Copy_Pro/images/notepad48.png b/Extension/Auto_Copy_Pro/images/notepad48.png new file mode 100644 index 0000000..4b35523 Binary files /dev/null and b/Extension/Auto_Copy_Pro/images/notepad48.png differ diff --git a/Extension/Auto_Copy_Pro/manifest.json b/Extension/Auto_Copy_Pro/manifest.json new file mode 100644 index 0000000..e35e4c2 --- /dev/null +++ b/Extension/Auto_Copy_Pro/manifest.json @@ -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": [""], + "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" +} diff --git a/Extension/Auto_Copy_Pro/options.html b/Extension/Auto_Copy_Pro/options.html new file mode 100644 index 0000000..6d8e842 --- /dev/null +++ b/Extension/Auto_Copy_Pro/options.html @@ -0,0 +1,13 @@ + + + + + + + + +

Features coming soon!

+ + + + \ No newline at end of file diff --git a/Extension/Auto_Copy_Pro/options.js b/Extension/Auto_Copy_Pro/options.js new file mode 100644 index 0000000..e69de29 diff --git a/Extension/Auto_Copy_Pro/popup.html b/Extension/Auto_Copy_Pro/popup.html new file mode 100644 index 0000000..1d58559 --- /dev/null +++ b/Extension/Auto_Copy_Pro/popup.html @@ -0,0 +1,17 @@ + + + + + + + + Auto Copy + + + +

New Features coming soon!

+ + + + + \ No newline at end of file diff --git a/Extension/Auto_Copy_Pro/popup.js b/Extension/Auto_Copy_Pro/popup.js new file mode 100644 index 0000000..e69de29 diff --git a/Extension/Auto_Copy_Pro/script.css b/Extension/Auto_Copy_Pro/script.css new file mode 100644 index 0000000..8f70db2 --- /dev/null +++ b/Extension/Auto_Copy_Pro/script.css @@ -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; +} diff --git a/Extension/Auto_Copy_Pro/script.js b/Extension/Auto_Copy_Pro/script.js new file mode 100644 index 0000000..5cb9348 --- /dev/null +++ b/Extension/Auto_Copy_Pro/script.js @@ -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);