chrome extension get current tab from popup

JavaScript
chrome.tabs.query({active: true, currentWindow: true},function(tabs){   
	var currentTab = tabs[0];
});
Source

Also in JavaScript: