Copy Page URL on Alt+C with Top Center Toast

Copies the current page URL with Alt+C

Δημιουργός
WissX
Ημερήσιες εγκαταστάσεις
0
Σύνολο εγκαταστάσεων
0
Βαθμολογίες
0 0 0
Έκδοση
1.1
Δημιουργήθηκε την
04/04/2025
Ενημερώθηκε την
04/04/2025
Μέγεθος
2 KB
Άδεια
MIT
Εφαρμόζεται σε
Όλοι οι ιστοχώροι

Adds an Alt+C Keyboard Shortcut to Copy the Current Page URL with a Top-Center Toast Feedback.

This Tampermonkey/Greasemonkey userscript injects a keydown event listener that triggers when Alt+C is pressed. Upon activation, the script retrieves the current window.location.href and utilizes the navigator.clipboard.writeText() API to copy it to the clipboard. A dynamically created div element is styled and displayed as a temporary toast notification at the top center of the viewport to provide user feedback on the copy status (success or failure).