We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second.
$(document).ready(function () {
window.WcpConsent && WcpConsent.init("en-us", "cookie-banner", function (err, _siteConsent) {
if (err != undefined) {
return error;
} else {
siteConsent = _siteConsent;
if (_siteConsent.isConsentRequired) {
$("#Fragment_BottomLinks .links.horizontal").append("Manage cookies");
}
}
});
});
$('#HeaderSearchButton').click(function (e) {
e.preventDefault();
var url = "https://learn.microsoft.com/en-us/search/?terms=";
var searchBoxElement = $('#HeaderSearchTextBox');
if (!searchBoxElement || !searchBoxElement.val() || searchBoxElement.val().length < 1) {
return;
}
window.location = url + searchBoxElement.val();
});
$('#HeaderSearchTextBox').keydown(function (e) {
if (e.keyCode === 13) {
$('#HeaderSearchButton').click();
return false;
}
});
function manageConsent() {
if (siteConsent.isConsentRequired) {
siteConsent.manageConsent();
}
}
var excludedForumsLocales = ["cs-cz", "es-mx", "fi-fi", "fr-be", "hu-hu", "it-it", "nb-no", "nl-be", "nl-nl", "pt-pt", "sv-se", "zh-hk", "zh-tw"];
var excludedSampleLocales = ["es-mx", "fi-fi", "fr-be", "ja-jp", "nb-no", "nl-be", "nl-nl", "pt-pt", "ro-ro", "sv-se"];
function isPartsInArray(path, array) {
for (var i in array) {
if (path.indexOf(array[i]) >= 0) {
return true;
}
}
return false;
}
function highlightCurrent() {
var path = window.location.pathname.toLowerCase();
if (path.indexOf("azure") == -1) {
if (path.indexOf("forums") >= 0 && !isPartsInArray(path, excludedForumsLocales)) {
$("ul.navL1 > li:nth-child(3)").addClass("current");
$("ul.navL1 > li:nth-child(3) > ul > li:nth-child(2)").addClass("current");
} else if (path.indexOf("samples") >= 0) {
if (path.indexOf("de-de") >= 0) {
$("ul.navL1 > li:nth-child(5)").addClass("current");
} else if (!isPartsInArray(path, excludedSampleLocales)){
$("ul.navL1 > li:nth-child(4)").addClass("current");
$("ul.navL1 > li:nth-child(4) > ul > li:nth-child(3)").addClass("current");
}
}
}
};
highlightCurrent();