diff options
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r-- | src/dumbymap.mjs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index e5dd2cd..4a11bcb 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -177,10 +177,18 @@ export const generateMaps = (container, { | |||
177 | } | 177 | } |
178 | }) | 178 | }) |
179 | 179 | ||
180 | /** Create GeoLinks and DocLinks */ | 180 | /** Create DocLinks */ |
181 | container.querySelectorAll(docLinkSelector) | 181 | container.querySelectorAll(docLinkSelector) |
182 | .forEach(utils.createDocLink) | 182 | .forEach(utils.createDocLink) |
183 | 183 | ||
184 | /** Add external symbol on anchors */ | ||
185 | container.querySelectorAll('a') | ||
186 | .forEach(a => { | ||
187 | if (a.href.startsWith('http') && !a.href.startsWith(window.location.origin)) { | ||
188 | a.classList.add('external') | ||
189 | } | ||
190 | }) | ||
191 | |||
184 | /** Set CRS and GeoLinks */ | 192 | /** Set CRS and GeoLinks */ |
185 | register(proj4) | 193 | register(proj4) |
186 | fromEPSGCode(crs).then(projection => { | 194 | fromEPSGCode(crs).then(projection => { |