sis.link.sortByPostTime

sort threads by post time

Stan na 26-06-2015. Zobacz najnowsza wersja.

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        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;
	}
}