diff --git a/Ryuutama/Ryuutama.css b/Ryuutama/Ryuutama.css index 22297ae81d..3da3e903fa 100644 --- a/Ryuutama/Ryuutama.css +++ b/Ryuutama/Ryuutama.css @@ -81,6 +81,10 @@ hr { font-family: "pictos"; } +.sheet-font-12 { + font-size: 12px; +} + /* Default Repeating section buttons (Add, Modify, Done) ============================= */ .repcontainer .itemcontrol { @@ -203,6 +207,8 @@ button.btn.repcontrol_edit:hover::after { color: var(--header-text-color); background-color: var(--header-bg-color); font-size: 1.05em; + border-radius: 4px; + padding: 1px 5px; } .sheet-partyOptions { @@ -256,6 +262,11 @@ button.btn.repcontrol_edit:hover::after { margin: 3px; } +.sheet-icon-small{ + width: 30px; + padding: 3px; +} + .sheet-condionBar { align-items: center; padding: 6px 0 0 0; @@ -496,7 +507,7 @@ input.sheet-overburdenPenalty { .sheet-notesToggle { position: relative; - right: 15px; + right: 21px; top: 10px; opacity: 0; z-index: 999; @@ -505,7 +516,8 @@ input.sheet-overburdenPenalty { .sheet-notesIcon { position: relative; color: var(--header-bg-color); - top: 10px; + top: 12px; + font-size: 1.5em; } .sheet-notesArea { @@ -559,8 +571,6 @@ input.sheet-overburdenPenalty { } .sheet-headerLabel { - border-radius: 4px; - padding: 1px 5px; width: 240px; height: 20px; } diff --git a/Ryuutama/Ryuutama.html b/Ryuutama/Ryuutama.html index ffac340179..486f5fcebd 100644 --- a/Ryuutama/Ryuutama.html +++ b/Ryuutama/Ryuutama.html @@ -14,6 +14,14 @@ } } + function htmlEncodeString(string){ + var codedLetters = []; + for (var i=string.length-1;i>=0;i--) { + codedLetters.unshift(['', string[i].charCodeAt(), ';'].join('')); + } + return codedLetters.join(''); + } + on("change:injury change:condition", function() { getAttrs(["condition", "injury"], function(values) { setAttrs({ @@ -466,6 +474,17 @@ }; }); }); + + on("sheet:opened", () => { + getAttrs(["character_name", "safeCharacterName"], v => { + encodedName = htmlEncodeString(v.character_name) + if (encodedName != v.safeCharacterName){ + setAttrs({ + safeCharacterName: encodedName + }); + }; + }); + });