Merge pull request #69 from one-some/ui2-tokenbar-remove-tweak

Fix tweak saving and add tweak
This commit is contained in:
ebolam
2022-08-27 19:00:00 -04:00
committed by GitHub
4 changed files with 8 additions and 2 deletions

View File

@@ -2866,7 +2866,8 @@ $(document).ready(function(){
style.id = id;
document.head.appendChild(style);
} else {
document.getElementById(id).remove();
let el = document.getElementById(id);
if (el) el.remove();
}
saveTweaks();

View File

@@ -306,6 +306,10 @@
<span>Hide timing information</span>
<input type=checkbox class="setting_item_input" data-size="mini" data-onstyle="success" data-toggle="toggle">
</div>
<div class="tweak-container" tweak-path="hide-token-bar">
<span>Hide token bar</span>
<input type=checkbox class="setting_item_input" data-size="mini" data-onstyle="success" data-toggle="toggle">
</div>
</div>
</div>
<span class="material-icons-outlined cursor show_footer_icon" onclick='if (document.getElementById("settings_footer").classList.contains("hidden")){

View File

@@ -90,7 +90,7 @@
</span>
</div>
</div>
<div style="border-top:2px;border-top-color:grey;border-top-style: solid;padding-top: 10px;">
<div id="token-breakdown-container" style="border-top:2px;border-top-color:grey;border-top-style: solid;padding-top: 10px;">
<div class="token_breakdown">
<div id="memory_tokens" style="width:40%; background-color: #3572A5;"></div>
<div id="authors_notes_tokens" style="width:10%; background-color: #f1e05a;"></div>

View File

@@ -0,0 +1 @@
#token-breakdown-container { display: none; }