mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/StarCitizenBoxBrowserEx.git
synced 2025-05-09 13:41:24 +08:00
feat: add postMessage for toggling SC-BOX translate
This commit is contained in:
parent
78b138f039
commit
12352cde50
2
core.ts
2
core.ts
@ -255,11 +255,13 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
if (SCLocalizationTranslating) {
|
||||
SCLocalizationTranslating = false;
|
||||
undoTranslate();
|
||||
window.postMessage({ type: 'TOGGLED-SC-BOX-TRANSLATE', action: 'off' }, '*');
|
||||
return;
|
||||
}
|
||||
SCLocalizationTranslating = true;
|
||||
SCLocalizationEnableSplitMode = true;
|
||||
WebLocalizationUpdateReplaceWords(request.data);
|
||||
window.postMessage({ type: 'TOGGLED-SC-BOX-TRANSLATE', action: 'on' }, '*');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user