我正在尝试创建一个书签(在本例中为Firefox)
API /书签/创建
我的代码是:
<!doctype html>
<HTML lang="de">
<HEAD>
<meta charset="iso-8859-1">
<link href = 'https://office.spdns.de/System/TDL/Images/Browser/Company.ico' rel = 'SHORTCUT ICON'>
<link rel="manifest" href="bookmark/manifest.json">
<link href = 'https://office.spdns.de/TDL/Common/CSS/Default.css' rel = 'stylesheet' type = 'text/css'>
<link href = 'https://office.spdns.de/TDL/Common/CSS/Formular_OnLine.css' rel = 'stylesheet' type = 'text/css'>
</HEAD>
<BODY lang=DE vLink=blue link=blue bgColor=white>
<form action='https://office.spdns.de/TDL/Tools/WebExtensions.php' name='WebExtensions' id='WebExtensions' method='post' >
<BR>
<script>
function onCreated(node) {
console.log(node);
}
var createBookmark = browser.bookmarks.create({
title: "Set time of work",
url: "https://office.spdns.de/TDL/Tools/WebExtensions.php"
});
createBookmark.then(onCreated);
</script>
</form>
</BODY>
</HTML>
manifest.json: { “ manifest_version”:2 “ name”:“ BookmarkOnce”, “ version”:“ 1.1”, “ description”:“在您的工作中将这个页面添加为书签”, “权限”:[ “书签” ] }