Template:Random: Difference between revisions

Template page
No edit summary
No edit summary
 
Line 7: Line 7:
     if(frame.src !== undefined) {
     if(frame.src !== undefined) {
       if(frame.src.includes('RANDOMHERE')){
       if(frame.src.includes('RANDOMHERE')){
         frame.src = frame.src.replace('RANDOMHERE', pageRandom);
         frame.src = frame.src.replace(/RANDOMHERE/g, pageRandom);
       }
       }
     }
     }
Line 16: Line 16:
     if(span.innerText !== undefined) {
     if(span.innerText !== undefined) {
       if(span.innerText.includes('RANDOMHERE')){
       if(span.innerText.includes('RANDOMHERE')){
         span.innerText = span.innerText.replace('RANDOMHERE', pageRandom);
         span.innerText = span.innerText.replace(/RANDOMHERE/g, pageRandom);
       }
       }
     }
     }

Latest revision as of 19:53, 9 March 2022