0

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.

propostaff
  • 55
  • 3
  • 10

1 Answers1

0

You should be using a progress listener in Firefox, onLocationChange method 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.webNavigation API provides a similar mechanism in Chrome. The onCommitted event should fire when the URL changes.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126