Created
December 10, 2015 12:50
-
-
Save lv7777/a77b115e4621cf380cdd to your computer and use it in GitHub Desktop.
はてブロ、gist使えるのか。便利
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.addEventListener("click", notifyExtension); | |
| console.log("init"); | |
| function notifyExtension(e) { | |
| console.log("content script sending message"); | |
| if (e.target.tagName != "A") { | |
| return; | |
| } | |
| chrome.runtime.sendMessage({"url": e.target.href}); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment