Update useForm hooks supports input type checkbox

支持 checkbox,虽然只是返回 boolean,但这个判断和正常表单还是有区别的
This commit is contained in:
2024-04-25 11:32:52 +08:00
parent 6632c839e4
commit aec8c8ac7a
2 changed files with 29 additions and 15 deletions
-9
View File
@@ -46,14 +46,6 @@ const getDesc = () => {
return "";
}
const getFrom = () => {
if (location.host === "mp.weixin.qq.com") {
return "wechat";
}
return "web";
}
const getAuthor = () => {
const metaAuthor = document.querySelector<HTMLMetaElement>(`meta[name="author"]`);
const metaOgAuthor = document.querySelector<HTMLMetaElement>(`meta[property="og:article:author"]`);
@@ -128,7 +120,6 @@ chrome.runtime.onMessage.addListener((req, sender, send) => {
title: getTitle(),
link: `${location.origin}${location.pathname}`,
desc: getDesc(),
from: getFrom(),
author: getAuthor(),
image: getImage(),
sitename: getSiteName(),