I am trying to get my little js script to run once the entire dom or content of the aspx is loaded.
I have loaded the below:
JavaScript that executes after page load
and they still fire everytime an element is loaded.
I also tried
document.addEventListener("DOMContentLoaded", function () {
//Me Script!
});
This kinda works it loades the entire page before running the script for the number of times per element.
Or if there is a work around for my script so that it still forces what I want. Which is just add two slashes to my chosen links. ie file://///jobs/year/etc
if (isFirefox || isChrome) {
//You can use what ever to detect links, you can do it by tag and get every link.
var linkmodify = document.getElementsByClassName("fa-folder-open");
for (var i = 0; i < linkmodify.length; i++) {
var replacementLink = "";
link = linkmodify[i].href;
for (var j = 0; j < link.length; j++) {
if (j == 5) {
replacementLink += '//';
}
replacementLink += link[j];
}
linkmodify[i].href = replacementLink;
}
}
Currently the links only have the standard three slashes.