Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab){
- function(tabId, changeInfo, tab){
- //using tab.url and XMLHttpRequest() i get newText for:
- chrome.browserAction.setBadgeText({text: newText});
- };
- });
- chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab){
- function(tabId, changeInfo, tab){
- if(!changeInfo.url) return; // URL did not change
- // Might be better to analyze the URL to exclude things like anchor changes
- /* ... */
- chrome.browserAction.setBadgeText({text: newText}, tab.id);
- };
- });
- chrome.browserAction.setBadgeText({text: newText}, tab.id); //<<this is not working to me
- chrome.browserAction.setBadgeText({text: "Phish", tabId: tab.id}); //<<This is working to me
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement