diff --git a/_includes/html_include.html b/_includes/html_include.html index df4fa3322ae..3e5530f30c1 100644 --- a/_includes/html_include.html +++ b/_includes/html_include.html @@ -93,7 +93,6 @@ - /assets/js/contentcards.js {% endjavascript_asset_tag %} - diff --git a/assets/js/developer_nav.js b/assets/js/developer_nav.js deleted file mode 100644 index a56f4fc2b78..00000000000 --- a/assets/js/developer_nav.js +++ /dev/null @@ -1,119 +0,0 @@ -$(document).ready(function () { - if (page_collection !== "developer_guide") { - return; - } - var exclusion_list = [ - "parent_nav_top_platformintegrationguides_sdkprimer", - "parent_nav_top_platformintegrationguides_sdkchangelogs", - ]; - - var url_selected = (location.pathname.split("/")[4] || "").replace(/_/g, ""); - if (site_language != 'en') { - url_selected = (location.pathname.split("/")[5] || "").replace(/_/g, ""); - } - var dev_selected = (url_selected - ? `parent_nav_top_platformintegrationguides_${url_selected}` - : Cookies.get("__dev_selected") || "").toLowerCase(); - var platform_objects = $("#nav_top_platformintegrationguides > div.nav-item"); - var platform_list = []; - var hide_list = []; - var show_list = []; - var select_html = - '
"; - $("#parent_nav_home div .nav_block").append(select_html); - $("#dev_select").change(function (e) { - var $this = $(this); - var cur_sel = $this.val(); - Cookies.set("__dev_selected", cur_sel); - if (!cur_sel) { - $(platform_list).each(function (i, v) { - $("#" + v).show(); - }); - } else { - $(platform_list).each(function (i, v) { - if (exclusion_list.indexOf(v) == -1) { - if ($("#" + v + " a").attr("aria-expanded") == "true") { - $("#" + v + " a").trigger("click"); - } - $("#" + v).hide(); - } - }); - show(cur_sel); - } - }); - $("#guide_featured_list a, #guide_list a").click(function (e) { - var $this = $(this); - var navlink = $this.attr("data-navlink"); - if (navlink) { - navlink = "parent_nav_top_platformintegrationguides_" + navlink; - if (platform_list.indexOf(navlink) > -1) { - Cookies.set("__dev_selected", navlink); - } - } - }); - - function hide(dropdown_id) { - var navigation_id = $("#" + dropdown_id + " a"); - $("#" + dropdown_id).hide(); - if (navigation_id.attr("aria-expanded") === "true") { - navigation_id.trigger("click"); - } - } - - function show(dropdown_id) { - var navigation_id = $("#" + dropdown_id + " a"); - $("#" + dropdown_id).show(); - if (navigation_id.attr("aria-expanded") === "false") { - navigation_id.trigger("click"); - } - } - -});