Update source

This commit is contained in:
Kenox 2022-11-04 09:03:20 +01:00
commit 455ab9cb64

View file

@ -238,7 +238,10 @@ haste.prototype.removeLineNumbers = function() {
// Load a document and show it // Load a document and show it
haste.prototype.loadDocument = function(key) { haste.prototype.loadDocument = function(key) {
// remove all code elements from the page // 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 // Split the key up
var parts = key.split('.', 2); var parts = key.split('.', 2);
// Ask for what we want // Ask for what we want