mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
address isssues for pull request
This commit is contained in:
@@ -53,9 +53,9 @@ class KeybindComponent extends React.Component<KeybindProps, KeybindState> {
|
||||
}
|
||||
|
||||
openEditDialog(): void {
|
||||
dialog = document.createElement("div");
|
||||
dialog = parent.document.createElement("div");
|
||||
dialog.id = "keybind-dialog";
|
||||
document.body.prepend(dialog);
|
||||
parent.document.body.prepend(dialog);
|
||||
ReactDOM.render(<KeybindDialogComponent option={this.props.option} closeListener={(updateWith) => this.closeEditDialog(updateWith)} />, dialog);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,10 +76,12 @@ class KeybindDialogComponent extends React.Component<KeybindDialogProps, Keybind
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
parent.document.addEventListener("keydown", this.keybindKeyPressed);
|
||||
document.addEventListener("keydown", this.keybindKeyPressed);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
parent.document.removeEventListener("keydown", this.keybindKeyPressed);
|
||||
document.removeEventListener("keydown", this.keybindKeyPressed);
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
if (confirm(chrome.i18n.getMessage("enableThisCategoryFirst")
|
||||
.replace("{0}", chrome.i18n.getMessage("category_" + chosenCategory)))) {
|
||||
// Open options page
|
||||
chrome.runtime.sendMessage({message: "openConfig", hash: "segments"});
|
||||
chrome.runtime.sendMessage({message: "openConfig", hash: "behavior"});
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user