mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 12:19:08 +00:00
Change code buttons to refresh the page with the language name after the ? in the url
This commit has two benefits: - Now, copying the URL will actually copy the current language as well. You don't need to think to add a language - If a language moves objects on the page down, the tocify header location cache will not be invalid, since it is generated on page load. Therefore, if code moves some elements down, since the page is reloaded, the cache will also be regenerated, to reflect the real locations of the headers.
This commit is contained in:
parent
bc79a655e5
commit
541998da39
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ function setupLanguages(l) {
|
|||
}
|
||||
|
||||
$("#lang-selector a").bind("click", function() {
|
||||
activateLanguage($(this).data("language-name"));
|
||||
window.location.replace("?" + $(this).data("language-name") + window.location.hash);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue