Преглед на файлове

Remove unused Javascript

Jeremy Stretch преди 2 години
родител
ревизия
f41105d5e3
променени са 4 файла, в които са добавени 0 реда и са изтрити 17 реда
  1. 0 0
      netbox/project-static/dist/netbox.js
  2. 0 0
      netbox/project-static/dist/netbox.js.map
  3. 0 15
      netbox/project-static/src/links.ts
  4. 0 2
      netbox/project-static/src/netbox.ts

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
netbox/project-static/dist/netbox.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 0 - 15
netbox/project-static/src/links.ts

@@ -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);
-      });
-    }
-  }
-}

+ 0 - 2
netbox/project-static/src/netbox.ts

@@ -12,7 +12,6 @@ import { initInterfaceTable } from './tables';
 import { initSideNav } from './sidenav';
 import { initDashboard } from './dashboard';
 import { initRackElevation } from './racks';
-import { initLinks } from './links';
 import { initHtmx } from './htmx';
 
 function initDocument(): void {
@@ -31,7 +30,6 @@ function initDocument(): void {
     initSideNav,
     initDashboard,
     initRackElevation,
-    initLinks,
     initHtmx,
   ]) {
     init();

Някои файлове не бяха показани, защото твърде много файлове са промени