Added option to turn off background auto magic

This commit is contained in:
n1474335 2018-08-03 20:18:19 +01:00
parent 53b92ae8ef
commit a947e06140
4 changed files with 13 additions and 3 deletions

View File

@ -423,6 +423,8 @@ class OutputWaiter {
*/ */
backgroundMagic() { backgroundMagic() {
this.hideMagicButton(); this.hideMagicButton();
if (!this.app.options.autoMagic) return;
const sample = this.dishStr ? this.dishStr.slice(0, 1000) : const sample = this.dishStr ? this.dishStr.slice(0, 1000) :
this.dishBuffer ? this.dishBuffer.slice(0, 1000) : ""; this.dishBuffer ? this.dishBuffer.slice(0, 1000) : "";

View File

@ -492,6 +492,13 @@
Use meta key for keybindings (Windows ⊞/Command ⌘) Use meta key for keybindings (Windows ⊞/Command ⌘)
</label> </label>
</div> </div>
<div class="checkbox option-item">
<label for="autoMagic">
<input type="checkbox" option="autoMagic" id="autoMagic">
Attempt to detect encoded data automagically
</label>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="reset-options">Reset options to default</button> <button type="button" class="btn btn-secondary" id="reset-options">Reset options to default</button>

View File

@ -51,7 +51,8 @@ function main() {
theme: "classic", theme: "classic",
useMetaKey: false, useMetaKey: false,
ioDisplayThreshold: 512, ioDisplayThreshold: 512,
logLevel: "info" logLevel: "info",
autoMagic: true,
}; };
document.removeEventListener("DOMContentLoaded", main, false); document.removeEventListener("DOMContentLoaded", main, false);

View File

@ -165,7 +165,7 @@ optgroup {
} }
.nav-tabs .nav-link { .nav-tabs .nav-link {
color: var(--subtext-font-color); color: var(--subtext-font-colour);
} }
.nav-tabs>li>a.nav-link.active, .nav-tabs>li>a.nav-link.active:focus, .nav-tabs>li>a.nav-link.active:hover { .nav-tabs>li>a.nav-link.active, .nav-tabs>li>a.nav-link.active:focus, .nav-tabs>li>a.nav-link.active:hover {