Skip to content

Instantly share code, notes, and snippets.

View olegp's full-sized avatar

Oleg Podsechin olegp

View GitHub Profile
@olegp
olegp / background.js
Created September 20, 2018 20:31
Active tab change detection in Chrome Extension
let activeTabId, lastUrl, lastTitle;
function getTabInfo(tabId) {
chrome.tabs.get(tabId, function(tab) {
if(lastUrl != tab.url || lastTitle != tab.title)
console.log(lastUrl = tab.url, lastTitle = tab.title);
});
}
chrome.tabs.onActivated.addListener(function(activeInfo) {
{
"event": {
"date": "17/08/2025",
"link": "https://docs.google.com/forms/d/e/1FAIpQLSc6ytLNahJeiMaJp6hL7y94cvJC7MSfgvrJmVwYUgxqMkp-vw/viewform"
},
"members": 26
}
{
"event": {
"date": "23/10/2025",
"link": "https://docs.google.com/forms/d/e/1FAIpQLScf_uZ2-EPOGMoF4sczwVNHnktpBqQQ3YWX68l3ctPwzqA-Vg/viewform"
},
"members": 102
}