Skip to content

Commit

Permalink
Cleanup SonarQube issues
Browse files Browse the repository at this point in the history
Signed-off-by: John Mertic <[email protected]>
  • Loading branch information
jmertic committed Nov 23, 2024
1 parent 67faf1d commit 49daeb1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions embed.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
function includeHTML() {
/* Loop through a collection of all HTML elements: */
var z = document.getElementsByTagName("*");
for (var i = 0; i < z.length; i++) {
var elmnt = z[i];
let z = document.getElementsByTagName("*");
for (let elmnt of z) {
/*search for elements with a certain atrribute:*/
var file = elmnt.getAttribute("w3-include-html");
let file = elmnt.getAttribute("w3-include-html");
if (file) {
/* Make an HTTP request using the attribute value as the file name: */
var xhttp = new XMLHttpRequest();
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
Expand Down

0 comments on commit 49daeb1

Please sign in to comment.