Skip to content

Commit

Permalink
redfection: add obfuscated name
Browse files Browse the repository at this point in the history
  • Loading branch information
le-jeu committed Nov 13, 2022
1 parent b7d7e81 commit 7c97a48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/redfection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ function setup() {
window.TEAM_MAC = 3;
window.COLORS[window.TEAM_MAC] = '#ff0028';
window.TEAM_TO_CSS[window.TEAM_MAC] = 'mac';
window.TEAM_NAMES[window.TEAM_MAC] = 'U̶͚̓̍N̴̖̈K̠͔̍͑̂͜N̞̥͋̀̉Ȯ̶̹͕̀W̶̢͚͑̚͝Ṉ̨̟̒̅ ';
window.TEAM_NAMES[window.TEAM_MAC] =
'U\u0336\u035aN\u0334\u0316K\u0320\u0354N\u031e\u0325\u022e\u0336\u0339W\u0336\u0322\u1e48\u0328\u031f';

window.teamStringToId = teamStringToId;

const decodePortal = window.decodeArray.portal;
window.decodeArray.portal = function (a, details) {
if (a.length > 6 && a[1] === 'N' && a[6] > 0) a[1] = 'M';
return decodePortal(a, details);
const res = decodePortal(a, details);
if (res.team === 'N' && res.resCount) {
res.team = 'M';
if (res.owner) res.owner = window.TEAM_NAMES[window.TEAM_MAC];
if (res.resonators) {
for (const r of res.resonators) {
r.owner = window.TEAM_NAMES[window.TEAM_MAC];
}
}
}
return res;
};

const css = document.createElement('style');
Expand Down
2 changes: 1 addition & 1 deletion src/redfection/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"author": "jaiperdu",
"name": "Redfection",
"category": "Info",
"version": "0.2.0",
"version": "0.2.1",
"description": "Show redfection portals and links"
}

0 comments on commit 7c97a48

Please sign in to comment.