🏠 Home 

Sent lines in Replays Script

shows amount of sent lines in 1v1 replays


Installer dette script?
  1. // ==UserScript==
  2. // @name Sent lines in Replays Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description shows amount of sent lines in 1v1 replays
  6. // @author Oki
  7. // @match https://*.jstris.jezevec10.com/*
  8. // @grant none
  9. // ==/UserScript==
  10. /**************************
  11. Sent lines in Replays Script
  12. **************************/
  13. (function() {
  14. window.addEventListener('load', function(){
  15. if(typeof Game == "undefined" && typeof Replayer != "undefined") {
  16. var website = "jstris.jezevec10.com"
  17. var url = window.location.href
  18. var parts = url.split("/")
  19. Replayer["addStat3"] = function(id,into) {
  20. var apmStat = document.createElement("tr");
  21. apmStat.innerHTML = '<td class="ter">Sent</td><td class="sval"><span id="'+id+'">0</span></td>'
  22. into.insertBefore(apmStat, into.childNodes[2]);
  23. }
  24. if(typeof getParams != "function"){var getParams=a=>{var params=a.slice(a.indexOf("(")+1);params=params.substr(0,params.indexOf(")")).split(",");return params}}
  25. var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}
  26. if(parts[3]=="replay" && parts[2].endsWith(website) && parts.length>4 && parts[4]=="1v1"){
  27. Replayer["addStat3"]("countElement2",document.getElementsByTagName("tbody")[0])
  28. Replayer["addStat3"]("countElement1",document.getElementsByTagName("tbody")[2])
  29. var oldTextBar = View.prototype.updateTextBar.toString();
  30. oldTextBar = trim(oldTextBar) + `;var cat2 = this.kppElement.id.slice(-1);eval("countElement"+cat2+"&&(countElement"+cat2+".innerHTML = (this.g.gamedata.linesReceived))");`
  31. View.prototype.updateTextBar = new Function(oldTextBar);
  32. }
  33. }
  34. });
  35. })();