I’d like to write an extension that adds a div element to a page when a specific URL is loaded (e.g. when the url is http://www….&q=car&aq I’d like to have a div element containing “car” added to the webpage)
I’m already using addEventListener to check if a tab is open but I don’t know how to do it for a specific URL.
p.s I’m not asking you guys to do my homework, only some links to tutorials speaking of this kind of tricks or basic examples d.s
You can get the url using the command
window.locationso you can do something likeThis line !$.browser.msie is actually jquery, and might not compile incase you are not including jquery libraries, it basically checks for the browser version is not IE.
You can remove this part — && !$.browser.msie — if you are not using jquery.