Skip to content

Commit

Permalink
Support bulk messages from TST
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Feb 5, 2024
1 parent e3131a4 commit 225750b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webextensions/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ let shoudHandleTSTLongPress = false;
let mousedownHandled = false;

function onTSTAPIMessage(message) {
if (message && message.messages) {
for (const oneMessage of message.messages) {
onTSTAPIMessage(oneMessage);
}
return;
}
switch (message.type) {
case Constants.kTSTAPI_NOTIFY_READY:
case Constants.kTSTAPI_PERMISSIONS_CHANGED:
Expand Down Expand Up @@ -341,6 +347,7 @@ async function registerToTST() {
name: browser.i18n.getMessage('extensionName'),
icons: browser.runtime.getManifest().icons,
listeningTypes,
allowBulkMessaging: true,
style: `
.tab.${Constants.kSELECTED}::after,
.tab.${Constants.kREADY_TO_SELECT}::after {
Expand Down

0 comments on commit 225750b

Please sign in to comment.