Skip to content

Commit

Permalink
Added option to turn off background auto magic
Browse files Browse the repository at this point in the history
  • Loading branch information
n1474335 committed Aug 3, 2018
1 parent 53b92ae commit a947e06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/web/OutputWaiter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ class OutputWaiter {
*/
backgroundMagic() {
this.hideMagicButton();
if (!this.app.options.autoMagic) return;

const sample = this.dishStr ? this.dishStr.slice(0, 1000) :
this.dishBuffer ? this.dishBuffer.slice(0, 1000) : "";

Expand Down
9 changes: 8 additions & 1 deletion src/web/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
</button>
<span id="stale-indicator" class="hidden" data-toggle="tooltip" title="The output is stale. The input or recipe has changed since this output was generated. Bake again to get the new value.">
<i class="material-icons">access_time</i>
</span>
</span>
</div>
<div class="textarea-wrapper">
<div id="output-highlighter" class="no-select"></div>
Expand Down Expand Up @@ -492,6 +492,13 @@ <h5 class="modal-title">Options</h5>
Use meta key for keybindings (Windows ⊞/Command ⌘)
</label>
</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 class="modal-footer">
<button type="button" class="btn btn-secondary" id="reset-options">Reset options to default</button>
Expand Down
3 changes: 2 additions & 1 deletion src/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function main() {
theme: "classic",
useMetaKey: false,
ioDisplayThreshold: 512,
logLevel: "info"
logLevel: "info",
autoMagic: true,
};

document.removeEventListener("DOMContentLoaded", main, false);
Expand Down
2 changes: 1 addition & 1 deletion src/web/stylesheets/utils/_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ optgroup {
}

.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 {
Expand Down

0 comments on commit a947e06

Please sign in to comment.