// @ts-nocheck export default { // @HTML操作 'HTML変換': { // @文字列をHTMLに変換して返す // @HTMLへんかん type: 'func', josi: [['を']], pure: true, fn: function(text: any) { return String(text) .replace(/&/g, '&') .replace(/>/g, '>') .replace(/ { sys.__setSysVar('対象', text) f(sys) }) } else { throw new Error('Clipbard APIが利用できません。') } } }, 'クリップボード取得': { // @クリップボードの値を取得して結果を返す(ユーザーの許可が必要)。 // @くりっぷぼーどしゅとく type: 'func', josi: [], pure: true, asyncFn: true, fn: async function(sys: any) { // Clipboard APIをサポートしているか if (navigator.clipboard) { const result = await navigator.clipboard.readText() return result } else { throw new Error('Clipbard APIが利用できません。') } } } }