Added pipe demo and make sendMsg() puplic in plugin client library

Change-Id: I38ee2d8cec2804d0c13abf97455ccc78411df5ed
diff --git a/dev/js/src/plugin/client.js b/dev/js/src/plugin/client.js
index 8c73625..389d093 100644
--- a/dev/js/src/plugin/client.js
+++ b/dev/js/src/plugin/client.js
@@ -52,7 +52,7 @@
     },
 
     // Send a message
-    _sendMsg : function (data) {
+    sendMsg : function (data) {
       data["originID"] = this.widgetID;
       window.parent.postMessage(data, this.server);
     },
@@ -79,7 +79,7 @@
      * Send a log message to the embedding KorAP
      */
     log : function (code, msg) {
-      this._sendMsg({
+      this.sendMsg({
         action : 'log',
         code : code,
         msg : msg
@@ -98,7 +98,7 @@
       if (de.scrollWidth > de.clientWidth) {
         height += 14;
       };
-      this._sendMsg({
+      this.sendMsg({
         'action' : 'resize',
         'height' : height
       });
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index 1c46dbe..d5c9cfb 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -393,6 +393,17 @@
       case 'log':
         KorAP.log(d.code, d.msg,  service.src);
         break;
+
+      // Modify pipes
+      case 'pipe':
+        if (KorAP.Pipe != undefined) {
+          if (d.job == 'del') {
+            KorAP.Pipe.remove(d.service);
+          } else {
+            KorAP.Pipe.append(d.service);
+          };
+        };
+        break;
       };
 
       // TODO: