From bdd71b6081a696eec352a1cea69d788631d6f549 Mon Sep 17 00:00:00 2001
From: Lukas Reschke <lukas@statuscode.ch>
Date: Fri, 24 Mar 2017 19:49:43 +0100
Subject: [PATCH] Merge JS for comments

Shaves off 6 requests.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
---
 apps/comments/appinfo/app.php | 8 +-------
 apps/comments/js/merged.json  | 9 +++++++++
 2 files changed, 10 insertions(+), 7 deletions(-)
 create mode 100644 apps/comments/js/merged.json

diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php
index 144a4506d38..067e01e47ef 100644
--- a/apps/comments/appinfo/app.php
+++ b/apps/comments/appinfo/app.php
@@ -26,13 +26,7 @@ $eventDispatcher->addListener(
 	'OCA\Files::loadAdditionalScripts',
 	function() {
 		\OCP\Util::addScript('oc-backbone-webdav');
-		\OCP\Util::addScript('comments', 'app');
-		\OCP\Util::addScript('comments', 'commentmodel');
-		\OCP\Util::addScript('comments', 'commentcollection');
-		\OCP\Util::addScript('comments', 'commentsummarymodel');
-		\OCP\Util::addScript('comments', 'commentstabview');
-		\OCP\Util::addScript('comments', 'filesplugin');
-		\OCP\Util::addScript('comments', 'activitytabviewplugin');
+		\OCP\Util::addScript('comments', 'merged');
 		\OCP\Util::addStyle('comments', 'comments');
 	}
 );
diff --git a/apps/comments/js/merged.json b/apps/comments/js/merged.json
new file mode 100644
index 00000000000..66a63e88d17
--- /dev/null
+++ b/apps/comments/js/merged.json
@@ -0,0 +1,9 @@
+[
+  "app.js",
+  "commentmodel.js",
+  "commentcollection.js",
+  "commentsummarymodel.js",
+  "commentstabview.js",
+  "filesplugin.js",
+  "activitytabviewplugin.js"
+]
-- 
GitLab