external-completion
code:index.js
import {mount} from '/api/code/programming-notes/external-completion@0.4.0/script.js';
const watchListIds = Object.keys(JSON.parse(localStorage.getItem('projectsLastAccessed')));
const iconIds = [
'57b3fe09ec2b330f00f15382', // /icons Icons
'5ebf80b491582c001e38c967', // /Icons2 Icons2
'5adc2250d5caf30014910a83', // /emoji emoji
];
// watchListから現在projectとicon用project除く
const res = await fetch(/api/projects/${scrapbox.Project.name});
const {id} = await res.json();
const projectIds = watchListIds
//.filter(_id => _id !== id && !iconIds.some(iconId => iconId === id));
console.log(projectIds)
console.log(watchListIds)
// 起動
mount({
internal: [], // []の補完に使うproject idのlist
external: projectIds, // /に使うprojectのid list emoji: iconIds, // :に使うprojectのid list });