Lightcord/LightcordApi/src/alias/react.js

25 lines
613 B
JavaScript
Raw Normal View History

window.React = (window.React || // If in Lightcord
(()=>{ // If in Standard BetterDiscord
try{
2020-07-28 04:32:51 +02:00
return window.BdApi.React
}catch(e){
return null
}
})() ||
(()=>{ // If in Powercord
try{
const webpack = require("powercord/webpack")
return webpack.React
}catch(e){
return null
}
})() ||
(()=>{ // If in EnhancedDiscord
try{
2020-07-28 04:32:51 +02:00
return window.EDApi.React
}catch(e){
return null
}
2020-08-07 12:50:06 +02:00
})())
2020-08-07 12:50:06 +02:00
module.exports = window.React