From 99f6fb15a5aaa326a729e73974006d1064a5582f Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Fri, 11 Feb 2022 20:56:59 -0500 Subject: use UUID for paste id, and more js removal Using uuids means that titles need to be used for displaying "replies," "in response to," and so on. --- static/pastebin.js | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 static/pastebin.js (limited to 'static') diff --git a/static/pastebin.js b/static/pastebin.js deleted file mode 100644 index 4412595..0000000 --- a/static/pastebin.js +++ /dev/null @@ -1,47 +0,0 @@ -(function() { - var global = this; - - var lib = global.pastebin = { - urlRoot : '/', - - autoHideFlashes : function() { - var flashes = $('p.flash:visible').hide(); - if (flashes.length) { - flashes.slideDown('fast'); - window.setTimeout(function() { - flashes.slideUp('slow'); - }, 5000); - } - }, - - flash : function(message) { - $('

') - .append(message) - .hide() - .insertAfter('ul.nav') - .slideDown('fast'); - }, - - onNewReply : function(reply, type) { - var pasteDescription = ''; - if (type == 'user') { - pasteDescription = 'your paste #' + reply.paste_id + ''; - } else { - pasteDescription = 'this paste'; - } - var msg = $('New reply to ' + pasteDescription + ': #' + reply.reply_id + ''); - if (reply.author) - msg.append($('').text(' ' + reply.author)) - lib.flash(msg); - } - - }; - - - $(function() { - /* animate the server side flashes a bit */ - lib.autoHideFlashes(); - }); -})(); -- cgit