aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-SDK-APP/src/main/webapp/static/fusion/sample/js/scribble.js
blob: 5384b304903e102daa5a560b852938fb0f28908f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    function storeUserScribble(id) {
      var scribble = document.getElementById('scribble').innerHTML;
      localStorage.setItem('userScribble',scribble);
    }

    function getUserScribble() {
      if ( localStorage.getItem('userScribble')) {
        var scribble = localStorage.getItem('userScribble');
      }
      else {
        var scribble = 'You can scribble directly on this sticky... and I will also remember your message the next time you visit my blog!';
      }
      document.getElementById('scribble').innerHTML = scribble;
    }

    function clearLocal() {
      clear: localStorage.clear(); 
      return false;
    }