mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 05:57:07 +03:00
Added cancel button when choosing a disable category
This commit is contained in:
@@ -244,10 +244,12 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
event.target.value = DEFAULT_CATEGORY;
|
event.target.value = DEFAULT_CATEGORY;
|
||||||
|
|
||||||
// Alert that they have to enable this category first
|
// Alert that they have to enable this category first
|
||||||
alert(chrome.i18n.getMessage("enableThisCategoryFirst").replace("{0}", chrome.i18n.getMessage("category_" + chosenCategory)));
|
if (confirm(chrome.i18n.getMessage("enableThisCategoryFirst")
|
||||||
|
.replace("{0}", chrome.i18n.getMessage("category_" + chosenCategory)))) {
|
||||||
// Open options page
|
// Open options page
|
||||||
chrome.runtime.sendMessage({"message": "openConfig"});
|
chrome.runtime.sendMessage({"message": "openConfig"});
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user