aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
committerB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
commit99f6fb15a5aaa326a729e73974006d1064a5582f (patch)
tree41795c1a447bb88c7521c286840c7d290c0afb8c /static
parentadd support for title, and ensure no js (diff)
downloadstackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.gz
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.bz2
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.zip
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.
Diffstat (limited to 'static')
-rw-r--r--static/pastebin.js47
1 files changed, 0 insertions, 47 deletions
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) {
- $('<p class=flash></p>')
- .append(message)
- .hide()
- .insertAfter('ul.nav')
- .slideDown('fast');
- },
-
- onNewReply : function(reply, type) {
- var pasteDescription = '';
- if (type == 'user') {
- pasteDescription = 'your paste <a href="' +
- pastebin.urlRoot + reply.paste_id + '">#' + reply.paste_id + '</a>';
- } else {
- pasteDescription = 'this paste';
- }
- var msg = $('<span>New reply to ' + pasteDescription + ': <a href="' +
- pastebin.urlRoot + reply.reply_id + '">#' + reply.reply_id + '</a></span>');
- if (reply.author)
- msg.append($('<span></span>').text(' ' + reply.author))
- lib.flash(msg);
- }
-
- };
-
-
- $(function() {
- /* animate the server side flashes a bit */
- lib.autoHideFlashes();
- });
-})();
bgstack15