summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-30 23:10:24 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-30 23:10:24 +0200
commit6324daecc08e947e9290228a5bf6dca49ceeabaa (patch)
treeaaa27923357e7675107ed898cde8fb6c4a9c7eec /core/templates
parent8380e6f658a87a9ab04db10389706c9d746cb466 (diff)
downloadnextcloud-server-6324daecc08e947e9290228a5bf6dca49ceeabaa.tar.gz
nextcloud-server-6324daecc08e947e9290228a5bf6dca49ceeabaa.zip
Don't wait for document ready for setting requesttoken
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.user.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 2abe4da8538..a2560b755fa 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -31,14 +31,10 @@
?>
<?php endforeach; ?>
<script type="text/javascript">
- $(function() {
- requesttoken = '<?php echo $_['requesttoken']; ?>';
- OC.EventSource.requesttoken=requesttoken;
- $(document).bind('ajaxSend', function(elm, xhr, s){
- if(requesttoken) {
- xhr.setRequestHeader('requesttoken', requesttoken);
- }
- });
+ requesttoken = '<?php echo $_['requesttoken']; ?>';
+ OC.EventSource.requesttoken=requesttoken;
+ $(document).bind('ajaxSend', function(elm, xhr, s){
+ xhr.setRequestHeader('requesttoken', requesttoken);
});
</script>
</head>