Use Event page, activeTab permission and executeScript.