Remove jQuery ($) global

This commit is contained in:
Bill Thornton committed 2026-09-24 16:41:22 -04:00
1 parent 02bc79a374
commit e1ff80a6e7
6 files changed
+14 -19

No files matched your search

-2
View File
@@ -215,8 +215,6 @@ export default tseslint.config(
'webapis': 'readonly',
// WebOS globals
'webOS': 'readonly',
// Dependency globals
'$': 'readonly',
// Jellyfin globals
'ApiClient': 'readonly',
// Build time definitions
@@ -1,4 +1,5 @@
import 'jquery';
import $ from 'jquery';
import loading from '../loading/loading';
import globalize from '../../lib/globalize';
import '../../elements/emby-checkbox/emby-checkbox';
+2 -1
View File
@@ -1,4 +1,5 @@
import 'jquery';
import $ from 'jquery';
import loading from '../loading/loading';
import globalize from '../../lib/globalize';
import '../../elements/emby-checkbox/emby-checkbox';
+6 -13
View File
@@ -1,6 +1,9 @@
import $ from 'jquery';
import { importModule } from '@uupaa/dynamic-import-polyfill';
import Dashboard from 'utils/dashboard';
import './viewManager/viewContainer.scss';
import Dashboard from '../utils/dashboard';
const getMainAnimatedPages = () => {
return document.querySelector('.mainAnimatedPages');
@@ -65,13 +68,13 @@ export function loadView(options) {
}
if (currentPage) {
if (newViewInfo.hasScript && window.$) {
if (newViewInfo.hasScript) {
mainAnimatedPages.removeChild(currentPage);
view = $(view).appendTo(mainAnimatedPages)[0];
} else {
mainAnimatedPages.replaceChild(view, currentPage);
}
} else if (newViewInfo.hasScript && window.$) {
} else if (newViewInfo.hasScript) {
view = $(view).appendTo(mainAnimatedPages)[0];
} else {
mainAnimatedPages.appendChild(view);
@@ -109,11 +112,6 @@ export function loadView(options) {
afterAnimate(allPages, pageIndex);
}
if (window.$) {
$.mobile = $.mobile || {};
$.mobile.activePage = view;
}
return view;
});
}
@@ -213,11 +211,6 @@ export function tryRestoreView(options) {
afterAnimate(allPages, index);
}
if (window.$) {
$.mobile = $.mobile || {};
$.mobile.activePage = view;
}
return view;
});
}
+1 -1
View File
@@ -1,5 +1,5 @@
import escapeHtml from 'escape-html';
import 'jquery';
import $ from 'jquery';
import 'material-design-icons-iconfont';
import globalize from 'lib/globalize';
+3 -1
View File
@@ -1,3 +1,5 @@
import $ from 'jquery';
import globalize from 'lib/globalize';
export function showLayoutMenu (button, currentLayout, views) {
@@ -30,7 +32,7 @@ export function showLayoutMenu (button, currentLayout, views) {
cancelable: false
}));
if (!dispatchEvent && window.$) {
if (!dispatchEvent) {
$(button).trigger('layoutchange', [id]);
}
}