hwm_view_remote_post

Добавляет к постам ссылку на просмотр поста

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name            hwm_view_remote_post
// @author          Kleshnerukij
// @description     Добавляет к постам ссылку на просмотр поста
// @version         1.2.2
// @include         http://www.heroeswm.ru/forum_messages.php?tid=*
// @include         http://qrator.heroeswm.ru/forum_messages.php?tid=*
// @include         http://178.248.235.15/forum_messages.php?tid=*
// @include         http://www.lordswm.com/forum_messages.php?tid=*
// @include         https://www.heroeswm.ru/forum_messages.php?tid=*
// @include         https://qrator.heroeswm.ru/forum_messages.php?tid=*
// @include         https://178.248.235.15/forum_messages.php?tid=*
// @include         https://www.lordswm.com/forum_messages.php?tid=*
// @encoding 	    utf-8
// @namespace       https://greasyfork.org/users/12821
// ==/UserScript==

// (c) Клещнерукий - http://www.heroeswm.ru/pl_info.php?id=7076906

(function () {
	var page_content = document.getElementsByTagName('body')[0].innerHTML;
	var search_del_msg = /name="(\d+)" class="pi">\d+<\/a>&nbsp;<\/span>&nbsp;\d+\-\d+\-\d+ \d+:\d+:\d+<\/td><td style="border: 0px; background-image: none" align="right"><\/td><\/tr><\/tbody><\/table><\/td><\/tr><tr><td style="color: #000000; padding: 5px;font-size: 0.8125em;"><font color="red"><font color="red"><i>\[Сообщение удалено/ig;
	var chek_section = /forum_thread\.php\?id=\d+\"><font class=\"forumt\">(Форум для внеигровых тем|Творчество)<\/font>/i;
	var msg_id;

	if (page_content.search(chek_section) != -1) { // Переделать
		while ((msg_id = search_del_msg.exec(page_content)) !== null) {
            document.getElementsByName(msg_id[1])[0].parentNode.parentNode.innerHTML += " <a style=\"text-decoration: none;\" href=\"http://hwmfamily.ru/services/view_remote.php?id_msg="+msg_id[1]+"\" target=\"_blank\"><img width=\"12px\" src=\"https://i.ibb.co/z6sYHyw/1200328.png\"></a>";
		}
	}
})();