hwm_shortcuts_to_host

HWM mod - Shortcuts to host (by Demin)

Verze ze dne 16. 08. 2014. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name           hwm_shortcuts_to_host
// @namespace      Demin
// @description    HWM mod - Shortcuts to host (by Demin)
// @homepage       http://userscripts.org/scripts/show/123829
// @version        1.04
// @include        http://*heroeswm.*/*
// @include        http://178.248.235.15/*
// @include        http://*герои.рф/?15091
// ==/UserScript==

// (c) 2012, demin  (http://www.heroeswm.ru/pl_info.php?id=15091)

var version = '1.04';

var url_cur = location.href;
var url = 'http://'+location.hostname+'/';

if ( (tag('body'))[0] ) {

var check_a = 0;

var all_a = tag('a');
var a_len = all_a.length;
for (var i=0; i < a_len; i++) {
	var a_i = all_a[i];
	if ( a_i.parentNode.innerHTML.match(/class=.?pi.?/) ) {

	check_a += 1;
	if ( check_a > 20 ) { break; }

	if ( a_i.href.indexOf(url)==-1 && !a_i.href.match(/daily\.heroeswm/) && ( a_i.href.match(/heroeswm\./) || a_i.href.match(/178\.248\.235\.15/) ) ) {
	var regexp_sp = /(^http:\/\/[A-Za-z\.]+\/)/.exec(a_i.href)[1];
	all_a[i].href = a_i.href.split(regexp_sp).join(url);
}
}
}

}

function $( id ) { return document.getElementById( id ); }

function tag( id ) { return document.getElementsByTagName( id ); }