mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
corrected a comment
This commit is contained in:
@@ -5,12 +5,10 @@ If the click is not on one of the beasts, return early.
|
||||
|
||||
Otherwise, the text content of the node is the name of the beast we want.
|
||||
|
||||
Run the "beastify.js" content script in the active tab, calling setBeast()
|
||||
once the content script has executed.
|
||||
Inject the "beastify.js" content script in the active tab.
|
||||
|
||||
Inside setBeast(), get the active tab, then send it a message containing
|
||||
the chosen beast's name. This message will be received by the content script
|
||||
we just executed.
|
||||
Then get the active tab and send "beastify.js" a message
|
||||
containing the chosen beast's name.
|
||||
*/
|
||||
document.addEventListener("click", function(e) {
|
||||
if (!e.target.classList.contains("beast")) {
|
||||
|
||||
Reference in New Issue
Block a user