add official Chrome feature demos

This commit is contained in:
2026-06-14 15:22:32 +08:00
parent 500217f2fd
commit de690f85fa
32 changed files with 2376 additions and 567 deletions
+16
View File
@@ -0,0 +1,16 @@
const dialog = document.querySelector("#guided-dialog");
const openDialog = document.querySelector("#open-dialog");
const copyButton = document.querySelector("#copy");
const commands = document.querySelector("#commands");
openDialog.addEventListener("click", () => {
dialog.showModal();
});
copyButton.addEventListener("click", async () => {
await navigator.clipboard.writeText(commands.textContent.trim());
copyButton.textContent = "已复制";
setTimeout(() => {
copyButton.textContent = "复制命令";
}, 1200);
});