summaryrefslogtreecommitdiffstats
path: root/data/js/application.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/js/application.js')
-rw-r--r--data/js/application.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/data/js/application.js b/data/js/application.js
index ef520be65..a82c193c8 100644
--- a/data/js/application.js
+++ b/data/js/application.js
@@ -28,6 +28,7 @@ define(
LexerInput.initialize(config.lexers);
this.configureTooltips();
this.setupToggleSelectAllEvent();
+ this.setupLineWrapToggle();
},
setupLineHighlight: function () {
@@ -50,8 +51,14 @@ define(
var checked = $(event.target).prop('checked');
$('.delete-history').prop('checked', checked);
});
- }
+ },
+ setupLineWrapToggle: function () {
+ var linesWrapped = localStorage.getItem('lines_wrapped') || 'true';
+ Util.setLineWrap(linesWrapped === 'true');
+
+ $('.linewrap-toggle').on('click', _.bind(Util.toggleLineWrap, Util));
+ }
};
return App;