script_content += this.editor.getValue() + '\n';
// Add a dispose method to the user script for cleaning up
- script_content += 'this._dispose = function(){ network.off(); if(this.dispose) this.dispose(); }';
+ script_content += 'this._dispose = function(){ network.off(); input.off(); if(this.dispose) this.dispose(); }';
// Try to compile the user script
try {