Skip to content

Commit

Permalink
Eye icon is not present on page when url contains #
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinjain024 committed Jan 28, 2014
1 parent 16f2443 commit 3487792
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ SW.methods.clearBulkNotifications = function(urls) {

SW.methods.sendMessageToContentScript = function(message, options) {
options = options || {};
var hashPosition = (options.url ? options.url.indexOf('#') : -1);

// Remove # if it is present in the URL
if (hashPosition != -1) {
options.url = options.url.substr(0, hashPosition);
}

chrome.tabs.query(options, function(tabs) {
$.each(tabs, function(index, tab) {
chrome.tabs.sendMessage(tab.id, message);
Expand Down

0 comments on commit 3487792

Please sign in to comment.