diff --git a/src/MatrixTools.js b/src/MatrixTools.js index 343459b6c27c802170a6499397458975aeb2e346..5c6dca8b3345aa035c01e57e6a5fb879e2ad8d6a 100644 --- a/src/MatrixTools.js +++ b/src/MatrixTools.js @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -var MatrixClientPeg = require('./MatrixClientPeg'); - module.exports = { /** * Given a room object, return the canonical alias for it diff --git a/src/Modal.js b/src/Modal.js index ba7660bf9dbd85190e4498d7fd6c758db262584d..f34ef65d5942cfc69aa4701f97e24abf76bc46c8 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -18,7 +18,6 @@ limitations under the License. 'use strict'; var React = require('react'); -var q = require('q'); module.exports = { DialogContainerId: "mx_Dialog_Container", diff --git a/src/controllers/molecules/ChangeAvatar.js b/src/controllers/molecules/ChangeAvatar.js index b7eb3ec699d776fe47cc2afd2887891883cb345d..0df93b02fd4d0d3d06bfe39c6764b6c423def936 100644 --- a/src/controllers/molecules/ChangeAvatar.js +++ b/src/controllers/molecules/ChangeAvatar.js @@ -17,8 +17,6 @@ limitations under the License. var React = require('react'); var MatrixClientPeg = require("../../MatrixClientPeg"); -var dis = require("../../dispatcher"); - module.exports = { propTypes: { onFinished: React.PropTypes.func, diff --git a/src/controllers/molecules/ChangePassword.js b/src/controllers/molecules/ChangePassword.js index 5cc73c5def3c3dc2d33191758292ec15ff80a8f1..637e133a79e2f36340cff8b0b05e4ecd9bedc87a 100644 --- a/src/controllers/molecules/ChangePassword.js +++ b/src/controllers/molecules/ChangePassword.js @@ -19,8 +19,6 @@ limitations under the License. var React = require('react'); var MatrixClientPeg = require("../../MatrixClientPeg"); -var dis = require("../../dispatcher"); - module.exports = { propTypes: { onFinished: React.PropTypes.func, diff --git a/src/controllers/molecules/MemberInfo.js b/src/controllers/molecules/MemberInfo.js index 0fcbb22f87faae83180e0529d7248dc9f4b4389a..24e4afe5fdd587184d639a657d716a6d9f3f7e43 100644 --- a/src/controllers/molecules/MemberInfo.js +++ b/src/controllers/molecules/MemberInfo.js @@ -34,11 +34,8 @@ var Loader = require("react-loader"); module.exports = { componentDidMount: function() { - var self = this; - // work out the current state if (this.props.member) { - var usr = MatrixClientPeg.get().getUser(this.props.member.userId) || {}; var memberState = this._calculateOpsPermissions(); this.setState(memberState); } @@ -48,7 +45,6 @@ module.exports = { var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var roomId = this.props.member.roomId; var target = this.props.member.userId; - var self = this; MatrixClientPeg.get().kick(roomId, target).done(function() { // NO-OP; rely on the m.room.member event coming down else we could // get out of sync if we force setState here! @@ -66,7 +62,6 @@ module.exports = { var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var roomId = this.props.member.roomId; var target = this.props.member.userId; - var self = this; MatrixClientPeg.get().ban(roomId, target).done(function() { // NO-OP; rely on the m.room.member event coming down else we could // get out of sync if we force setState here! @@ -84,7 +79,6 @@ module.exports = { var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var roomId = this.props.member.roomId; var target = this.props.member.userId; - var self = this; var room = MatrixClientPeg.get().getRoom(roomId); if (!room) { this.props.onFinished(); diff --git a/src/controllers/organisms/ErrorDialog.js b/src/controllers/organisms/ErrorDialog.js index 32914bb1566c59fa7863b2dbeef5a997215ae235..6b7c35b3f2876265137e7579bba662e601c5e20e 100644 --- a/src/controllers/organisms/ErrorDialog.js +++ b/src/controllers/organisms/ErrorDialog.js @@ -26,7 +26,6 @@ module.exports = { }, getDefaultProps: function() { - var self = this; return { title: "Error", description: "An error has occurred.", diff --git a/src/controllers/organisms/MemberList.js b/src/controllers/organisms/MemberList.js index 69442825463d02e314d53a56eed1c25cefce2e4d..7d453d73a124090ab4a795c8cda2bd762bb72bde 100644 --- a/src/controllers/organisms/MemberList.js +++ b/src/controllers/organisms/MemberList.js @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -var React = require("react"); var MatrixClientPeg = require("../../MatrixClientPeg"); var Modal = require("../../Modal"); var sdk = require('../../index'); diff --git a/src/controllers/organisms/Notifier.js b/src/controllers/organisms/Notifier.js index 0c032226417d8fafea0a775387b7b35e34cf3816..8fb62abe40e38e1ce517ebfaa960abb0d34f5854 100644 --- a/src/controllers/organisms/Notifier.js +++ b/src/controllers/organisms/Notifier.js @@ -52,7 +52,6 @@ module.exports = { setEnabled: function(enable, callback) { if(enable) { if (!this.havePermission()) { - var self = this; global.Notification.requestPermission(function() { if (callback) { callback(); diff --git a/src/controllers/organisms/QuestionDialog.js b/src/controllers/organisms/QuestionDialog.js index 8819ba2a013dd849cc688415656c9a217b99f480..30891b839dd5093ccc0d009a853598a9fd44db59 100644 --- a/src/controllers/organisms/QuestionDialog.js +++ b/src/controllers/organisms/QuestionDialog.js @@ -26,7 +26,6 @@ module.exports = { }, getDefaultProps: function() { - var self = this; return { title: "", description: "", diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js index 6e8d1909c880664859887790b0be05e9b8bd1eb2..ea84746bab965fb93675b6e7ccc978e2818754b3 100644 --- a/src/controllers/organisms/RoomView.js +++ b/src/controllers/organisms/RoomView.js @@ -346,9 +346,6 @@ module.exports = { { continuation = true; } - - var ts0 = this.state.room.timeline[i - 1].getTs(); - var ts1 = this.state.room.timeline[i].getTs(); } if (!TileType) continue; ret.unshift( diff --git a/src/controllers/organisms/UserSettings.js b/src/controllers/organisms/UserSettings.js index f8f811ae10020aad402a1564f2083fd5df980e7d..60d643c22b431ad8478a582610f02c132e340a7f 100644 --- a/src/controllers/organisms/UserSettings.js +++ b/src/controllers/organisms/UserSettings.js @@ -15,9 +15,7 @@ limitations under the License. */ var MatrixClientPeg = require("../../MatrixClientPeg"); -var React = require("react"); var q = require('q'); -var dis = require("../../dispatcher"); var version = require('../../../package.json').version; module.exports = { diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index d4c75170d6c1d97b00ec557394ce4fcd01e3d607..2ce8d930e1724f0485958bb80ec1bfe3ca8385e1 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -14,11 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - -// should be atomised -var Loader = require("react-loader"); - var MatrixClientPeg = require("../../MatrixClientPeg"); var RoomListSorter = require("../../RoomListSorter"); var Presence = require("../../Presence"); diff --git a/src/controllers/templates/Login.js b/src/controllers/templates/Login.js index 4bb73aa8132723d3873cc707d448e9f4e904ceee..c14ed28c4a5e6f57fefc4754f061c6eb5a65f9ef 100644 --- a/src/controllers/templates/Login.js +++ b/src/controllers/templates/Login.js @@ -16,10 +16,7 @@ limitations under the License. 'use strict'; -var React = require('react'); - var MatrixClientPeg = require("../../MatrixClientPeg"); -var Matrix = require("matrix-js-sdk"); var dis = require("../../dispatcher"); module.exports = { diff --git a/src/controllers/templates/Register.js b/src/controllers/templates/Register.js index 34b09554f017f62d0edcbdc35701d159c1318410..294329e42e822ab886f49bbd18719c85faa9a2d3 100644 --- a/src/controllers/templates/Register.js +++ b/src/controllers/templates/Register.js @@ -14,12 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - -var React = require('react'); - var MatrixClientPeg = require("../../MatrixClientPeg"); -var Matrix = require("matrix-js-sdk"); var dis = require("../../dispatcher"); module.exports = { @@ -194,9 +189,7 @@ module.exports = { hs_url: this.getHsUrl(), is_url: this.getIsUrl() }); - var cli = MatrixClientPeg.get(); this.setState({busy: true}); - var self = this; this.tryRegister(); }, diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index 273fe123a959184256b65b4c0fa5a793512ced31..e92a3efc911eddcd4cc56af266dde0ff158d3d2a 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -14,14 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - -var extend = require('./extend'); - function matrixLinkify(linkify) { // Text tokens var TT = linkify.scanner.TOKENS; - var TextToken = TT.Base; // Multi tokens var MT = linkify.parser.TOKENS; var MultiToken = MT.Base;