I'm quite familiar with XPath in PHP, and wanted to use it within JavaScript with the end goal of making an extension to help me with something.
I have the following XPath which works and tested in the dev tools on Chrome:
//div[contains(@data-bt,'rank')]
However, it doesn't seem to work with querySelectorAll. Yet the following does:
document.querySelectorAll("div[data-bt]")
I've also noticed that using // on the XPath seems to throw an error saying its not a valid selector.