Don't wait for document ready for setting requesttoken
This commit is contained in:
parent
8380e6f658
commit
6324daecc0
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue