summaryrefslogtreecommitdiffstats
path: root/data/js/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/js/script.js')
-rw-r--r--data/js/script.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/data/js/script.js b/data/js/script.js
index 744722145..5faad3899 100644
--- a/data/js/script.js
+++ b/data/js/script.js
@@ -59,6 +59,18 @@ function fixedEncodeURIComponent (str) {
return this;
});
+ window.lines_wrapped = false;
+ $('#linewrap').click(function() {
+ if (window.lines_wrapped == true) {
+ $(".content .numbers").show();
+ $(".content .code > .highlight > pre").css("white-space", "pre");
+ } else {
+ $(".content .numbers").hide();
+ $(".content .code > .highlight > pre").css("white-space", "pre-wrap");
+ }
+ window.lines_wrapped = !window.lines_wrapped;
+ });
+
// check file size before uploading if browser support html5
if (window.File && window.FileList) {
function checkFileUpload(evt) {