8.0.0 #3
@ -294,7 +294,10 @@ browser.runtime.onMessage.addListener((message, sender, callback) => {
|
||||
}
|
||||
break;
|
||||
case 'ENABLE_ICON':
|
||||
if (isPage && tabId !== undefined) enableIcon(hostname, tabId);
|
||||
if (isPage && tabId !== undefined) {
|
||||
enableIcon(hostname, tabId).then(callback);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 'ENABLE_POPUP':
|
||||
if (isPage && tabId !== undefined) {
|
||||
@ -344,8 +347,8 @@ browser.runtime.onMessage.addListener((message, sender, callback) => {
|
||||
}
|
||||
break;
|
||||
case 'UPDATE_STORE':
|
||||
triggerStoreUpdate(hostname, message.state);
|
||||
break;
|
||||
triggerStoreUpdate(hostname, message.state).then(callback);
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -219,7 +219,10 @@ async function submitButtonClickHandler(event) {
|
||||
const submitView = dialog?.getElementsByClassName('report-dialog-submit-view')[0];
|
||||
const userAgent = window.navigator.userAgent;
|
||||
const issueUrl = await dispatch({ userAgent, reason: reasonText, url: urlText, type: 'REPORT' });
|
||||
const issue = { expiresIn: Date.now() + 8 * 60 * 60 * 1000, flags: ['bug'], url: issueUrl };
|
||||
|
||||
await dispatch({ hostname, state: { issue }, type: 'UPDATE_STORE' });
|
||||
await dispatch({ hostname, type: 'ENABLE_ICON' });
|
||||
formView?.setAttribute('hidden', 'true');
|
||||
issueButton?.addEventListener('click', () => window.open(issueUrl, '_blank'));
|
||||
submitView?.removeAttribute('hidden');
|
||||
|
Loading…
Reference in New Issue
Block a user