mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-22 07:39:49 +00:00
21 lines
699 B
JavaScript
21 lines
699 B
JavaScript
var flyout_contents = [];
|
|
const registerCategory = (category_dir, subcategories) => {
|
|
for (let sbctgr of subcategories) {
|
|
let fname = ugj_const.blocks_dir + '/' + category_dir + "/" + sbctgr + "/index.js";
|
|
let script = document.createElement('script');
|
|
script.type = 'text/javascript';
|
|
script.src = fname;
|
|
script.async = false;
|
|
document.body.appendChild(script);
|
|
}
|
|
}
|
|
|
|
// センサーカテゴリ
|
|
registerCategory('sensors', [ // カテゴリディレクトリ名
|
|
"amg8833",
|
|
"paj7620",
|
|
"bme280",
|
|
"dht11",
|
|
"z-line" // フライアウト下端の不可視ライン。スクリプトにカテゴリ名を含むので注意
|
|
]);
|