ikemonn's blog

技術ネタをちょこちょこと

ChromeExtension

【Chrome Extension】選択されているタブIDを取得する

popup.html <html> <head> <meta charset="utf-8"> <title>Nico Extension's Popup</title> <style> body { min-width: 100px; } </style> </head> <body> <ul> <li id = "tab">tab</li> </ul> <script src="src/index.js"></script> </body> </html> index.js document.getElementById('tab').onclick = f…