Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onFavouriteClick(illustId, event) {
const authData = Storage.get('auth');
if (authData === null || authData.expires_at < time()) {
return this.loginRef.open();
}
const target = event.nativeEvent.target,
body = document.body;
if (target.classList.contains('fn-wait')) {
return;
}
target.classList.add('fn-wait');
body.classList.add('fn-wait');
cachedFetch(config.favouriteURL, {
mode: 'cors',
method: 'put',
timeout: 10e3,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',