53,890
edits
(Location Map has been moved to the FsHeader extension) |
m (fix bad ReplaceText) Tag: Rollback |
||
Line 347: | Line 347: | ||
/* end Accordion button */ | /* end Accordion button */ | ||
/* This is where the code for inserting the Location Map starts. */ | |||
(function() { | |||
if (document.querySelector('h1#firstHeading').innerHTML === "Guided Research for Online Records") { | |||
var polyfill = document.createElement('script'); | |||
polyfill.type = 'text/javascript'; | |||
polyfill.async = true; | |||
polyfill.src = 'https://edge.fscdn.org/assets/components/mapFiles/webcomponentsjs/webcomponents-lite-60405515c49744988a6a24e03dedf15a.js'; | |||
var s = document.getElementsByTagName('script')[0]; | |||
s.parentNode.insertBefore(polyfill, s); | |||
var locationMap = document.createElement('link'); | |||
locationMap.rel = 'import'; | |||
/* CHANGE NEEDED: update URL below every time the location-map.html is changed */ | |||
locationMap.href = 'https://gist.githubusercontent.com/ahancey/a86414a07c7c1466cc36ffb790a0817d/raw/748a662f88adf92729d925ebf5fb1ce26ec0bb38/location-map.html'; | |||
var s = document.getElementsByTagName('script')[0]; | |||
s.parentNode.insertBefore(locationMap, s); | |||
document.querySelector('#mw-content-text p').innerHTML = "<div style='width: 1000px;'><location-map></location-map></div>"; | |||
} | |||
})(); |
edits