mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Remove unused Javascript
This commit is contained in:
parent
25723aebe0
commit
f41105d5e3
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -1,15 +0,0 @@
|
|||||||
import { isTruthy, getElements } from './util';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allow any element to be made "clickable" with the use of the `data-href` attribute.
|
|
||||||
*/
|
|
||||||
export function initLinks(): void {
|
|
||||||
for (const link of getElements('*[data-href]')) {
|
|
||||||
const href = link.getAttribute('data-href');
|
|
||||||
if (isTruthy(href)) {
|
|
||||||
link.addEventListener('click', () => {
|
|
||||||
window.location.assign(href);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -12,7 +12,6 @@ import { initInterfaceTable } from './tables';
|
|||||||
import { initSideNav } from './sidenav';
|
import { initSideNav } from './sidenav';
|
||||||
import { initDashboard } from './dashboard';
|
import { initDashboard } from './dashboard';
|
||||||
import { initRackElevation } from './racks';
|
import { initRackElevation } from './racks';
|
||||||
import { initLinks } from './links';
|
|
||||||
import { initHtmx } from './htmx';
|
import { initHtmx } from './htmx';
|
||||||
|
|
||||||
function initDocument(): void {
|
function initDocument(): void {
|
||||||
@ -31,7 +30,6 @@ function initDocument(): void {
|
|||||||
initSideNav,
|
initSideNav,
|
||||||
initDashboard,
|
initDashboard,
|
||||||
initRackElevation,
|
initRackElevation,
|
||||||
initLinks,
|
|
||||||
initHtmx,
|
initHtmx,
|
||||||
]) {
|
]) {
|
||||||
init();
|
init();
|
||||||
|
Loading…
Reference in New Issue
Block a user