diff options
| author | Bobby <[email protected]> | 2023-06-16 19:46:24 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-06-16 19:46:24 -0400 |
| commit | d53f5c9348585b0e64699424d0891e40ec381321 (patch) | |
| tree | 9c6d6b14429b2f64cbd622adb3964b53bfe4056d /static | |
| parent | 00dda0f1434eeb122515eedaf0538e92f58f1085 (diff) | |
| download | thatcomputerscientist-d53f5c9348585b0e64699424d0891e40ec381321.tar.xz thatcomputerscientist-d53f5c9348585b0e64699424d0891e40ec381321.zip | |
Support for RSS Feeds
Diffstat (limited to 'static')
| -rw-r--r-- | static/js/globals.js | 14 | ||||
| -rw-r--r-- | static/js/tl.js | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/static/js/globals.js b/static/js/globals.js index 9100251b..61b3fcce 100644 --- a/static/js/globals.js +++ b/static/js/globals.js @@ -14,6 +14,20 @@ function changeLang(lang) { } } +function copyToClipboard(text) { + $('body').append('<input type="text" value="' + text + '" id="copyToClipboard">'); + const copyText = $('#copyToClipboard'); + copyText.select(); + copyText[0].setSelectionRange(0, 99999); + navigator.clipboard.writeText(copyText.val()).then(function () { + alert("Copied to clipboard!"); + }, function (err) { + alert("Failed to copy to clipboard!"); + }); + copyText.remove(); +} + + // Smooth scroll to anchor $(document).ready(function () { $('a[href^="#"]').on("click", function (e) { diff --git a/static/js/tl.js b/static/js/tl.js index 4cfdb7ff..599f64bd 100644 --- a/static/js/tl.js +++ b/static/js/tl.js @@ -19,7 +19,6 @@ function restoreLang() { } else { translateContainers.each(function (index, element) { if (element.contentWindow.document.getElementById(":1.restore")) { - console.log(element.contentWindow.document.getElementById(":1.restore")); element.contentWindow.document.getElementById(":1.restore").click(); } }); |
