diff --git a/static/application.js b/static/application.js index 63d4e0b..1bb8df4 100644 --- a/static/application.js +++ b/static/application.js @@ -238,7 +238,10 @@ haste.prototype.removeLineNumbers = function() { // Load a document and show it haste.prototype.loadDocument = function(key) { // remove all code elements from the page - removeElementsByClass('code'); + const elements = document.getElementsByTagName('code'); + while(elements.length > 0){ + elements[0].parentNode.removeChild(elements[0]); + } // Split the key up var parts = key.split('.', 2); // Ask for what we want