mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-01-13 08:50:31 +08: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:
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user