javascript - Prevent Script from loading normally -


i creating chrome extension webpage. page has script execute changes way page displayed removing or emptying elements. found <script> tag need delete or stop executing. there way load page memory, parse remove <script> tag , load normally?

the way can remove code via javascript of yet use chrome inspector disable javascript , run following code.

var scripts = document.getelementsbytagname('script');    (i=0, max=scripts.length; < max; i++){       var currents = scripts[i];       var xinner = currents.innerhtml;       if (xinner.indexof('jsmenu1') < 1){           currents.parentnode.removechild(currents);       }    } 

strange request. work.

$(document).ready(function() {     var $html = $('html');     var $script = $html.find('script#scripttoremove');     $script.remove();       var htmlstr = $html.html();     $html.html(htmlstr);  });


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -