mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-18 15:28:37 +02:00
Added an example for contentScripts.register (#325)
* Added an example for contentScripts.register * Use messaging instead of getBackgroundPage
This commit is contained in:
26
user-script/popup/user-script.html
Normal file
26
user-script/popup/user-script.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="user-script.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="outer-wrapper">
|
||||
|
||||
<label for="hosts">Hosts</label>
|
||||
<input id="hosts" type="text">
|
||||
|
||||
<label for="code">Code</label>
|
||||
<textarea id="code" rows="10"></textarea>
|
||||
|
||||
<button id="register">Register script</button>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="user-script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user