How can I change every http to https using JavaScript in source code? -


i change every instance of http https using javascript. how can this? source code like?

anyway, assume after in tags, should easy extrapolate others:

if (document.location.protocol === 'https:') {     $('a').each(function() {         var href = $(this).attr('href');         if (href.indexof('http:') > -1) {             href = href.replace('http:', 'https:');             $(this).attr('href', href);         }     }); } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -