TokiTranslate/app/javascript/application.js

11 lines
419 B
JavaScript
Raw Permalink Normal View History

2023-10-12 23:34:46 +00:00
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
//import "@hotwired/turbo-rails"
2023-10-12 23:34:46 +00:00
import "controllers"
let switchLanguageForm = document.querySelector("#active_language_form");
let switchLanguageSelectTag = document.querySelector("#active_language_select_tag");
switchLanguageSelectTag.addEventListener("change", (event) => {
switchLanguageForm.submit();
});