]> 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:04:18 +0000 (21:04 +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

apps/files_versions/js/versions.js

index 3f56a3eb69857f0f86b3049bbeabe5b1d7f76607..d118456d62e0ce68662ab8282cd74ce2212f4e70 100644 (file)
@@ -1,5 +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(