diff --git a/dev/js/src/buttongroup.js b/dev/js/src/buttongroup.js
index 85c6555..31f60c8 100644
--- a/dev/js/src/buttongroup.js
+++ b/dev/js/src/buttongroup.js
@@ -129,12 +129,13 @@
         this._omOutside ? true : false,
       );
       
-      this.add(title, data, function (e) {
+      let b = this.add(title, data, function (e) {
         list.show();
         list.button(this.button);
         list.focus();
       });
-      return list;
+      b.list = list;
+      return b;
     },
 
     /**
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 54ffd98..724cfb3 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -28,6 +28,7 @@
   'selectMenu',
   'panel/result',
   'panel/query',
+  'panel/pagination',
   'tour/tours',
   'plugin/server',
   'pipe',
@@ -46,6 +47,7 @@
              selectMenuClass,
              resultPanelClass,
              queryPanelClass,
+             paginationPanelClass,
              tourClass,
              pluginClass,
              pipeClass) {
@@ -255,7 +257,7 @@
      * Add result panel
      */
     var resultPanel = resultPanelClass.create(show);
-
+   
     if (resultInfo != null) {
 
       // Move buttons to resultinfo
@@ -435,7 +437,18 @@
       // The views are below the query bar
       sform.insertBefore(queryPanel.element(), vcView);
       KorAP.Panel['query'] = queryPanel;
-    }
+    };
+
+
+    /**
+     * Add pagination panel
+     */
+    const paginationPanel = paginationPanelClass.create();
+
+    if (paginationPanel) {
+      paginationPanel.addRandomPage();
+      KorAP.Panel['pagination'] = paginationPanel;
+    };
 
 
     /**
diff --git a/dev/js/src/loc/de.js b/dev/js/src/loc/de.js
index a7c0080..dec8970 100644
--- a/dev/js/src/loc/de.js
+++ b/dev/js/src/loc/de.js
@@ -74,6 +74,7 @@
   loc.TOUR_treeb = loc.TOUR_tree || "Anzeige weiterer Ansichten"
   loc.TOUR_tree = loc.TOUR_tree || "Weitere Ansichten können als Baum- oder Bogenansichten angezeigt werden.";
   loc.TOUR_tourdone = "Viel Spaß mit KorAP!";
-  
-  
+
+  // Pagination panel
+  loc.RANDOM_PAGE = 'Zufallsseite';
 });
diff --git a/dev/js/src/panel/pagination.js b/dev/js/src/panel/pagination.js
new file mode 100644
index 0000000..f084e51
--- /dev/null
+++ b/dev/js/src/panel/pagination.js
@@ -0,0 +1,92 @@
+/**
+ * The pagination panel
+ *
+ * @author Nils Diewald
+ */
+"use strict";
+
+define([
+  'panel',
+  'buttongroup',
+  'pageInfo'
+], function (panelClass, buttonGroupClass, pageInfoClass) {
+
+  const d = document;
+
+  // Localization values
+  const loc = KorAP.Locale;
+  loc.RANDOM_PAGE = loc.RANDOM_PAGE || 'Random page';
+
+  
+  return {
+    create : function () {
+      return Object.create(panelClass)._init(['pagination']).upgradeTo(this)._init();
+    },
+
+    // Initialize panel
+    _init : function () {
+
+      // Override existing button group
+      // This allows actions.add() ... to work for list items in server.js
+      let pagEl = document.getElementById("pagination");
+      if (pagEl === null) {
+        return null;
+      };
+
+      // Do not show if no pages exist
+      if (pagEl.getAttribute('data-total') === '0') {
+        return null;
+      };
+
+      this._actions.panel = undefined;
+      this._actions.clear();
+
+      const bg = buttonGroupClass.adopt(pagEl);
+      bg._omOutside = true;
+      bg._omLeft = true;
+      
+      bg.anchor(pagEl.lastElementChild);
+
+      let button = bg.addList("More", {'cls':['button-group-list','button-icon']});
+      this._actions = button.list;
+      this._bg = bg;
+
+      button.setAttribute('data-icon',"\uf0c9");
+
+      // Warning: This is circular
+      this._actions.panel = this;
+     
+      this.prepend = true;
+      
+      return this;
+    },
+
+    /**
+     * The buttongroup holding the pagination panel.
+     * This differs from action, as action contains the list.
+     */
+    buttonGroup : function () {
+      return this._bg;
+    },
+
+    
+    /**
+     * Add random paginator to list
+     */
+    addRandomPage : function () {
+      const pi = pageInfoClass.create();
+      
+      const button = this.actions().add(
+        loc.RANDOM_PAGE,
+        {},
+        function () {
+          if (pi.total() > 0) {
+            const sp = new URLSearchParams(window.location.search);
+            sp.set("p", Math.floor(Math.random() * pi.total()) + 1);
+            window.location.search = sp.toString();
+          };
+        }
+      )
+    }
+  }
+});
