From d53f5c9348585b0e64699424d0891e40ec381321 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 16 Jun 2023 19:46:24 -0400 Subject: Support for RSS Feeds --- static/js/globals.js | 14 ++++++++++++++ static/js/tl.js | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'static') 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(''); + 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(); } }); -- cgit v1.2.3