Skip to content
This repository was archived by the owner on Jul 31, 2019. It is now read-only.

Commit

Permalink
Fix #1631- remember allow javaScript setting (#1725)
Browse files Browse the repository at this point in the history
* Init Allow JavaScript

* Change comment
  • Loading branch information
peiying16 authored and gideonthomas committed Feb 11, 2017
1 parent 9f223da commit 948deb0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions public/editor/scripts/editor/js/fc/bramble-menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ define(function(require) {
});
// Set initial UI value to match editor value
setWordWrapUI(bramble.getWordWrap());


//set initial UI value to allow javascript UI
if(bramble.getAllowJavaScript()) {
$("#allow-scripts-toggle").addClass("switch-enabled");
} else {
$("#allow-scripts-toggle").removeClass("switch-enabled");
}
// Enable/Disable JavaScript in Preview
$("#allow-scripts-toggle").click(function() {
// Toggle current value
Expand Down

0 comments on commit 948deb0

Please sign in to comment.