I am write browser extension for vk.com. This site use historyAPI to change url in adress bar and load content with ajax. I need detect URL change in my extension, and don’t know how =( onhashchange don’t work. In arsenal i am have jquery. Ssory for my english and please help.
Share
You should be using a progress listener in Firefox,
onLocationChangemethod of the listener will be called for each change in the address bar. Please do not use polling – this will both waste CPU resources and drain battery in laptops.chrome.webNavigationAPI provides a similar mechanism in Chrome. TheonCommittedevent should fire when the URL changes.