]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable versions app JS in public mode
authorVincent Petry <pvince81@owncloud.com>
Thu, 17 Oct 2013 19:04:18 +0000 (21:04 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 17 Oct 2013 19:21:27 +0000 (21:21 +0200)
Since the version JS code isn't used in public link mode, disable it to
prevent Chrome freezing bugs due to the t() call being synchronous.

Fixes #4545

Backport of 41c6c44221177da4458f982bb13a5c7a6f90ff8e

apps/files_versions/js/versions.js

index 2a8b491b9b24590e74396e7274867d292358b5b4..c0a2f7df59b73d36a34667ecb8243daaa54eb590 100644 (file)
@@ -1,4 +1,12 @@
 $(document).ready(function(){
+
+       if ($('#isPublic').val()){
+               // no versions actions in public mode
+               // beware of https://github.com/owncloud/core/issues/4545
+               // as enabling this might hang Chrome
+               return;
+       }
+
        if (typeof FileActions !== 'undefined') {
                // Add versions button to 'files/index.php'
                FileActions.register(