Files
idealista-enhancer/src/EnlargeImages.js
2022-10-20 00:36:54 +02:00

20 lines
464 B
JavaScript

import Preferences from "./Preferences.js";
import Styles from "./Styles.js";
export default class EnlargeImages {
static STYLES_KEY = 'midefos-idealista-enlarge-images';
static apply() {
if (Preferences.get('enlargeImages')) {
this._addEnlargeImages();
} else {
Styles.remove(this.STYLES_KEY);
}
}
static _addEnlargeImages() {
Styles.add(Styles.ENLARGE_IMAGES, this.STYLES_KEY);
}
}