Skip to content

Commit

Permalink
Merge pull request #10 from Isotab/master
Browse files Browse the repository at this point in the history
Abbreviate counter damage in events
  • Loading branch information
edvordo authored Mar 1, 2022
2 parents 91ff647 + aaa470c commit 7466903
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RoA-QoL.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name RoA-QoL
// @namespace Reltorakii_is_awesome
// @version 2.8.1
// @version 2.8.2
// @description try to take over the world!
// @author Reltorakii
// @icon https://cdn.jsdelivr.net/gh/edvordo/roa-qol@2.8.0-dev.2/resources/img/logo-32.png
Expand Down Expand Up @@ -371,8 +371,12 @@
let spans = m.addedNodes[0].querySelectorAll('span');
m.addedNodes[0].innerHTML = '';

m.addedNodes[0].appendChild(document.createTextNode('\u2194'));
m.addedNodes[0].appendChild(document.createTextNode('\u2194 '));
let originalDamage = spans[1].textContent
spans[1].textContent = parseFloat(spans[1].textContent.replace(/,/g, '')).abbr();
spans[1].setAttribute('title', originalDamage);
m.addedNodes[0].appendChild(spans[1]);
m.addedNodes[0].appendChild(document.createTextNode(' counter damage'));
m.addedNodes[0].appendChild(document.createTextNode(` (${parse[1]})`));
} else if ((parse = a.match(regexes.bosshit)) !== null) {
let span = m.addedNodes[0].querySelector('span:last-child');
Expand Down

0 comments on commit 7466903

Please sign in to comment.