index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-28 14:45:20 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-28 14:45:20 -0700 |
commit | e8fbe161e473a949f776f89d94e9816a64cd3114 (patch) | |
tree | 5def4f8e9e499d3280bc83c5f23edd642850193c /src/import_mapsheets.js | |
parent | a34cd1a5414eec5a059c5f20a3940bf4ef6b977e (diff) |
Import mapsheets.svg
Diffstat (limited to 'src/import_mapsheets.js')
-rw-r--r-- | src/import_mapsheets.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/import_mapsheets.js b/src/import_mapsheets.js new file mode 100644 index 0000000..2e1b0fc --- /dev/null +++ b/src/import_mapsheets.js @@ -0,0 +1,8 @@ +import mapsheets from './assets/images/mapsheets.svg'; + +const useEls = document.querySelectorAll('svg use[data-href*="mapsheets.svg"'); + +useEls.forEach(el => { + const href = el.dataset.href.replace('mapsheets.svg', mapsheets.split('/').pop()); + el.setAttributeNS(null, 'href', href); +}); |