Forum:http://tifosigialloverdi.forumattivo.com/(not mine)
Issue:Upon saving modifications on a js code(in the js codes management), the code does not update on the forum. Basically it runs the old version, even though I tried saving the new code 3 times, deleting it and recreating it, turning the js codes management on and off and cleaning the browser cache.
The JS code(irrelevant i think):
I'm sure the code is syntactically correct.
Also, I noticed turning the JS codes management off has no effect on this very code, while turning it on does not load the other codes on that forum. What is going on?
Issue:Upon saving modifications on a js code(in the js codes management), the code does not update on the forum. Basically it runs the old version, even though I tried saving the new code 3 times, deleting it and recreating it, turning the js codes management on and off and cleaning the browser cache.
The JS code(irrelevant i think):
- Code:
function parse(resp, i, loader){
var parser=new DOMParser();
var doc=parser.parseFromString(resp, "text/html");
var html=doc.querySelectorAll(".post-entry>div:nth-child(2)");
html=html[0].innerHTML;
render(html, i, loader);
}
function render(html, i, loader){
loader[i].className="last_mess";
loader[i].innerHTML=html;
}
document.addEventListener("DOMContentLoaded", function(){
var con=document.querySelectorAll(".ipbtable>tbody>tr>.row1>span>a:not(.last-post-icon)"), len=con.length;
for(var j=0;j<len;j++){
var load=document.createElement("div");
load.className="loader";
con[j].parentElement.parentElement.appendChild(load);
}
var loader=document.querySelectorAll(".loader");
(function get(i){
var href=con[i].getAttribute("href");
fetch(href+"?view=newest").then(function(response){
return response.text();
}).then(function(html){
parse(html, i, loader);
if(i<len-1) get(++i);
});
}(0))
})
I'm sure the code is syntactically correct.
Also, I noticed turning the JS codes management off has no effect on this very code, while turning it on does not load the other codes on that forum. What is going on?
Last edited by Justice™ on September 22nd 2018, 4:59 pm; edited 1 time in total