Files
chrome-extensions-samples/api-samples/userScripts/options.html
2023-10-27 14:40:28 +01:00

57 lines
1.6 KiB
HTML

<!--
Copyright 2023 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>User Scripts API Demo</title>
<link rel="stylesheet" type="text/css" href="options.css" />
<script defer src="options.js"></script>
</head>
<body>
<div id="warning">
<p>
⚠️ To use the User Scripts API, you need to first enable developer mode
at <b>chrome://extensions</b>.
</p>
<a href="">Reload</a>
</div>
<form id="settings-form">
<h1>Settings</h1>
<h2>Type</h2>
<label>
<input type="radio" name="type" value="file" />
<span>File</span>
</label>
<label>
<input type="radio" name="type" value="custom" />
<span>Custom text</span>
</label>
<div id="custom-script-wrapper">
<h2>Custom script</h2>
<textarea
name="custom-script"
draggable="false"
rows="8"
placeholder="alert('hi');"
></textarea>
</div>
<button type="button" id="save-button">Save & Enable</button>
</form>
</body>
</html>