OGame: Shorten messages links

OGame: usefull for some internet connections

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name OGame: Shorten messages links
// @namespace https://greatest.deepsurf.us/users/4668-black-cat
// @description OGame: usefull for some internet connections
// @version 5.4
// @creator Black Cat
// @include http://*.ogame.gameforge.com/game/index.php?page=messages*
// ==/UserScript==

var strFunc = (function(){

	$(document).ajaxSuccess(function(e,xhr,settings){
		if (settings.url.indexOf("page=messages") == -1) return;
		if (settings.data.indexOf("displayPage") == -1) return;

		$("#messageContent td.subject a.overlay").each(function () {
			var link = $(this);
			var href = link.attr("href");
			link.attr("href", href.replace(/&mids=[^&]*/,""));
		});
	});

}).toString();

var script = document.createElement("script");
script.setAttribute("type","text/javascript");
script.text = "(" + strFunc + ")();";
document.body.appendChild(script);