From 86168b158a18feb3b30554c04ccb269478ae3253 Mon Sep 17 00:00:00 2001 From: bsouter Date: Mon, 1 Aug 2016 07:01:06 -0700 Subject: [PATCH] Auto add "comingsoon" class Add "comingsoon" and "broken_link" class to known broken Domain Names. Remove or comment out entire function when not needed, for performance. --- en/tools/explore/javascript/explore.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/en/tools/explore/javascript/explore.js b/en/tools/explore/javascript/explore.js index 1667466..43d6dca 100644 --- a/en/tools/explore/javascript/explore.js +++ b/en/tools/explore/javascript/explore.js @@ -69,4 +69,16 @@ function findOtherNames(thera, thedec) { alert("Error: Could not resolve coordinates."); } }); -} \ No newline at end of file +} + +// KNOWN BROKEN LINKS +// Add "comingsoon" and "broken_link" class to known broken Domain Names. +(function ($) { + $(document).ready(function(){ + var $dns = ["https://dr13.sdss.org" , "https://sas.sdss.org", "http://dr13.sdss.org" , "http://sas.sdss.org" ]; + $dns.forEach( function( elem, indx, arr){ + $('a[href^="'+elem+'"]').addClass("broken_link"); + $('a[href^="'+elem+'"]').addClass("comingsoon"); + }); + }); +})(jQuery);