move rageshake init into init.ts to allow for code-splitting

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-04 17:34:33 +01:00
parent 7b930da343
commit 37ed89c25f
3 changed files with 18 additions and 7 deletions

View file

@ -30,7 +30,7 @@ import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake";
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake";
function initRageshake() {
export function initRageshake() {
rageshake.init().then(() => {
console.log("Initialised rageshake.");
console.log("To fix line numbers in Chrome: " +
@ -48,8 +48,6 @@ function initRageshake() {
});
}
initRageshake();
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
if (withLogs === undefined) withLogs = true;
if (!text || !text.trim()) {