mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 04:53:31 +08:00
新增 showDevTools
This commit is contained in:
14
plugin/lib/utoolsLite.js
Normal file
14
plugin/lib/utoolsLite.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const getuToolsLite = () => {
|
||||
var utoolsLite = Object.assign({}, _.cloneDeep(utools))
|
||||
// if (utools.isDev()) return utoolsLite
|
||||
const dbBlackList = ['db', 'dbStorage', 'removeFeature', 'setFeature', 'onDbPull']
|
||||
const payBlackList = ['fetchUserServerTemporaryToken', 'getUserServerTemporaryToken', 'openPayment', 'fetchUserPayments']
|
||||
const etcBlackList = ['onPluginEnter', 'onPluginOut', 'createBrowserWindow']
|
||||
_.concat(dbBlackList, payBlackList, etcBlackList).forEach(item => {
|
||||
delete utoolsLite[item]
|
||||
})
|
||||
Object.freeze(utoolsLite)
|
||||
return utoolsLite
|
||||
}
|
||||
|
||||
module.exports = getuToolsLite
|
Reference in New Issue
Block a user