Lightcord/LightcordApi/src/alias/react.js

25 lines
589 B
JavaScript
Raw Normal View History

2020-09-05 22:50:45 +02:00
window.React = (window.React || // If in Lightcord
(()=>{ // If in Standard BetterDiscord
try{
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{
return window.EDApi.React
}catch(e){
return null
}
})())
2020-08-07 12:50:06 +02:00
module.exports = window.React