Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bindListeners() {
if (this.props.currentProfile) {
this.addSubscription(new Disposable(
ipc.answerMain('setting-changed', ({property, value}) => {
if (property === 'tabColor') {
this.setState({backgroundColor: value})
}
})
))
this.addSubscription(new Disposable(
ipc.answerMain('active-profile-changed', () => {
this.setState({backgroundColor: this.backgroundColor})
})
))
}
}
}
bindListeners() {
this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
this.addSubscription(new Disposable(ipc.answerMain('close', this.state.tab.kill)))
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetCssSettings)))
}
}
bindListeners() {
this.addSubscription(
new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
)
ipc.on('close-via-menu', this.closeViaMenu)
this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
}
}
bindListeners() {
this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
this.addSubscription(new Disposable(ipc.answerMain('close', this.state.tab.kill)))
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetCssSettings)))
}
}
bindListeners() {
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.resetStyles)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.resetStyles)))
}
}
bindListeners() {
this.addSubscription(
new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
)
ipc.on('close-via-menu', this.closeViaMenu)
this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
}
}
componentDidMount() {
ipc.answerMain('open-plugin-config', preferencesContainer.openPluginsConfig);
ipc.answerMain('options', preferencesContainer.setNavigation);
ipc.answerMain('mount', () => preferencesContainer.mount(this.setOverlay));
}
bindListeners() {
this.addSubscription(
new Disposable(() => ipc.removeListener('close-via-menu', this.closeViaMenu))
)
ipc.on('close-via-menu', this.closeViaMenu)
this.addSubscription(new Disposable(ipc.answerMain('split', this.split)))
this.addSubscription(new Disposable(ipc.answerMain('new-tab', this.addTab)))
this.addSubscription(new Disposable(ipc.answerMain('search-next', this.searchNext)))
this.addSubscription(new Disposable(ipc.answerMain('search-previous', this.searchPrevious)))
this.addSubscription(new Disposable(ipc.answerMain('setting-changed', this.handleSettingChanged)))
this.addSubscription(new Disposable(ipc.answerMain('active-profile-changed', this.handleActiveProfileChanged)))
this.addSubscription(new Disposable(ipc.answerMain('close', this.handleClose)))
}
}
componentDidMount() {
ipc.answerMain('plugin', pluginName => {
configContainer.setPlugin(pluginName);
this.setState({pluginName: pluginName.replace(/^kap-/, '')});
});
}
componentDidMount() {
ipc.answerMain('open-plugin-config', preferencesContainer.openPluginsConfig);
ipc.answerMain('options', preferencesContainer.setNavigation);
ipc.answerMain('mount', () => preferencesContainer.mount(this.setOverlay));
}