Open utubo opened 5 years ago
้้ใใชใใใใชใฎใงโใฟใใใซใใใปใใใใใใช๏ผ้ขๆฐๅใฏใฉใใใใโฆ a custom-gesture
let tabs = await SimpleGesture.tabsEval('query');
ใใฃใใtabsใซ้ๅฎใใชใใปใใใใ๏ผ a custom-gesture
let tabs = await SimpleGesture.evalInBackground('browser.tabs.query();');
content.js
SimpleGesture.evalInBackground = async code => { return await sendMessage('evalInBackground', { code: code }); }
background.js
evalInBackground = async args => { let res = new Function(args.code)(); if (res.then) { return res; } else { return new Promise((resolve, reject) => { resolve(res); }); } }
TabใฎAPIใ็ดใใชใใจใฉใใซใใชใใชใใโฆ
้้ใใชใใใใชใฎใงโใฟใใใซใใใปใใใใใใช๏ผ้ขๆฐๅใฏใฉใใใใโฆ a custom-gesture
ใใฃใใtabsใซ้ๅฎใใชใใปใใใใ๏ผ a custom-gesture
content.js
background.js