gboudreau/sabconnectplusplus — pull request #63 by ppslim (2013-01-29 21:44:53+00:00)
Title: Correct the tab we inject our code to when Newznab is triggered

chrome.tabs.executeScript was passed null, when it should be the tabId associated with the Newznab window we want.

This optional parameter will inject the the code into the current tab when set to null, which may not be a Newznab window.

Example:
* Load a.n.newznab website in tab 1
* Type a.n.newznab address in a second tab
* Immediately switch to the first tab on hitting enter

The result is that you will see multiple sab links for the listed downloads, but tab 2 has none. Repeat steps two & three and watch the links grow in tab 1. tabId ensures we inject to the window the load event occurred in.