1
Friends, I wonder if it is possible to create a method that scans an html page or only inside a div, looking for a specific word and replace it with another word.
I’m trying to do this because I’m using a plugin on my site, and the same does advertisements, I don’t want to veto advertisements, I just want to have a control of the words that this plugin will use in the advertisements it does. Is it possible? Thanks in advance!
Plugin:
<script type='text/javascript'>
(function(){ var widget_id = 'qZZLGGRS0H';var d=document;var w=window;function l(){
var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//code.jivosite.com/script/widget/'+widget_id; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);}if(d.readyState=='complete'){l();}else{if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();</script>
You have two questions in one: 1- it is possible to scan a page and replace content: yes, 2- it is possible to replace content inside plugins: probably not because if they are
iframe
s there are browser security measures that prevent this.– Sergio
That said :You can put an example plugin?
– Sergio
posted the plugin. ?
– Yago Lima
You can process the script on the server side and then integrate it into your page, but then it won’t activate the advertiser statistic...
– Sergio