Confirmed users
161
edits
(→Discussion - e10s: link to the latest myk's post) |
(→API Methods: copy the suggested syntax for "C" (script: data.url()) from the groups thread) |
||
Line 55: | Line 55: | ||
// at this point we can work with the DOM | // at this point we can work with the DOM | ||
wrappedWindow.document.body.innerHTML = "<h1>Jetpack Page Mods</h1>"; | wrappedWindow.document.body.innerHTML = "<h1>Jetpack Page Mods</h1>"; | ||
} | }, | ||
// [Model "C"] The content script is run in a separate context, thus | |||
// it's specified in a separate file. The specific syntax is not final! | |||
script: require("self").data.url("my-example-org-mod.js"), | |||
// we'll also need a way to receive messages from the content | |||
// script here and maybe track the new pages getting loaded. | |||
}); | }); | ||
</pre> | </pre> |