[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / ONAP-SDK-APP / src / main / webapp / static / fusion / sample / js / scribble.js
diff --git a/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/js/scribble.js b/ONAP-SDK-APP/src/main/webapp/static/fusion/sample/js/scribble.js
new file mode 100644 (file)
index 0000000..5384b30
--- /dev/null
@@ -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;
+    }