From bd58e6c799b5816fa2d5891a8bc215f5f07edd75 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Thu, 10 Sep 2015 21:42:15 -0500 Subject: [PATCH] Enables the jshint maximum line length check (80 chars) globally, and only overrides it in certain files. --- .jshintrc | 3 +-- app.js | 11 +++++++---- config.js | 1 + external_api.js | 9 ++++++--- modules/API/API.js | 9 ++++++--- modules/RTC/DataChannels.js | 1 + modules/RTC/RTC.js | 12 ++++++++---- modules/RTC/RTCUtils.js | 1 + modules/UI/UI.js | 1 + modules/UI/audio_levels/AudioLevels.js | 1 + modules/UI/etherpad/Etherpad.js | 3 ++- modules/UI/prezi/PreziPlayer.js | 1 + modules/UI/side_pannels/SidePanelToggler.js | 7 +++++-- modules/UI/side_pannels/chat/Chat.js | 3 ++- modules/UI/side_pannels/chat/Replacement.js | 1 + modules/UI/side_pannels/settings/SettingsMenu.js | 3 ++- modules/UI/toolbars/Toolbar.js | 1 + modules/UI/util/JitsiPopover.js | 3 ++- modules/UI/util/MessageHandler.js | 1 + modules/UI/videolayout/ConnectionIndicator.js | 1 + modules/UI/videolayout/LargeVideo.js | 1 + modules/UI/videolayout/SmallVideo.js | 1 + modules/UI/videolayout/VideoLayout.js | 1 + modules/UI/welcome_page/RoomnameGenerator.js | 1 + modules/connectionquality/connectionquality.js | 1 + modules/keyboardshortcut/keyboardshortcut.js | 3 ++- modules/statistics/LocalStatsCollector.js | 3 ++- modules/statistics/RTPStatsCollector.js | 1 + modules/statistics/statistics.js | 9 ++++++--- modules/translation/translation.js | 3 ++- modules/xmpp/JingleSessionPC.js | 1 + modules/xmpp/SDP.js | 1 + modules/xmpp/SDPUtil.js | 1 + modules/xmpp/TraceablePeerConnection.js | 1 + modules/xmpp/recording.js | 11 ++++++++--- modules/xmpp/strophe.jingle.js | 1 + modules/xmpp/strophe.moderate.js | 3 ++- modules/xmpp/strophe.rayo.js | 7 ++++--- modules/xmpp/xmpp.js | 1 + 39 files changed, 89 insertions(+), 35 deletions(-) diff --git a/.jshintrc b/.jshintrc index a99d850b8..a86fe00e7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -13,8 +13,7 @@ "indent": 4, // {int} Number of spaces to use for indentation "latedef": true, // true: Require variables/functions to be defined before being used "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()` - //TODO: set to 80 when the code is compliant.. - "maxlen": 1000, // {int} Max number of characters per line + "maxlen": 80, // {int} Max number of characters per line "latedef": false, //This option prohibits the use of a variable before it was defined "laxbreak": true //Ignore line breaks around "=", "==", "&&", etc. } diff --git a/app.js b/app.js index acfe554da..1d1dcef8d 100644 --- a/app.js +++ b/app.js @@ -6,15 +6,18 @@ var APP = init: function () { this.UI = require("./modules/UI/UI"); this.API = require("./modules/API/API"); - this.connectionquality = require("./modules/connectionquality/connectionquality"); + this.connectionquality = + require("./modules/connectionquality/connectionquality"); this.statistics = require("./modules/statistics/statistics"); this.RTC = require("./modules/RTC/RTC"); - this.desktopsharing = require("./modules/desktopsharing/desktopsharing"); + this.desktopsharing = + require("./modules/desktopsharing/desktopsharing"); this.xmpp = require("./modules/xmpp/xmpp"); - this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut"); + this.keyboardshortcut = + require("./modules/keyboardshortcut/keyboardshortcut"); this.translation = require("./modules/translation/translation"); this.settings = require("./modules/settings/Settings"); - this.DTMF = require("./modules/DTMF/DTMF"); + //this.DTMF = require("./modules/DTMF/DTMF"); this.members = require("./modules/members/MemberList"); this.configFetch = require("./modules/config/HttpConfigFetch"); } diff --git a/config.js b/config.js index cb250dab8..cc0506186 100644 --- a/config.js +++ b/config.js @@ -1,3 +1,4 @@ +/* jshint -W101 */ var config = { // configLocation: './config.json', // see ./modules/HttpConfigFetch.js hosts: { diff --git a/external_api.js b/external_api.js index 0c8624a2b..3ad7a5980 100644 --- a/external_api.js +++ b/external_api.js @@ -70,7 +70,8 @@ var JitsiMeetExternalAPI = (function() if (!interfaceConfigOverwrite.hasOwnProperty(key) || typeof key !== 'string') continue; - this.url += "&interfaceConfig." + key + "=" + interfaceConfigOverwrite[key]; + this.url += "&interfaceConfig." + key + "=" + + interfaceConfigOverwrite[key]; } } @@ -180,7 +181,8 @@ var JitsiMeetExternalAPI = (function() * {{ * jid: jid //the jid of the participant * }} - * participantLeft - receives event notifications about participant that left room. + * participantLeft - receives event notifications about the participant that + * left the room. * The listener will receive object with the following structure: * {{ * jid: jid //the jid of the participant @@ -225,7 +227,8 @@ var JitsiMeetExternalAPI = (function() * {{ * jid: jid //the jid of the participant * }} - * participantLeft - receives event notifications about participant that left room. + * participantLeft - receives event notifications about participant the that + * left the room. * The listener will receive object with the following structure: * {{ * jid: jid //the jid of the participant diff --git a/modules/API/API.js b/modules/API/API.js index 1b4a804e9..73838c540 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -132,7 +132,8 @@ function setupListeners() { APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) { API.triggerEvent("participantJoined", {jid: from}); }); - APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, function (from, nick, txt, myjid, stamp) { + APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, + function (from, nick, txt, myjid, stamp) { if (from != myjid) API.triggerEvent("incomingMessage", {"from": from, "nick": nick, "message": txt, "stamp": stamp}); @@ -140,10 +141,12 @@ function setupListeners() { APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) { API.triggerEvent("participantLeft", {jid: jid}); }); - APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, function (jid, newDisplayName) { + APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, + function (jid, newDisplayName) { var name = displayName[jid]; if(!name || name != newDisplayName) { - API.triggerEvent("displayNameChange", {jid: jid, displayname: newDisplayName}); + API.triggerEvent("displayNameChange", + {jid: jid, displayname: newDisplayName}); displayName[jid] = newDisplayName; } }); diff --git a/modules/RTC/DataChannels.js b/modules/RTC/DataChannels.js index 01e8ee7c8..0f10d71c4 100644 --- a/modules/RTC/DataChannels.js +++ b/modules/RTC/DataChannels.js @@ -1,4 +1,5 @@ /* global config, APP, Strophe */ +/* jshint -W101 */ // cache datachannels to avoid garbage collection // https://code.google.com/p/chromium/issues/detail?id=405545 diff --git a/modules/RTC/RTC.js b/modules/RTC/RTC.js index 2b7afffd1..6f8932bf1 100644 --- a/modules/RTC/RTC.js +++ b/modules/RTC/RTC.js @@ -65,9 +65,11 @@ var RTC = { eventEmitter.removeListener(eventType, listener); }, - createLocalStream: function (stream, type, change, videoType, isMuted, isGUMStream) { + createLocalStream: function (stream, type, change, videoType, + isMuted, isGUMStream) { - var localStream = new LocalStream(stream, type, eventEmitter, videoType, isGUMStream); + var localStream = + new LocalStream(stream, type, eventEmitter, videoType, isGUMStream); //in firefox we have only one stream object if(this.localStreams.length === 0 || this.localStreams[0].getOriginalStream() != stream) @@ -112,7 +114,8 @@ var RTC = { this.remoteStreams[jid] = {}; } this.remoteStreams[jid][remoteStream.type]= remoteStream; - eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, remoteStream); + eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, + remoteStream); return remoteStream; }, getPCConstraints: function () { @@ -224,7 +227,8 @@ var RTC = { stream = stream.videoStream; } var videoStream = this.rtcUtils.createStream(stream, true); - this.localVideo = this.createLocalStream(videoStream, "video", true, type); + this.localVideo = + this.createLocalStream(videoStream, "video", true, type); // Stop the stream to trigger onended event for old stream oldStream.stop(); diff --git a/modules/RTC/RTCUtils.js b/modules/RTC/RTCUtils.js index 4d85cfb05..19ced5985 100644 --- a/modules/RTC/RTCUtils.js +++ b/modules/RTC/RTCUtils.js @@ -1,6 +1,7 @@ /* global APP, config, require, attachMediaStream, getUserMedia, RTCPeerConnection, webkitMediaStream, webkitURL, webkitRTCPeerConnection, mozRTCIceCandidate, mozRTCSessionDescription, mozRTCPeerConnection */ +/* jshint -W101 */ var RTCBrowserType = require("./RTCBrowserType"); var Resolutions = require("../../service/RTC/Resolutions"); var AdapterJS = require("./adapter.screenshare"); diff --git a/modules/UI/UI.js b/modules/UI/UI.js index b1781f0ac..377fd098d 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -1,4 +1,5 @@ /* global Strophe, APP, $, config, interfaceConfig, toastr */ +/* jshint -W101 */ var UI = {}; var VideoLayout = require("./videolayout/VideoLayout.js"); diff --git a/modules/UI/audio_levels/AudioLevels.js b/modules/UI/audio_levels/AudioLevels.js index 97e96b733..1f86a0600 100644 --- a/modules/UI/audio_levels/AudioLevels.js +++ b/modules/UI/audio_levels/AudioLevels.js @@ -1,4 +1,5 @@ /* global APP, interfaceConfig, $, Strophe */ +/* jshint -W101 */ var CanvasUtil = require("./CanvasUtils"); var ASDrawContext = null; diff --git a/modules/UI/etherpad/Etherpad.js b/modules/UI/etherpad/Etherpad.js index bc9687e70..f0bf1cb4f 100644 --- a/modules/UI/etherpad/Etherpad.js +++ b/modules/UI/etherpad/Etherpad.js @@ -8,7 +8,8 @@ var UIUtil = require("../util/UIUtil"); var etherpadName = null; var etherpadIFrame = null; var domain = null; -var options = "?showControls=true&showChat=false&showLineNumbers=true&useMonospaceFont=false"; +var options = "?showControls=true&showChat=false&showLineNumbers=true" + + "&useMonospaceFont=false"; /** diff --git a/modules/UI/prezi/PreziPlayer.js b/modules/UI/prezi/PreziPlayer.js index f7c522296..976f1db5c 100644 --- a/modules/UI/prezi/PreziPlayer.js +++ b/modules/UI/prezi/PreziPlayer.js @@ -1,4 +1,5 @@ /* global PreziPlayer */ +/* jshint -W101 */ (function() { "use strict"; var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; diff --git a/modules/UI/side_pannels/SidePanelToggler.js b/modules/UI/side_pannels/SidePanelToggler.js index 568905cb0..ec81cce58 100644 --- a/modules/UI/side_pannels/SidePanelToggler.js +++ b/modules/UI/side_pannels/SidePanelToggler.js @@ -103,7 +103,8 @@ var PanelToggler = (function(my) { toggle(Chat, '#chatspace', function () { - // Request the focus in the nickname field or the chat input field. + // Request the focus in the nickname field or the chat input + // field. if ($('#nickname').css('visibility') === 'visible') { $('#nickinput').focus(); } else { @@ -164,7 +165,9 @@ var PanelToggler = (function(my) { }; my.isVisible = function() { - return (Chat.isVisible() || ContactList.isVisible() || SettingsMenu.isVisible()); + return (Chat.isVisible() || + ContactList.isVisible() || + SettingsMenu.isVisible()); }; return my; diff --git a/modules/UI/side_pannels/chat/Chat.js b/modules/UI/side_pannels/chat/Chat.js index 8bc8e149b..34f4b4e5d 100644 --- a/modules/UI/side_pannels/chat/Chat.js +++ b/modules/UI/side_pannels/chat/Chat.js @@ -203,7 +203,8 @@ var Chat = (function (my) { } else { var message = UIUtil.escapeHtml(value); - APP.xmpp.sendChatMessage(message, NicknameHandler.getNickname()); + APP.xmpp.sendChatMessage(message, + NicknameHandler.getNickname()); } } }); diff --git a/modules/UI/side_pannels/chat/Replacement.js b/modules/UI/side_pannels/chat/Replacement.js index b7d044220..fef3cb1e3 100644 --- a/modules/UI/side_pannels/chat/Replacement.js +++ b/modules/UI/side_pannels/chat/Replacement.js @@ -1,3 +1,4 @@ +/* jshint -W101 */ var Smileys = require("./smileys.json"); /** * Processes links and smileys in "body" diff --git a/modules/UI/side_pannels/settings/SettingsMenu.js b/modules/UI/side_pannels/settings/SettingsMenu.js index 1b1df40ea..6012b4b42 100644 --- a/modules/UI/side_pannels/settings/SettingsMenu.js +++ b/modules/UI/side_pannels/settings/SettingsMenu.js @@ -61,7 +61,8 @@ var SettingsMenu = { }, update: function() { - var newDisplayName = UIUtil.escapeHtml($('#setDisplayName').get(0).value); + var newDisplayName = + UIUtil.escapeHtml($('#setDisplayName').get(0).value); var newEmail = UIUtil.escapeHtml($('#setEmail').get(0).value); if(newDisplayName) { diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index 7ed5a0c62..a8240a618 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -1,5 +1,6 @@ /* global APP, $, buttonClick, config, lockRoom, interfaceConfig, setSharedKey, Util */ +/* jshint -W101 */ var messageHandler = require("../util/MessageHandler"); var BottomToolbar = require("./BottomToolbar"); var Prezi = require("../prezi/Prezi"); diff --git a/modules/UI/util/JitsiPopover.js b/modules/UI/util/JitsiPopover.js index a66e62822..f99d57747 100644 --- a/modules/UI/util/JitsiPopover.js +++ b/modules/UI/util/JitsiPopover.js @@ -28,7 +28,8 @@ var JitsiPopover = (function () { element.data("jitsi_popover", this); this.element = element; this.template = '
' + + '">
' + + '
' + '
'; var self = this; this.element.on("mouseenter", function () { diff --git a/modules/UI/util/MessageHandler.js b/modules/UI/util/MessageHandler.js index bb0884139..9931e120c 100644 --- a/modules/UI/util/MessageHandler.js +++ b/modules/UI/util/MessageHandler.js @@ -1,4 +1,5 @@ /* global $, APP, jQuery, toastr, Impromptu */ +/* jshint -W101 */ /** * Flag for enable/disable of the notifications. diff --git a/modules/UI/videolayout/ConnectionIndicator.js b/modules/UI/videolayout/ConnectionIndicator.js index 11617e9cd..7923d4135 100644 --- a/modules/UI/videolayout/ConnectionIndicator.js +++ b/modules/UI/videolayout/ConnectionIndicator.js @@ -1,4 +1,5 @@ /* global APP, $ */ +/* jshint -W101 */ var JitsiPopover = require("../util/JitsiPopover"); /** diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.js index fdfcfa6fa..625e3e2c9 100644 --- a/modules/UI/videolayout/LargeVideo.js +++ b/modules/UI/videolayout/LargeVideo.js @@ -1,4 +1,5 @@ /* global $, APP, Strophe, interfaceConfig */ +/* jshint -W101 */ var Avatar = require("../avatar/Avatar"); var RTCBrowserType = require("../../RTC/RTCBrowserType"); var UIUtil = require("../util/UIUtil"); diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js index 1240fd90c..cdf4b194e 100644 --- a/modules/UI/videolayout/SmallVideo.js +++ b/modules/UI/videolayout/SmallVideo.js @@ -1,4 +1,5 @@ /* global $, APP, require */ +/* jshint -W101 */ var Avatar = require("../avatar/Avatar"); var UIUtil = require("../util/UIUtil"); var LargeVideo = require("./LargeVideo"); diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 49cc99adf..4122ea660 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -1,4 +1,5 @@ /* global config, APP, $, Strophe, require, interfaceConfig */ +/* jshint -W101 */ var AudioLevels = require("../audio_levels/AudioLevels"); var ContactList = require("../side_pannels/contactlist/ContactList"); var MediaStreamType = require("../../../service/RTC/MediaStreamTypes"); diff --git a/modules/UI/welcome_page/RoomnameGenerator.js b/modules/UI/welcome_page/RoomnameGenerator.js index e10a76ec9..6b2c36fb1 100644 --- a/modules/UI/welcome_page/RoomnameGenerator.js +++ b/modules/UI/welcome_page/RoomnameGenerator.js @@ -1,3 +1,4 @@ +/* jshint -W101 */ //var nouns = [ //]; var pluralNouns = [ diff --git a/modules/connectionquality/connectionquality.js b/modules/connectionquality/connectionquality.js index e2379746f..0ef0ff75b 100644 --- a/modules/connectionquality/connectionquality.js +++ b/modules/connectionquality/connectionquality.js @@ -1,4 +1,5 @@ /* global APP, require */ +/* jshint -W101 */ var EventEmitter = require("events"); var eventEmitter = new EventEmitter(); var CQEvents = require("../../service/connectionquality/CQEvents"); diff --git a/modules/keyboardshortcut/keyboardshortcut.js b/modules/keyboardshortcut/keyboardshortcut.js index 513893f90..635c152aa 100644 --- a/modules/keyboardshortcut/keyboardshortcut.js +++ b/modules/keyboardshortcut/keyboardshortcut.js @@ -51,7 +51,8 @@ var KeyboardShortcut = { APP.UI.clickOnVideo(keycode - "0".charCodeAt(0) + 1); } //esc while the smileys are visible hides them - } else if (keycode === 27 && $('#smileysContainer').is(':visible')) { + } else if (keycode === 27 && + $('#smileysContainer').is(':visible')) { APP.UI.toggleSmileys(); } }; diff --git a/modules/statistics/LocalStatsCollector.js b/modules/statistics/LocalStatsCollector.js index 420ba9a2d..7f30d9d70 100644 --- a/modules/statistics/LocalStatsCollector.js +++ b/modules/statistics/LocalStatsCollector.js @@ -66,7 +66,8 @@ function animateLevel(newLevel, lastLevel) { * @param interval stats refresh interval given in ms. * @constructor */ -function LocalStatsCollector(stream, interval, statisticsService, eventEmitter) { +function LocalStatsCollector(stream, interval, + statisticsService, eventEmitter) { window.AudioContext = window.AudioContext || window.webkitAudioContext; this.stream = stream; this.intervalId = null; diff --git a/modules/statistics/RTPStatsCollector.js b/modules/statistics/RTPStatsCollector.js index d51fde7e7..e512ed7cd 100644 --- a/modules/statistics/RTPStatsCollector.js +++ b/modules/statistics/RTPStatsCollector.js @@ -1,5 +1,6 @@ /* global require, ssrc2jid */ /* jshint -W117 */ +/* jshint -W101 */ var RTCBrowserType = require("../RTC/RTCBrowserType"); /* Whether we support the browser we are running into for logging statistics */ diff --git a/modules/statistics/statistics.js b/modules/statistics/statistics.js index 2952616de..b33054092 100644 --- a/modules/statistics/statistics.js +++ b/modules/statistics/statistics.js @@ -114,13 +114,16 @@ var statistics = { start: function () { APP.RTC.addStreamListener(onStreamCreated, StreamEventTypes.EVENT_TYPE_LOCAL_CREATED); - APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference); - //FIXME: we may want to change CALL INCOMING event to onnegotiationneeded + APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, + onDisposeConference); + //FIXME: we may want to change CALL INCOMING event to + // onnegotiationneeded APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function (event) { startRemoteStats(event.peerconnection); // CallStats.init(event); }); - APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY, function (session) { + APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY, + function (session) { CallStats.init(session); }); APP.RTC.addListener(RTCEvents.AUDIO_MUTE, function (mute) { diff --git a/modules/translation/translation.js b/modules/translation/translation.js index 29691aecc..de3d38fa0 100644 --- a/modules/translation/translation.js +++ b/modules/translation/translation.js @@ -31,7 +31,8 @@ var defaultOptions = { var resPath = "lang/__ns__-__lng__.json"; if(lng === languages.EN) resPath = "lang/__ns__.json"; - var url = i18n.functions.applyReplacement(resPath, { lng: lng, ns: ns }); + var url = i18n.functions.applyReplacement(resPath, + { lng: lng, ns: ns }); i18n.functions.ajax({ url: url, success: function(data, status, xhr) { diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index 4deef71f7..66a8f6717 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -1,4 +1,5 @@ /* jshint -W117 */ +/* jshint -W101 */ var JingleSession = require("./JingleSession"); var TraceablePeerConnection = require("./TraceablePeerConnection"); var SDPDiffer = require("./SDPDiffer"); diff --git a/modules/xmpp/SDP.js b/modules/xmpp/SDP.js index 6837d64d8..6c51c02bc 100644 --- a/modules/xmpp/SDP.js +++ b/modules/xmpp/SDP.js @@ -1,3 +1,4 @@ +/* jshint -W101 */ /* jshint -W117 */ var SDPUtil = require("./SDPUtil"); diff --git a/modules/xmpp/SDPUtil.js b/modules/xmpp/SDPUtil.js index bde0841f6..ad581fc06 100644 --- a/modules/xmpp/SDPUtil.js +++ b/modules/xmpp/SDPUtil.js @@ -1,3 +1,4 @@ +/* jshint -W101 */ var SDPUtil = { filter_special_chars: function (text) { return text.replace(/[\\\/\{,\}\+]/g, ""); diff --git a/modules/xmpp/TraceablePeerConnection.js b/modules/xmpp/TraceablePeerConnection.js index a099e79d1..f72055ad0 100644 --- a/modules/xmpp/TraceablePeerConnection.js +++ b/modules/xmpp/TraceablePeerConnection.js @@ -1,5 +1,6 @@ /* global $, config, mozRTCPeerConnection, RTCPeerConnection, webkitRTCPeerConnection, RTCSessionDescription */ +/* jshint -W101 */ var RTC = require('../RTC/RTC'); var RTCBrowserType = require("../RTC/RTCBrowserType.js"); var XMPPEvents = require("../../service/xmpp/XMPPEvents"); diff --git a/modules/xmpp/recording.js b/modules/xmpp/recording.js index e45092837..1350d13ae 100644 --- a/modules/xmpp/recording.js +++ b/modules/xmpp/recording.js @@ -50,7 +50,8 @@ function setRecordingJirecon(state, token, callback, connection) { // TODO wait for an IQ with the real status, since this is // provisional? jireconRid = $(result).find('recording').attr('rid'); - console.log('Recording ' + ((state === 'on') ? 'started' : 'stopped') + + console.log('Recording ' + + ((state === 'on') ? 'started' : 'stopped') + '(jirecon)' + result); recordingEnabled = state; if (state === 'off'){ @@ -113,7 +114,9 @@ var Recording = { useJirecon = config.hosts && (typeof config.hosts.jirecon != "undefined"); }, - toggleRecording: function (tokenEmptyCallback, recordingStateChangeCallback, connection) { + toggleRecording: function (tokenEmptyCallback, + recordingStateChangeCallback, + connection) { if (!Moderator.isModerator()) { console.log( 'non-focus, or conference not yet organized:' + @@ -126,7 +129,9 @@ var Recording = { if (!recordingToken && !useJirecon) { tokenEmptyCallback(function (value) { setRecordingToken(value); - self.toggleRecording(tokenEmptyCallback, recordingStateChangeCallback, connection); + self.toggleRecording(tokenEmptyCallback, + recordingStateChangeCallback, + connection); }); return; diff --git a/modules/xmpp/strophe.jingle.js b/modules/xmpp/strophe.jingle.js index ed92072b9..4b943e6c1 100644 --- a/modules/xmpp/strophe.jingle.js +++ b/modules/xmpp/strophe.jingle.js @@ -1,4 +1,5 @@ /* jshint -W117 */ +/* jshint -W101 */ var JingleSession = require("./JingleSessionPC"); var XMPPEvents = require("../../service/xmpp/XMPPEvents"); diff --git a/modules/xmpp/strophe.moderate.js b/modules/xmpp/strophe.moderate.js index 55e396462..e808beccc 100644 --- a/modules/xmpp/strophe.moderate.js +++ b/modules/xmpp/strophe.moderate.js @@ -20,7 +20,8 @@ module.exports = function (XMPP, eventEmitter) { }, setMute: function (jid, mute) { console.info("set mute", mute); - var iqToFocus = $iq({to: this.connection.emuc.focusMucJid, type: 'set'}) + var iqToFocus = + $iq({to: this.connection.emuc.focusMucJid, type: 'set'}) .c('mute', { xmlns: 'http://jitsi.org/jitmeet/audio', jid: jid diff --git a/modules/xmpp/strophe.rayo.js b/modules/xmpp/strophe.rayo.js index 283962358..bc9811b64 100644 --- a/modules/xmpp/strophe.rayo.js +++ b/modules/xmpp/strophe.rayo.js @@ -11,7 +11,8 @@ module.exports = function() { } this.connection.addHandler( - this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', null, null); + this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', + null, null); }, onRayo: function (iq) { console.info("Rayo IQ", iq); @@ -51,9 +52,9 @@ module.exports = function() { console.info('Dial result ', result); var resource = $(result).find('ref').attr('uri'); - this.call_resource = resource.substr('xmpp:'.length); + self.call_resource = resource.substr('xmpp:'.length); console.info( - "Received call resource: " + this.call_resource); + "Received call resource: " + self.call_resource); }, function (error) { console.info('Dial error ', error); diff --git a/modules/xmpp/xmpp.js b/modules/xmpp/xmpp.js index fce4d9faf..701406447 100644 --- a/modules/xmpp/xmpp.js +++ b/modules/xmpp/xmpp.js @@ -1,4 +1,5 @@ /* global $, APP, config, Strophe, Base64, $msg */ +/* jshint -W101 */ var Moderator = require("./moderator"); var EventEmitter = require("events"); var Recording = require("./recording");