mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 15:46:44 +00:00
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
$(document).ready(function($) {
|
|
var currentURL = window.location.href;
|
|
const element = document.getElementById('gb')
|
|
element.addEventListener("click", () => {
|
|
if (currentURL.includes("/es/")) {
|
|
location.href = currentURL.split("/es/")[0] + "/en/" + currentURL.split("/es/")[1]
|
|
}
|
|
});
|
|
const element1 = document.getElementById('es')
|
|
element1.addEventListener("click", () => {
|
|
if (currentURL.includes("/en/")) {
|
|
location.href = currentURL.split("/en/")[0] + "/es/" + currentURL.split("/en/")[1]
|
|
}
|
|
});
|
|
$('table.tablesorter').tablesorter();
|
|
$('#authentication-select').change(function() {
|
|
$('.authentication-method').hide();
|
|
let method = $(this).val();
|
|
$(`#authenticate-${method}`).show();
|
|
});
|
|
});
|
|
|
|
function redirect_api_explorer_url(api_explorer_url) {
|
|
var currentURL = window.location.href.split("/");
|
|
if (currentURL[3] == "en") {
|
|
location.href = api_explorer_url + "&locale=en_GB";
|
|
}
|
|
else {
|
|
location.href = api_explorer_url + "&locale=es_ES";
|
|
}
|
|
}
|