jquery - How to tell Chrome, please use local javascript from the browser for every site or any actions? Similar to Opera -


i using chromium / google chrome browser in ubuntu desktop. testing reason, need run javascript browser not website server javascript code.

is there way in chrome can attach source, executed anytime when browser go web page?

$("#id").find("div").find("li").find("p").find("b").html(" adult scene deleted "); 

this not run server scripts, js file want embed in browser. (like believe opera has feature, how such in chrome?)

i don't think there possible way that, can create bookmarklet in chrome, or other modern browser (like firefox). here's how it:

  1. create local html page anchor tag following in it:

    <a href='javascript:$("#id").find("div").find("li").find("p").find("b").html(" adult scene deleted ");' target="_blank">the link</a>
  2. then, drag link bookmarks bar when open webpage in chrome.

  3. now, when click on bookmark in chrome, happen.

please note using jquery, bookmarklet work in pages using jquery. however, can use code instead (but modify , compress before using it):

var elements = document.getelementbyid("id").getelementsbytagname("b"); for(var = 0; i<elements.length; i++){     elements[i].innerhtml = " adult scene deleted "; } 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -