Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

Commit fc86fbe

Browse files
author
Snazzie
committed
fix lint
1 parent d53fc39 commit fc86fbe

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

src-tauri/src/scripts/js/fullscreen_script.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ document.addEventListener('fullscreenchange', (event) => {
1313
let windowLabel = null;
1414
try {
1515
// Check if metadata and currentWindow exist
16-
if (window.__TAURI_INTERNALS__.metadata &&
17-
window.__TAURI_INTERNALS__.metadata.currentWindow) {
16+
if (window.__TAURI_INTERNALS__.metadata?.currentWindow) {
1817
windowLabel = window.__TAURI_INTERNALS__.metadata.currentWindow.label;
1918
console.debug('Current window label:', windowLabel);
2019
} else {

src-tauri/src/scripts/js/pip_overlay_script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function createDraggableOverlay() {
105105
try {
106106
const windowLabel = window.__TAURI_INTERNALS__?.metadata?.currentWindow?.label || 'main';
107107

108-
if (window.__TAURI_INTERNALS__ && window.__TAURI_INTERNALS__.invoke) {
108+
if (window.__TAURI_INTERNALS__?.invoke) {
109109
console.debug('Starting window drag from drag button');
110110
window.__TAURI_INTERNALS__.invoke('drag_window', {
111111
windowLabel: windowLabel
@@ -142,7 +142,7 @@ function createDraggableOverlay() {
142142

143143
// Invoke the toggle_pip command to exit PIP mode
144144
try {
145-
if (window.__TAURI_INTERNALS__ && window.__TAURI_INTERNALS__.invoke) {
145+
if (window.__TAURI_INTERNALS__?.invoke) {
146146
const windowLabel = window.__TAURI_INTERNALS__?.metadata?.currentWindow?.label || 'main';
147147
window.__TAURI_INTERNALS__.invoke('toggle_pip', {
148148
windowLabel: windowLabel
@@ -312,7 +312,7 @@ document.addEventListener('keydown', (event) => {
312312

313313
// Check PiP state on load
314314
try {
315-
if (window.__TAURI_INTERNALS__ && window.__TAURI_INTERNALS__.invoke) {
315+
if (window.__TAURI_INTERNALS__?.invoke) {
316316
// First check if we're on the initial screen
317317
const isOnInitialScreen = document.querySelector('.confirmation-container') !== null;
318318

src-tauri/src/scripts/js/pip_script.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ document.addEventListener('keydown', (event) => {
2020
let windowLabel = null;
2121
try {
2222
// Check if metadata and currentWindow exist
23-
if (window.__TAURI_INTERNALS__.metadata &&
24-
window.__TAURI_INTERNALS__.metadata.currentWindow) {
23+
if (window.__TAURI_INTERNALS__.metadata?.currentWindow) {
2524
windowLabel = window.__TAURI_INTERNALS__.metadata.currentWindow.label;
2625
} else {
2726
console.debug('Window metadata not available for PiP toggle, using null window label');

src-tauri/src/scripts/js/zoom_script.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ document.addEventListener('keydown', (event) => {
88
let windowLabel = null;
99
try {
1010
// Check if metadata and currentWindow exist
11-
if (window.__TAURI_INTERNALS__.metadata &&
12-
window.__TAURI_INTERNALS__.metadata.currentWindow) {
11+
if (window.__TAURI_INTERNALS__.metadata?.currentWindow) {
1312
windowLabel = window.__TAURI_INTERNALS__.metadata.currentWindow.label;
1413
} else {
1514
console.debug('Window metadata not available for keyboard shortcut, using null window label');
@@ -59,8 +58,7 @@ if (window.__TAURI_INTERNALS__) {
5958
let windowLabel = null;
6059
try {
6160
// Check if metadata and currentWindow exist
62-
if (window.__TAURI_INTERNALS__.metadata &&
63-
window.__TAURI_INTERNALS__.metadata.currentWindow) {
61+
if (window.__TAURI_INTERNALS__.metadata?.currentWindow) {
6462
windowLabel = window.__TAURI_INTERNALS__.metadata.currentWindow.label;
6563
console.debug('Initializing zoom level for window:', windowLabel);
6664
} else {

0 commit comments

Comments
 (0)