From b7e746f7721ca7f8f857613d5724626ea2b491d6 Mon Sep 17 00:00:00 2001 From: Julian Holfeld Date: Tue, 24 Aug 2021 21:52:57 +0200 Subject: [PATCH] refactor: rename titleContext to context --- Sources/com.morphclue.wakatime.sdPlugin/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/com.morphclue.wakatime.sdPlugin/main.js b/Sources/com.morphclue.wakatime.sdPlugin/main.js index 64d1cd5..42663e8 100644 --- a/Sources/com.morphclue.wakatime.sdPlugin/main.js +++ b/Sources/com.morphclue.wakatime.sdPlugin/main.js @@ -1,7 +1,7 @@ let websocket = null; let pluginUUID = null; let settings = null; -let titleContext = null; +let context = null; let remainingMinutes = 0; let timerId; @@ -21,7 +21,7 @@ function handleMessage(event) { switch (eventObject['event']) { case 'willAppear': console.log('Stream-Deck appeared'); - titleContext = eventObject.context; + context = eventObject.context; fetchWakaTimeStats(); break; case 'willDisappear': @@ -87,7 +87,7 @@ function startTimer() { function showAlert() { const json = { "event": "showAlert", - "context": titleContext, + "context": context, }; websocket.send(JSON.stringify(json)); @@ -112,7 +112,7 @@ function unregisterPlugin(event) { function setTitle(title) { const json = { "event": "setTitle", - "context": titleContext, + "context": context, "payload": { "title": "" + title, "target": 0