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'],
mid = randomGen.random({ mid = randomGen.random({
hex: true hex: true
}); });
}; }
if (peercall && peercall.peerconnection.datachannelReady) { if (peercall && peercall.peerconnection.datachannelReady) {
subscope.p2p(true); subscope.p2p(true);
// Send out stuff through data channel. // 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
if ($scope.layout.screenshare) { if ($scope.layout.screenshare) {
$scope.stopScreenshare(); $scope.stopScreenshare();
}; }
$scope.layout.screenshare = true; $scope.layout.screenshare = true;

4
static/js/mediastream/utils.js

@ -26,7 +26,9 @@ define(['jquery', 'underscore'], function($, _) {
var merged = cons1; var merged = cons1;
var name; var name;
for (name in cons2.mandatory) { 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); merged.optional.concat(cons2.optional);
return merged; return merged;

2
static/js/mediastream/webrtc.js

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

2
static/js/services/desktopnotify.js

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

2
static/js/services/fastscroll.js

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

2
static/js/services/filedownload.js

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

2
static/js/services/playsound.js

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

3
static/js/services/randomgen.js

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

Loading…
Cancel
Save