Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.tabs.onCreated.addListener(
- function(tab)
- {
- console.groupCollapsed('tab created');
- console.log(tab);
- console.log('tab id', tab.id);
- console.log('tab index', tab.index);
- console.log('tab url', tab.url);
- console.log('tab title', tab.title);
- console.log('tab object', tab);
- console.groupEnd();
- }
- );
- chrome.tabs.onUpdated.addListener(
- function(tabId, changeInfo, tab)
- {
- console.groupCollapsed('tab updated');
- console.log('tab id', tabId);
- console.log('tab index', tab.index);
- console.log('tab url', tab.url);
- console.log('tab title', tab.title);
- console.log('change info status', changeInfo.status);
- console.log('change info url', changeInfo.url);
- console.log('change info title', changeInfo.title);
- console.log('change info audible', changeInfo.audible);
- if (changeInfo.mutedInfo)
- {
- console.log('change info muted info muted', changeInfo.mutedInfo.muted);
- console.log('change info muted info reason', changeInfo.mutedInfo.reason);
- console.log('change info muted info extension id', changeInfo.mutedInfo.extensionId);
- }
- console.log('muted info', mutedInfo);
- console.log('change info', changeInfo);
- console.log('tab object', tab);
- console.groupEnd();
- }
- );
- chrome.tabs.onMoved.addListener(
- function(tabId, moveInfo)
- {
- console.groupCollapsed('tab moved');
- console.log('tab id', tabId);
- console.log('move info window id', moveInfo.windowId);
- console.log('move info from index', moveInfo.fromIndex);
- console.log('move info to index', moveInfo.toIndex);
- console.log('move info', moveinfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onActivated.addListener(
- function(activeInfo)
- {
- console.groupCollapsed('tab activated');
- console.log('active info tab id', activeInfo.tabId);
- console.log('active info window id', activeInfo.windowId);
- console.log('active info', activeInfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onHighlighted.addListener(
- function(highlightInfo)
- {
- console.groupCollapsed('tab highlighted');
- console.log('highlight info window id', highlightInfo.windowId);
- console.log('highlight info tabIds', highlightInfo.tabIds);
- console.log('highlight info', highlightInfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onDetached.addListener(
- function(tabId, detachInfo)
- {
- console.groupCollapsed('tab detached');
- console.log('tab id', tabId);
- console.log('detach info old window id', detachInfo.oldWindowId);
- console.log('detach info old position', detachInfo.oldPosition);
- console.log('detach info', detachInfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onAttached.addListener(
- function(tabId, attachInfo)
- {
- console.groupCollapsed('tab attached');
- console.log('tab id', tabId);
- console.log('attach info new window id', attachInfo.newWindowId);
- console.log('attach info new position', attachInfo.newPosition);
- console.log('attach info', attachInfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onRemoved.addListener(
- function(tabId, removeInfo)
- {
- console.groupCollapsed('tab removed');
- console.log('tab id', tabId);
- console.log('remove info window id', removeInfo.windowId);
- console.log('remove info is window closing', removeInfo.isWindowClosing);
- console.log('remove info', removeInfo);
- console.groupEnd();
- }
- );
- chrome.tabs.onReplaced.addListener(
- function(addedTabId, removedTabId)
- {
- console.groupCollapsed('tab replaced');
- console.log('added tab id', addedTabId);
- console.log('removed tab id', removedTabId);
- console.groupEnd();
- }
- );
- chrome.tabs.onZoomChange.addListener(
- function(zoomChangeInfo)
- {
- console.groupCollapsed('tab zoom changed');
- console.log('tab id', zoomChangeInfo.tabId);
- console.log('old zoom', zoomChangeInfo.oldZoomFactor);
- console.log('new zoom', zoomChangeInfo.newZoomFactor);
- console.log('zoom change info', zoomChangeInfo);
- console.groupEnd();
- }
- );
- chrome.windows.onCreated.addListener(
- function(window)
- {
- console.groupCollapsed('window created');
- console.log('window id', window.id);
- console.log('window type', window.type);
- console.log('window is incognito', window.incognito);
- console.log('window state', window.state);
- console.log('window object', window);
- console.groupEnd();
- }
- );
- chrome.windows.onRemoved.addListener(
- function(windowId)
- {
- console.groupCollapsed('window removed');
- console.log('window id', windowId);
- console.groupEnd();
- }
- );
- chrome.windows.onFocusChanged.addListener(
- function(windowId)
- {
- console.groupCollapsed('window focused');
- console.log('window id', windowId);
- console.groupEnd();
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement