<commit_before>/*
 * quick-reply.js
 * https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/quick-reply.js
 *
 * Released under the MIT license
 * Copyright (c) 2012 <NAME> <<EMAIL>>
 *
 * Usage:
 *   $config['quick_reply'] = true;
 *   $config['additional_javascript'][] = $config['root'] . 'jquery.min.js';
 *   $config['additional_javascript'][] = $config['root'] . '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 = '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();
		$('<a href="?/b/res/69.html">[Quick reply]</a>').insertAfter($(this).children('p.intro').children('a:last')).click(function() {
			$('div.banner').remove();
			$('<div class="banner">Posting mode: Replying to <small>&gt;&gt;' + id + '</small> <a class="unimportant" onclick="undo_quick_reply()" href="javascript:void(0)">[Return]</a></div>')
				.insertBefore('form[name=post]');
			$('form[name=post] input[type=submit]').val(txt_new_reply);
			
			$('<input type="hidden" name="quick-reply" value="' + id + '">').appendTo($('form[name=post]'));
			
			$('form[name=post] textarea').select();
			
			window.scrollTo(0, 0);
			
			return false;
		});		
	});
});<commit_msg>use "Submit" for submit button if appropriate<commit_after>/*
 * quick-reply.js
 * https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/quick-reply.js
 *
 * Released under the MIT license
 * Copyright (c) 2012 <NAME> <<EMAIL>>
 *
 * Usage:
 *   $config['quick_reply'] = true;
 *   $config['additional_javascript'][] = $config['root'] . 'jquery.min.js';
 *   $config['additional_javascript'][] = $config['root'] . '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();
		$('<a href="?/b/res/69.html">[Quick reply]</a>').insertAfter($(this).children('p.intro').children('a:last')).click(function() {
			$('div.banner').remove();
			$('<div class="banner">Posting mode: Replying to <small>&gt;&gt;' + id + '</small> <a class="unimportant" onclick="undo_quick_reply()" href="javascript:void(0)">[Return]</a></div>')
				.insertBefore('form[name=post]');
			$('form[name=post] input[type=submit]').val(txt_new_reply);
			
			$('<input type="hidden" name="quick-reply" value="' + id + '">').appendTo($('form[name=post]'));
			
			$('form[name=post] textarea').select();
			
			window.scrollTo(0, 0);
			
			return false;
		});		
	});
});
{'fraction_non_alphanumeric': 0.24921923797626483, 'fraction_numerical': 0.006870705808869456, 'mean_word_length': 5.009380863039399, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7440727', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1150, 'n_words': 161}