<commit_before>/**
 * Nextcloud - issuetemplate
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2016
 */
function checkLength() {
	var body = getIssueText();
	if(body.length>4096) {
		$('#submit-issue').hide();
		$('#copyissue').addClass('primary');
		$('#status-text').html(t('issuetemplate','Issue to long to send over to GitHub. Please copy the text and paste it here:') + ' <a href="https://github.com/nextcloud/server/issues/new">https://github.com/nextcloud/server/issues/new</a>');
	} else {
		$('#submit-issue').show();
		$('#copyissue').removeClass('primary');
		$('#status-text').text('GitHub might show an error page if you are not logged in.');
	}
}
function getIssueText() {
	var body = "";
	body += $('#issue-description').val();
	body += "\n\n";
	body += $('#issue-serverinfo').val();
	return body;
}

(function ($, OC) {

	$(document).ready(function () {

		checkLength();

		$('#toggle-details').click(function (e) {
			$('#issue-serverinfo').slideToggle(function() {
				if($(this).is(":hidden")) {
					$('#toggle-details').val("Show");
				} else {
					$('#toggle-details').val("Hide");
				}
			});

		});

		$('#submit-issue').click(function (e) {
			e.preventDefault();
			var body = getIssueText();
			var url = $('#repository').val();
			var title = $('#issue-title').val();
			window.open(url + "/new/?title=" + encodeURIComponent(title) + "&body=" + encodeURIComponent(body));
		});

		var copybutton = document.getElementById('copyissue');
		var clipboard = new Clipboard(copybutton, {
			text: function (trigger) {
				return getIssueText();
			}
		});

		$('textarea').bind('input propertychange', function() {
			checkLength();
		});

	});

})(jQuery, OC);<commit_msg>Update link to repo shown under the form<commit_after>/**
 * Nextcloud - issuetemplate
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2016
 */
function checkLength() {
	var body = getIssueText();
	if(body.length>4096) {
		$('#submit-issue').hide();
		$('#copyissue').addClass('primary');
		var url = $('#repository').val();
		$('#status-text').html(t('issuetemplate','Issue to long to send over to GitHub. Please copy the text and paste it here:') + ' <a href="'+url+'">'+url+'</a>');
	} else {
		$('#submit-issue').show();
		$('#copyissue').removeClass('primary');
		$('#status-text').text('GitHub might show an error page if you are not logged in.');
	}
}
function getIssueText() {
	var body = "";
	body += $('#issue-description').val();
	body += "\n\n";
	body += $('#issue-serverinfo').val();
	return body;
}

(function ($, OC) {

	$(document).ready(function () {

		checkLength();

		$('#toggle-details').click(function (e) {
			$('#issue-serverinfo').slideToggle(function() {
				if($(this).is(":hidden")) {
					$('#toggle-details').val("Show");
				} else {
					$('#toggle-details').val("Hide");
				}
			});

		});

		$('#submit-issue').click(function (e) {
			e.preventDefault();
			var body = getIssueText();
			var url = $('#repository').val();
			var title = $('#issue-title').val();
			window.open(url + "/new/?title=" + encodeURIComponent(title) + "&body=" + encodeURIComponent(body));
		});

		var copybutton = document.getElementById('copyissue');
		var clipboard = new Clipboard(copybutton, {
			text: function (trigger) {
				return getIssueText();
			}
		});

		$('textarea').bind('input propertychange', function() {
			checkLength();
		});
		$('#repository').change(function() {
			checkLength();
		});

	});

})(jQuery, OC);
{'fraction_non_alphanumeric': 0.22216186854970124, 'fraction_numerical': 0.004888647474198805, 'mean_word_length': 4.066024759284732, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 17, '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': '4386394', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1177, 'n_words': 263}