Untitled

Anonymous
plain_text
04/04/2026 10:55 AM
844 B
13
Indexable
var d = document;

// not using this at the moment but might do later for graceful degradation...
function supports_html5_storage() {
  try {
    return 'localStorage' in window && window['localStorage'] !== null;
  } catch (e) {
    return false;
  }
}

d.addEventListener('DOMContentLoaded', function(){

  var savedContent = localStorage.getItem("notepadcontent");
  if(savedContent != null){
    d.getElementById("notepad").value = savedContent;
  }
 
 
 d.getElementById("notepad").onkeyup = function(){
  var data = d.getElementById("notepad").value;  localStorage.setItem("notepadcontent", data);
  }
});
Editor is loading...
Leave a Comment