Browse Source

Fixed bunch of Javascript syntax issues.

pull/37/head
Simon Eisenmann 12 years ago
parent
commit
20b504aacd
  1. 2
      static/js/directives/chat.js
  2. 2
      static/js/directives/screenshare.js
  3. 4
      static/js/mediastream/utils.js
  4. 2
      static/js/mediastream/webrtc.js
  5. 2
      static/js/services/desktopnotify.js
  6. 2
      static/js/services/fastscroll.js
  7. 2
      static/js/services/filedownload.js
  8. 2
      static/js/services/playsound.js
  9. 3
      static/js/services/randomgen.js

2
static/js/directives/chat.js

@ -209,7 +209,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], @@ -209,7 +209,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'],
mid = randomGen.random({
hex: true
});
};
}
if (peercall && peercall.peerconnection.datachannelReady) {
subscope.p2p(true);
// Send out stuff through data channel.

2
static/js/directives/screenshare.js

@ -165,7 +165,7 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials @@ -165,7 +165,7 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials
if ($scope.layout.screenshare) {
$scope.stopScreenshare();
};
}
$scope.layout.screenshare = true;

4
static/js/mediastream/utils.js

@ -26,7 +26,9 @@ define(['jquery', 'underscore'], function($, _) { @@ -26,7 +26,9 @@ define(['jquery', 'underscore'], function($, _) {
var merged = cons1;
var name;
for (name in cons2.mandatory) {
merged.mandatory[name] = cons2.mandatory[name];
if (cons2.mandatory.hasOwnProperty(name)) {
merged.mandatory[name] = cons2.mandatory[name];
}
}
merged.optional.concat(cons2.optional);
return merged;

2
static/js/mediastream/webrtc.js

@ -32,7 +32,7 @@ define([ @@ -32,7 +32,7 @@ define([
'mediastream/usermedia',
'mediastream/utils',
'mediastream/tokens',
'webrtc.adapter', ],
'webrtc.adapter'],
function($, _, PeerCall, PeerConference, PeerXfer, PeerScreenshare, UserMedia, utils, tokens) {

2
static/js/services/desktopnotify.js

@ -82,7 +82,7 @@ define(['jquery', 'underscore', 'desktop-notify'], function($, _) { @@ -82,7 +82,7 @@ define(['jquery', 'underscore', 'desktop-notify'], function($, _) {
if (!this.enabled()) {
return this.dummy;
};
}
var opts = {
body: body,

2
static/js/services/fastscroll.js

@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
*/
define(["jquery"], function($) {
function dispatchClick(coords) {
var dispatchClick = function(coords) {
var event = document.createEvent('MouseEvent'),
elem = document.elementFromPoint(coords.x, coords.y);

2
static/js/services/filedownload.js

@ -186,7 +186,7 @@ define(["jquery", "underscore"], function($, _) { @@ -186,7 +186,7 @@ define(["jquery", "underscore"], function($, _) {
var idx = this.jobs.indexOf(job);
if (~idx) { // Yay i love fancy code which is hard to understand!
this.jobs.splice(idx, 1);
};
}
if (this.chunk >= this.end && this.jobs.length === 0) {
//console.log("File done.")
safeApply(this.scope, _.bind(function($scope) {

2
static/js/services/playsound.js

@ -97,7 +97,7 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) { @@ -97,7 +97,7 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) {
if (this.aliases.hasOwnProperty(id)) {
return this.aliases[id];
};
}
return id;
};

3
static/js/services/randomgen.js

@ -34,8 +34,7 @@ define(["underscore"], function(_) { @@ -34,8 +34,7 @@ define(["underscore"], function(_) {
};
// Fast binary to hex function.
function binStringToHex(s) {
var binStringToHex = function(s) {
var s2 = '',
c;
for (var i = 0, l = s.length; i < l; ++i) {

Loading…
Cancel
Save