mirror of
https://github.com/Michatec/MiniFaceBook.git
synced 2026-03-31 23:46:30 +02:00
Files
This commit is contained in:
9
static/js/translate.js
Normal file
9
static/js/translate.js
Normal file
@@ -0,0 +1,9 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.querySelectorAll('.lang-select').forEach(function(el) {
|
||||
el.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
document.cookie = "lang=" + this.dataset.lang + ";path=/";
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user