[Konachan] Tag Subscriptions: Tag Completion

Adds tag completion boxes to the edit page for tag subscriptions.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name		[Konachan] Tag Subscriptions: Tag Completion
// @namespace	Zolxys
// @description	Adds tag completion boxes to the edit page for tag subscriptions.
// @include		/^https?://konachan\.(com|net)/tag_subscription/?($|\?|#)/
// @include		/^https?://yande\.re/tag_subscription/?($|\?|#)/
// @version		1.1
// ==/UserScript==
var f = String(function(){
	var zoltsa = [];
	function zoltsf() {
		var a = document.getElementById('tag-subscription-body').getElementsByTagName('input');
		var r = /^tag_subscription_(\d+)_tag_query$/;
		for (var i = 0; i < a.length; i++)
		  if (r.test(a[i].id)) {
			var n = parseInt(r.exec(a[i].id)[1]);
			if (zoltsa.indexOf(n)== -1) {
				zoltsa.push(n);
				new TagCompletionBox(a[i]);
				if (TagCompletion)
					TagCompletion.observe_tag_changes_on_submit(a[i].up('form'), a[i], null);
			}
		}
	}
	document.getElementById('content').addEventListener('DOMNodeInserted', zoltsf);
	zoltsf();
});
var ne = document.createElement('script');
ne.setAttribute('type','text/javascript');
ne.innerHTML=f.substring(f.indexOf('\n') + 1, f.lastIndexOf('}'));
document.head.appendChild(ne);