Greasy Fork is available in English.

hwm_view_remote_post

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

  1. // ==UserScript==
  2. // @name hwm_view_remote_post
  3. // @author Kleshnerukij
  4. // @description Добавляет к постам ссылку на просмотр поста
  5. // @version 1.2.2
  6. // @include http://www.heroeswm.ru/forum_messages.php?tid=*
  7. // @include http://qrator.heroeswm.ru/forum_messages.php?tid=*
  8. // @include http://178.248.235.15/forum_messages.php?tid=*
  9. // @include http://www.lordswm.com/forum_messages.php?tid=*
  10. // @include https://www.heroeswm.ru/forum_messages.php?tid=*
  11. // @include https://qrator.heroeswm.ru/forum_messages.php?tid=*
  12. // @include https://178.248.235.15/forum_messages.php?tid=*
  13. // @include https://www.lordswm.com/forum_messages.php?tid=*
  14. // @encoding utf-8
  15. // @namespace https://greatest.deepsurf.us/users/12821
  16. // ==/UserScript==
  17.  
  18. // (c) Клещнерукий - http://www.heroeswm.ru/pl_info.php?id=7076906
  19.  
  20. (function () {
  21. var page_content = document.getElementsByTagName('body')[0].innerHTML;
  22. 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;
  23. var chek_section = /forum_thread\.php\?id=\d+\"><font class=\"forumt\">(Форум для внеигровых тем|Творчество)<\/font>/i;
  24. var msg_id;
  25.  
  26. if (page_content.search(chek_section) != -1) { // Переделать
  27. while ((msg_id = search_del_msg.exec(page_content)) !== null) {
  28. 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>";
  29. }
  30. }
  31. })();