lint fixes
This commit is contained in:
@@ -13,7 +13,7 @@ export default {
|
||||
el._keyHandler = makeHotkey(binding.value);
|
||||
|
||||
if (el._hotkey_global) {
|
||||
document.addEventListener('keydown', el._keyHandler, { passive: false });
|
||||
window.document.addEventListener('keydown', el._keyHandler, { passive: false });
|
||||
} else {
|
||||
el.addEventListener('keydown', el._keyHandler, { passive: false });
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
|
||||
unmounted(el) {
|
||||
if (el._hotkey_global) {
|
||||
document.removeEventListener('keydown', el._keyHandler);
|
||||
window.document.removeEventListener('keydown', el._keyHandler);
|
||||
} else {
|
||||
el.removeEventListener('keydown', el._keyHandler);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
mounted(src, binding, vn) {
|
||||
const parentBg = getBgColor(src.parentElement) ?? 'transparent';
|
||||
|
||||
const myBg = getComputedStyle(document.documentElement).getPropertyValue('--MI_THEME-panel');
|
||||
const myBg = getComputedStyle(window.document.documentElement).getPropertyValue('--MI_THEME-panel');
|
||||
|
||||
if (parentBg === myBg) {
|
||||
src.style.backgroundColor = 'var(--MI_THEME-bg)';
|
||||
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
}
|
||||
|
||||
self.show = () => {
|
||||
if (!document.body.contains(el)) return;
|
||||
if (!window.document.body.contains(el)) return;
|
||||
if (self._close) return;
|
||||
if (self.text == null) return;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export class UserPreview {
|
||||
}
|
||||
|
||||
private show() {
|
||||
if (!document.body.contains(this.el)) return;
|
||||
if (!window.document.body.contains(this.el)) return;
|
||||
if (this.promise) return;
|
||||
|
||||
const showing = ref(true);
|
||||
@@ -58,7 +58,7 @@ export class UserPreview {
|
||||
};
|
||||
|
||||
this.checkTimer = window.setInterval(() => {
|
||||
if (!document.body.contains(this.el)) {
|
||||
if (!window.document.body.contains(this.el)) {
|
||||
window.clearTimeout(this.showTimer);
|
||||
window.clearTimeout(this.hideTimer);
|
||||
this.close();
|
||||
|
||||
Reference in New Issue
Block a user