// ==UserScript== // @name InfoPerk // @namespace perk // @description Perk table -> homepage // @include https://www.heroeswm.ru/home.php // @include http://178.248.235.15/home.php* // @autor Sweag // @version 1.7.1 // @grant none // @downloadURL https://update.greasyfork.icu/scripts/25129/InfoPerk.user.js // @updateURL https://update.greasyfork.icu/scripts/25129/InfoPerk.meta.js // ==/UserScript== var hrefs = document.getElementsByTagName('a'); var temp = document.querySelectorAll("body > center"); temp[0].children[1].children[0].children[0].children[0].children[0].children[0].children[2].children[0].children[1].remove(); for(var i=0; i -1){ if(hrefs[i].className =='pi')continue; var s = hrefs[i].href.split('pl_transfers'); var s1 = s[0]+'pl_info'+s[1]; get_table(s1); break; } } function insert_table(_perk_, _kukla_) { var t1, t = document.getElementsByTagName('BR'); var d = document.createElement('div'), p = document.createElement('div'); d.innerHTML = _kukla_; p.innerHTML = _perk_; t[0].parentNode.innerHTML += '
'; t[0].parentNode.appendChild(p); t1 = document.getElementsByTagName('a'); for(var i=t1.length-1; i>0; i--){ if(t1[i].href.endsWith('help.php')){ t1[i].parentNode.appendChild(d); i = 0; } } } function get_table(href) { var table_perk = "<"; var table_kukla = " -1){ table_perk += "table" + text[i-1] + "table" + text[i]; } } text = xhr.responseText.split('td'); for(i=1; i -1){ table_kukla += text[i]; } } table_perk += "table>"; table_kukla += "td>"; insert_table(table_kukla, table_perk); } }; }