mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 09:49:14 +02:00
Update privatebin.js
This commit is contained in:
parent
493d848c83
commit
b0df8e10f5
1 changed files with 9 additions and 1 deletions
|
@ -930,7 +930,15 @@ jQuery.PrivateBin = (function($) {
|
|||
}
|
||||
|
||||
// load strings from JSON
|
||||
$.getJSON('i18n/' + newLanguage + '.json' + new URL(document.currentScript.src).search, function(data) {
|
||||
let main_script = document.querySelector('script[src^="js/privatebin.js"]');
|
||||
|
||||
if (main_script) {
|
||||
let privatebin_version = main_script.getAttribute("src").split("?")[1] || null;
|
||||
} else {
|
||||
let privatebin_version = Math.floor(Date.now() / 60000);
|
||||
}
|
||||
|
||||
$.getJSON('i18n/' + newLanguage + '.json?v=' + privatebin_version, function(data) {
|
||||
language = newLanguage;
|
||||
translations = data;
|
||||
$(document).triggerHandler(languageLoadedEvent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue