From f9814c6b249e88db40761f8d4f7acf1d1d9e9bfd Mon Sep 17 00:00:00 2001 From: Adam Solove Date: Tue, 7 Nov 2023 07:21:24 -0500 Subject: [PATCH] Fixes #492 and cleans up unused code. --- src/web/js/share.js | 67 +-------------------------------------------- 1 file changed, 1 insertion(+), 66 deletions(-) diff --git a/src/web/js/share.js b/src/web/js/share.js index c6cb6748e..fe5d2e050 100644 --- a/src/web/js/share.js +++ b/src/web/js/share.js @@ -124,7 +124,7 @@ window.makeShareAPI = function makeShareAPI(pyretVersion) { text: importCode }, { - message: "You can also click Update below to copy the current version to the published version, or click Close to exit this window." + message: "You can also click Update below to copy the current version to the published version, or click Cancel to exit this window." } ] }); @@ -181,71 +181,6 @@ window.makeShareAPI = function makeShareAPI(pyretVersion) { } } - function autoHighlightBox(text) { - var textBox = $("").addClass("auto-highlight"); - textBox.attr("size", text.length); - textBox.attr("editable", false); - textBox.on("focus", function() { $(this).select(); }); - textBox.on("mouseup", function() { $(this).select(); }); - textBox.val(text); - return textBox; - } - - function getLanguage() { - if(typeof navigator !== "undefined") { - return navigator.language || "en-US"; // Biased towards USA - } - else { - return "en-US"; - } - } - - var dateOptions = { - weekday: "short", - year: "numeric", - month: "short", - day: "numeric", - hour: "numeric", - minute: "numeric" - }; - - function drawShareRow(f) { - var container = $("
").addClass("sharebox"); - var shareUrl = makeShareUrl(f.getUniqueId()); - var displayDate = new Date(f.getModifiedTime()).toLocaleString(getLanguage, dateOptions); - var hoverDate = String(new Date(f.getModifiedTime())); - container.append($("