From 6a9169657d5b5dea09fe7d2dbabe49a8a4845d05 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sat, 31 Mar 2012 11:20:18 +1100 Subject: Merged js/ into https://github.com/savetheinternet/Tinyboard --- js/quick-reply.js | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 js/quick-reply.js (limited to 'js/quick-reply.js') diff --git a/js/quick-reply.js b/js/quick-reply.js deleted file mode 100644 index cc1a45a2..00000000 --- a/js/quick-reply.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * quick-reply.js - * https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/quick-reply.js - * - * Released under the MIT license - * Copyright (c) 2012 Michael Save - * - * Usage: - * $config['quick_reply'] = true; - * $config['additional_javascript'][] = 'js/jquery.min.js'; - * $config['additional_javascript'][] = 'js/quick-reply.js'; - * - */ - -$(document).ready(function(){ - if($('div.banner').length != 0) - return; // not index - - txt_new_topic = $('form[name=post] input[type=submit]').val(); - txt_new_reply = txt_new_topic == 'Submit' ? txt_new_topic : 'New Reply'; - - undo_quick_reply = function() { - $('div.banner').remove(); - $('form[name=post] input[type=submit]').val(txt_new_topic); - $('form[name=post] input[name=quick-reply]').remove(); - } - - $('div.post.op').each(function() { - var id = $(this).children('p.intro').children('a.post_no:eq(1)').text(); - $('[Quick reply]').insertAfter($(this).children('p.intro').children('a:last')).click(function() { - $('div.banner').remove(); - $('') - .insertBefore('form[name=post]'); - $('form[name=post] input[type=submit]').val(txt_new_reply); - - $('').appendTo($('form[name=post]')); - - $('form[name=post] textarea').select(); - - window.scrollTo(0, 0); - - return false; - }); - }); -}); - -- cgit v1.3