diff --git a/static/application.js b/static/application.js index dab2a5e..e018681 100644 --- a/static/application.js +++ b/static/application.js @@ -208,8 +208,7 @@ haste.prototype.addLineNumbers = function(data) { }; haste.prototype.getCharacterWidth = function() { - var $div = $("
"); - $("body").append($div); + var $div = $("#sandbox"); $div.html('a'); $div.css('width','auto') .css('font', $("code").css('font')) diff --git a/static/index.html b/static/index.html index f4f22f7..cb7cc1b 100644 --- a/static/index.html +++ b/static/index.html @@ -63,7 +63,8 @@
- +
+