diff --git a/src/get-slack-api-data.js b/src/get-slack-api-data.js index 646bbd8..fc9d980 100644 --- a/src/get-slack-api-data.js +++ b/src/get-slack-api-data.js @@ -10,8 +10,8 @@ export default function getSlackApiData () { return; } - const apiTokenResult = /api_token\:\s\"(.*)\"/g.exec(script.innerText); - const versionUidResult = /version_uid\:\s\"(.*)\"/g.exec(script.innerText); + const apiTokenResult = /["]?api_token["]?\:\s*\"(.+?)\"/g.exec(script.innerText); + const versionUidResult = /["]?version_uid["]?\:\s*\"(.+?)\"/g.exec(script.innerText); if (apiTokenResult) { apiToken = apiTokenResult[1];