summaryrefslogtreecommitdiffstats
path: root/core/js/eventsource.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-03-01 02:46:27 +0100
committerkondou <kondou@ts.unde.re>2014-06-02 21:09:41 +0200
commit9bc3f3cf304c300c758743f2e460beb1fee3ecac (patch)
treeea564110fcd3a28caee27af3bf36486d1783cc3e /core/js/eventsource.js
parentc88c0b9a13231478c626296d78aac7c1f66d87d9 (diff)
downloadnextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.tar.gz
nextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.zip
Scrutinizer cleanup
Diffstat (limited to 'core/js/eventsource.js')
-rw-r--r--core/js/eventsource.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/js/eventsource.js b/core/js/eventsource.js
index 70f4a2a9aa8..4834653dda6 100644
--- a/core/js/eventsource.js
+++ b/core/js/eventsource.js
@@ -20,10 +20,12 @@
*/
/**
- * Wrapper for server side events (http://en.wikipedia.org/wiki/Server-sent_events)
+ * Wrapper for server side events
+ * (http://en.wikipedia.org/wiki/Server-sent_events)
* includes a fallback for older browsers and IE
*
- * Use server side events with caution, too many open requests can hang the server
+ * use server side events with caution, to many open requests can hang the
+ * server
*/
/**
@@ -43,7 +45,7 @@ OC.EventSource=function(src,data){
dataStr+='requesttoken='+oc_requesttoken;
if(!this.useFallBack && typeof EventSource !='undefined'){
var joinChar = '&';
- if(src.indexOf('?') == -1) {
+ if(src.indexOf('?') === -1) {
joinChar = '?';
}
this.source=new EventSource(src+joinChar+dataStr);
@@ -60,13 +62,13 @@ OC.EventSource=function(src,data){
this.iframe.hide();
var joinChar = '&';
- if(src.indexOf('?') == -1) {
+ if(src.indexOf('?') === -1) {
joinChar = '?';
}
this.iframe.attr('src',src+joinChar+'fallback=true&fallback_id='+OC.EventSource.iframeCount+'&'+dataStr);
$('body').append(this.iframe);
this.useFallBack=true;
- OC.EventSource.iframeCount++
+ OC.EventSource.iframeCount++;
}
//add close listener
this.listen('__internal__',function(data){