diff options
Diffstat (limited to 'ecomp-portal-BE/war/static/fusion/sample/js/scribble.js')
-rw-r--r-- | ecomp-portal-BE/war/static/fusion/sample/js/scribble.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js b/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js new file mode 100644 index 00000000..5384b304 --- /dev/null +++ b/ecomp-portal-BE/war/static/fusion/sample/js/scribble.js @@ -0,0 +1,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; + } |