MediaWiki:Mobile.js: Difference between revisions

Remove Deprecated code for GR Main Page map
No edit summary
Tags: Mobile edit Mobile web edit
(Remove Deprecated code for GR Main Page map)
Line 284: Line 284:
/* end Accordion button */
/* end Accordion button */


/**** TAKE ME OUT *********/
/* 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>";
    }
})();


/* code for new landing page */
/* code for new landing page */
53,890

edits