aboutsummaryrefslogtreecommitdiffstats
path: root/lib/preview
diff options
context:
space:
mode:
authorGeorg Ehrke <georg@ownCloud.com>2013-05-30 11:12:12 +0200
committerGeorg Ehrke <georg@ownCloud.com>2013-05-30 11:12:12 +0200
commitb944b1c5d29393e1b6f0bc51cf50db6eba356e64 (patch)
tree93bda5133eaa3c1d144f78a1bfd00c0831ec530a /lib/preview
parenta014662c52f5295a7e86cd43b7dd62b89e3f1085 (diff)
downloadnextcloud-server-b944b1c5d29393e1b6f0bc51cf50db6eba356e64.tar.gz
nextcloud-server-b944b1c5d29393e1b6f0bc51cf50db6eba356e64.zip
add javascript preview backend
Diffstat (limited to 'lib/preview')
-rw-r--r--lib/preview/txt.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/preview/txt.php b/lib/preview/txt.php
index 4eb0e820406..f18da66c3b8 100644
--- a/lib/preview/txt.php
+++ b/lib/preview/txt.php
@@ -58,4 +58,14 @@ class PHP extends TXT {
}
-\OC\Preview::registerProvider('OC\Preview\PHP'); \ No newline at end of file
+\OC\Preview::registerProvider('OC\Preview\PHP');
+
+class JavaScript extends TXT {
+
+ public function getMimeType() {
+ return '/application\/javascript/';
+ }
+
+}
+
+\OC\Preview::registerProvider('OC\Preview\JavaScript'); \ No newline at end of file