GA threads authorName

Добавляет имя автора в заглавный пост на страницах тредов форума "Глобальная авантюра".

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        GA threads authorName
// @namespace   glav.su
// @description Добавляет имя автора в заглавный пост на страницах тредов форума "Глобальная авантюра".
// @include     http://glav.su/*/threads/*
// @include     https://glav.su/*/threads/*
// @version     1.2
// @grant       none
// ==/UserScript==
var m_id, mch, a_tm = $("div.lContent").find("a")[0];
if( mch = a_tm.toString().match(/https*?:\/\/glav\.su\/forum\/.+?\/(\d+?)-message\/#message\d+/) ){
	m_id = mch[1];
	$.ajax({
		url: mch[0],
		dataType: 'html',
		success: function(data){
			var dt = data.toString().replace(/[\n\r]/mg, '');
			mch = dt.match(new RegExp('<td id="forumMessagesListMessage'+m_id+'AuthorName" class="fItem forumMessagesListMessageAuthorName">.*?(<a.*?<\/a>)')) 
				|| dt.match(new RegExp('<td id="forumMessagesListMessage'+m_id+'Author" class="fItem forumMessagesListDeletedMessageAuthor">.*?(<a.*?<\/a>)'));
			if( mch ){
				$(a_tm).before(mch[1]+'&nbsp;&nbsp;');
			}
		}
	});
}