diff --git a/Changes b/Changes
index 0366a26..6137b29 100755
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.39 2020-10-05
+0.39 2020-10-07
         - Add information on secret file to Readme.
         - Change default API endpoint to korap.ids-mannheim.de.
         - Fix label for toggle plugins.
@@ -27,6 +27,7 @@
           instead of minimized.
         - Add registrable permissions to widgets and services
           (#112).
+        - Fix plugin info box.
 
         WARNING: If you relied on the former default API endpoint
           being http://localhost:9999/, this will break your
diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
index 5064e1c..43fd303 100644
--- a/dev/js/spec/pluginSpec.js
+++ b/dev/js/spec/pluginSpec.js
@@ -113,7 +113,7 @@
       expect(manager.buttonGroup('match').length).toEqual(1);
       manager.destroy();
     });
-
+    
     it('should accept valid registrations for query temporary', function () {
       var manager = pluginServerClass.create();
 
@@ -192,7 +192,6 @@
       KorAP.Panel["result"] = undefined;
     });
 
-
     it('should accept valid registrations for setWidget', function () {
       let p = KorAP.Panel["result"] = panelClass.create();
       
@@ -244,6 +243,83 @@
       KorAP.Panel["result"] = undefined;
     });
 
+    it('should alert on plugin info (1)', function () {
+
+      let alertMsg;
+      spyOn(window, 'alert').and.callFake(function(msg) {  
+        alertMsg = msg;  
+      });
+
+      let p = KorAP.Panel["result"] = panelClass.create();
+      
+      let manager = pluginServerClass.create();
+
+      manager.register({
+        name : 'Check',
+        embed : [{
+          panel : 'result',
+          title : 'Add',
+          onClick : {
+            template : 'about:blank',
+            action : 'setWidget'
+          }
+        }]
+      });
+
+      expect(alertMsg).toBeUndefined();
+
+      let b = p.actions.element().firstChild;
+      b.click();
+
+      // This may only be temporary and should open the plugin window instead
+      p.element().querySelector("span.plugin").click();
+
+      expect(alertMsg).toEqual('Check');
+      
+      manager.destroy();
+      KorAP.Panel["result"] = undefined;
+    });
+
+
+    it('should alert on plugin info (2)', function () {
+
+      let alertMsg;
+      spyOn(window, 'alert').and.callFake(function(msg) {  
+        alertMsg = msg;  
+      });
+
+      let p = KorAP.Panel["result"] = panelClass.create();
+      
+      let manager = pluginServerClass.create();
+
+      manager.register({
+        name : 'Check',
+        desc : 'Simple Check plugin',
+        embed : [{
+          panel : 'result',
+          title : 'Add',
+          onClick : {
+            template : 'about:blank',
+            action : 'setWidget'
+          }
+        }]
+      });
+
+      expect(alertMsg).toBeUndefined();
+
+      let b = p.actions.element().firstChild;
+      b.click();
+
+      // This may only be temporary and should open the plugin window instead
+      p.element().querySelector("span.plugin").click();
+
+      expect(alertMsg).toEqual("Check\n\nSimple Check plugin");
+      
+      manager.destroy();
+      KorAP.Panel["result"] = undefined;
+    });
+    
+
     it('should accept widget permissions', function () {
       let p = KorAP.Panel["result"] = panelClass.create();
       
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index 4504e56..76ac11d 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -8,7 +8,7 @@
  * @author Nils Diewald
  */
 
-define(["plugin/widget", 'plugin/service', 'state', "util"], function (widgetClass, serviceClass, stateClass) {
+define(['plugin/widget', 'plugin/service', 'state', 'util'], function (widgetClass, serviceClass, stateClass) {
   "use strict";
 
   KorAP.Panel = KorAP.Panel || {};
@@ -109,10 +109,12 @@
       if (!name)
         throw new Error("Missing name of plugin");
 
+      var desc = obj["desc"];
+      
       // Register plugin by name
       var plugin = plugins[name] = {
         name : name,
-        desc : obj["desc"],
+        desc : desc,
         about : obj["about"],
         widgets : [],
         services : []
@@ -181,7 +183,8 @@
             let id = that.addWidget(this, {
               "name": name,
               "src": onClick["template"], // that._interpolateURI(onClick["template"], this.match);
-              "permissions": onClick["permissions"]
+              "permissions": onClick["permissions"],
+              "desc":desc
             });
             plugin["widgets"].push(id);
             
diff --git a/dev/js/src/plugin/service.js b/dev/js/src/plugin/service.js
index 4c91f6a..3a39c4d 100644
--- a/dev/js/src/plugin/service.js
+++ b/dev/js/src/plugin/service.js
@@ -24,6 +24,7 @@
       this.name = data["name"];
       this.src = data["src"];
       this.id = data["id"];
+      this.desc = data["desc"];
       let _perm = new Set();
       let perm = data["permissions"];
       if (perm && Array.isArray(perm)) {
diff --git a/dev/js/src/plugin/widget.js b/dev/js/src/plugin/widget.js
index e661e6d..546cd1b 100644
--- a/dev/js/src/plugin/widget.js
+++ b/dev/js/src/plugin/widget.js
@@ -50,7 +50,11 @@
         this.name, {'cls':['button-icon', 'plugin']}, function (e) {
 
           // Temporary
-          window.alert("Basic information about this plugin");
+          let str = this.name;
+          if (this.desc !== undefined) {
+            str += "\n\n" + this.desc;
+          };
+          window.alert(str);
       }.bind(this));
       
       return obj;
