mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 06:48:37 +02:00
* Improve content script injection * Add an error handler for content script injection * Use a guard variable in the content script, instead * Fix comment * Ensure tabID is unchanged; fix image styles * Only inject script once; use CSS to hide page * Display an error when the script can't be executed; document other limitations * Log error on script execute failure
23 lines
514 B
HTML
23 lines
514 B
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="choose_beast.css"/>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="popup-content">
|
|
<div class="button beast">Frog</div>
|
|
<div class="button beast">Turtle</div>
|
|
<div class="button beast">Snake</div>
|
|
<div class="button reset">Reset</div>
|
|
</div>
|
|
<div id="error-content" class="hidden">
|
|
<p>Can't beastify this web page.</p><p>Try a different page.</p>
|
|
</div>
|
|
<script src="choose_beast.js"></script>
|
|
</body>
|
|
|
|
</html>
|