-
Notifications
You must be signed in to change notification settings - Fork 0
inject
Yanis Wang edited this page Jul 10, 2014
·
1 revision
You can use the plugin to inject code into webpage.
pagerun.setConfig({
inject: {
top: '<script>console.log("top")</script>',
header: '<script>console.log("header")</script>',
body: '<script>console.log("body")</script>',
footer: '<script>console.log("foot")</script>'
}
};
Three inject position:
- top : inject after
<head>
- header : inject before
</head>
- body : inject after
<body>
- footer : inject before
</body>
-
pagerun.injectCode(code, position)
Inject code at end of code array.
-
pagerun.injectCodeBefore(code, position)
Inject code at first of code array.