[Konachan] Tagging: Verify Tags

Adds "Verify tags" to the tags utility bar on the upload and post pages. Clicking "Verify tags" moves any tags not in use on the site to a separate textbox. Moved tags will be ignored on submission.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name		[Konachan] Tagging: Verify Tags
// @namespace	Zolxys
// @description	Adds "Verify tags" to the tags utility bar on the upload and post pages.  Clicking "Verify tags" moves any tags not in use on the site to a separate textbox.  Moved tags will be ignored on submission.
// @include		/^https?://konachan\.(com|net)/post/(upload/?($|\?|#)|show/\d+($|[/?#]))/
// @version		1.4
// ==/UserScript==
var o = document.getElementById('post_tags');
var ne = document.createElement('div');
ne.id = ('zol_unused_tags_d');
ne.style.display = 'none';
ne.textContent = 'Unused Tags:';
o.parentNode.insertBefore(ne,o.nextSibling);
o = o.cloneNode(false);
o.id = ('zol_unused_tags');
o.name = o.id;
ne.appendChild(o);
o = ne.parentNode;
ne = document.createElement('script');
ne.setAttribute('type','text/javascript');
ne.innerHTML = String(function zol_verify_tags(){
	if (!TagCompletion.loaded) {
		TagCompletion.load_data(zol_verify_tags);
		return;
	}
	var t = document.getElementById('post_tags')
	var u = document.getElementById('zol_unused_tags');
	var a = t.value.toLowerCase().replace(/[,;`]/g,'').split(/[\s]/);
	t.value = '';
	for (var i = 0; i < a.length; ++i) {
		if (a[i] == '')
			continue;
		if (/^((char(acter)?|artist|copy(right)?):.+)?$/.test(a[i]) || TagCompletion.tag_data.indexOf('`'+ a[i] +'`') != -1)
			t.value += a[i] +' ';
		else
			u.value += ' '+ a[i];
	}
	document.getElementById('zol_unused_tags_d').style.display = '';
});
document.head.appendChild(ne);
o.appendChild(document.createTextNode(' | '));
ne = document.createElement('a');
ne.textContent = 'Verify tags';
//ne.setAttribute('onclick','zol_verify_tags(); return false;');
ne.href = 'javascript:zol_verify_tags();';
o.appendChild(ne);