forked from FrederikBaerentsen/BrickTracker
Simplify the way javascript is loaded (we don't have that many scripts running) and use data attribute to instantiate grid and tables
This commit is contained in:
@@ -115,13 +115,11 @@ class BrickChanger {
|
||||
}
|
||||
|
||||
// Helper to setup the changer
|
||||
const setup_changers = () => {
|
||||
document.querySelectorAll("*[data-changer-id]").forEach(el => {
|
||||
new BrickChanger(
|
||||
el.dataset.changerPrefix,
|
||||
el.dataset.changerId,
|
||||
el.dataset.changerUrl,
|
||||
el.dataset.changerParent
|
||||
);
|
||||
});
|
||||
}
|
||||
const setup_changers = () => document.querySelectorAll("*[data-changer-id]").forEach(
|
||||
el => new BrickChanger(
|
||||
el.dataset.changerPrefix,
|
||||
el.dataset.changerId,
|
||||
el.dataset.changerUrl,
|
||||
el.dataset.changerParent
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user