forked from planetarian/TamperMonkey-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKC3 Replayer Log Fixer.user.js
29 lines (25 loc) · 1.21 KB
/
KC3 Replayer Log Fixer.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name KC3 Replayer Log Fixer
// @namespace http://piro.moe
// @updateURL https://github.com/planetarian/TamperMonkey-Scripts/raw/main/KC3%20Replayer%20Log%20Fixer.user.js
// @downloadURL https://github.com/planetarian/TamperMonkey-Scripts/raw/main/KC3%20Replayer%20Log%20Fixer.user.js
// @version 0.2
// @description makes the battle log actually readable.
// @author Chami
// @match https://kc3kai.github.io/kancolle-replay/battleText.html
// @grant GM_addStyle
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function() {
'use strict';
var allItems = $('td');
var leftItems = $('td').filter(function(){ return $(this).css('text-align') == 'start'; });
var centerItems = $('td').filter(function(){ return $(this).css('text-align') == 'center'; });
var rightItems = $('td').filter(function(){ return $(this).css('text-align') == 'end'; });
var titles = $('th.phase_title');
$('body').css("background", "#ffffff");
titles.css("text-align", "left");
allItems.css("text-align", "left").css("border-color", "rgba(0,0,0,0.1)");
leftItems.css("color", "#009900");
rightItems.css("color", "#aa0000");
})();