JS code that retrieves all HTML files with data-localize attributes and localizes them.
More...
JS code that retrieves all HTML files with data-localize attributes and localizes them.
- Author
- Copyright (C) 2022 TotalCaesar659
See https://github.com/polcak/jsrestrictor/pull/189 for the origins of the code.
- License:
- SPDX-License-Identifier: GPL-3.0-or-later
◆ for()
◆ localizeHTMLelement()
function localizeHTMLelement |
( |
|
e | ) |
|
◆ templates
const templates = document.getElementsByTagName("template") |
◆ textElements
const textElements = document.querySelectorAll('[data-localize]') |