sis.link.sortByPostTime

sort threads by post time

26.06.2015 itibariyledir. En son verisyonu görün.

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        sis.link.sortByPostTime
// @namespace   zhang
// @description sort threads by post time
// @include     http://www.sexinsex.net/*
// @include     http://www.sis001.com/*
// @version     1
// @grant       GM_log
// ==/UserScript==

var links = document.getElementsByTagName('A')
for (var i = 0; i < links.length; i++) {
	var link = links[i];
	var href = link.href;
	if (href.indexOf('/forumdisplay.php?') >= 0) {
		if (href.indexOf('&orderby=') < 0) {
			href += '&orderby=dateline';
		}
		if (href.indexOf('&ascdesc=') < 0) {
			href += '&ascdesc=DESC';
		}
		if (link.href!=href) {
			link.href = href;
		}
	} else if (href.indexOf('/forum-') >= 0) {
		href = href.replace(/\/forum-(\d+)-(\d+)\.html/, "/forumdisplay.php?fid=$1&filter=0&orderby=dateline&ascdesc=DESC&page=$2")
		link.href = href;
	}
}