// don't use the (ugly) new font // $("body").css("font-family", $("body").css("font-family").replace("BlinkMacSystemFont,", "")); // releases tab let repoNav = $("nav.reponav"); if (repoNav.length > 0) { let repoUrl = $("div.repohead-details-container > h1.public > strong[itemprop=name] > a").attr("href"); let releasesUrl = repoUrl + "/releases"; let releasesTab = $(""); releasesTab.attr("href", releasesUrl); releasesTab.attr("data-selected-links", releasesUrl); releasesTab.addClass("js-selected-navigation-item reponav-item"); let icon = $(""); releasesTab.append(icon); releasesTab.append(" Releases"); let counter = $(""); counter.text("0"); counter.addClass("counter"); releasesTab.append(counter); repoNav.append(releasesTab); $.ajax({ url: "https://api.github.com/repos" + repoUrl + "/releases", dataType: "text", success: (data) => { let json = JSON.parse(data); counter.text(json.length); } }); if (location.pathname.endsWith("/releases")) { $("nav.reponav > span:first > a").removeClass("selected"); releasesTab.addClass("selected"); } } // add explore link to menu if (!location.hostname.startsWith("gist")) { let lastItem = $(".header-nav[role=navigation] > .header-nav-item:last"); if (lastItem.find("a.header-nav-link").text() != "Explore") { let exploreItem = $("
  • "); exploreItem.addClass("header-nav-item"); let exploreLink = $(""); exploreLink.addClass("header-nav-link"); exploreLink.attr("href", "/explore"); exploreLink.text("Explore"); exploreItem.append(exploreLink); lastItem.before(exploreItem); } }