{
"main": {
"url": "index.html"
}
}
{
"main": {
"url": "index.html",
"width": 640,
"height": 480
}
}
{
"id": "LBCZE8V6LPCKD",
"version": "1.0.0",
"name": "視窗插件",
"logo": "/logo.png",
"keywords": [],
"main":
{
"url": "index.html",
"width": 640,
"height": 480
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<script type="text/javascript" src="js/plugin.js"></script>
</head>
<body>
<div id="message"></div>
</body>
</html>
eagle.onPluginCreate((plugin) => {
console.log('eagle.onPluginCreate');
console.log(plugin);
document.querySelector('#message').innerHTML = `
<ul>
<li>id: ${plugin.manifest.id}</li>
<li>version: ${plugin.manifest.version}</li>
<li>name: ${plugin.manifest.name}</li>
<li>logo: ${plugin.manifest.logo}</li>
<li>path: ${plugin.path}</li>
</ul>
`;
});
eagle.onPluginShow(() => {
console.log('eagle.onPluginShow');
});
eagle.onPluginHide(() => {
console.log('eagle.onPluginHide');
});
eagle.onPluginBeforeExit((event) => {
console.log('eagle.onPluginBeforeExit');
});