ultrawidify/src/ext/uw.js

23 lines
832 B
JavaScript
Raw Normal View History

/**
* NOTE: we cannot get rid of this js file. I tried for 30 seconds and I couldn't get
* extension to work unless I kept this part of extension out of the ts file.
*/
import UWContent from './UWContent';
2020-01-31 01:03:06 +01:00
2020-12-03 01:05:39 +01:00
if(process.env.CHANNEL !== 'stable'){
2020-12-03 01:16:57 +01:00
console.warn("\n\n\n\n\n\n ——— Sᴛλʀᴛɪɴɢ Uʟᴛʀᴀɪɪʏ ———\n << ʟᴏᴀᴅɪɴɢ ᴍᴀɪɴ ꜰɪʟᴇ >>\n\n\n\n");
2020-03-09 19:41:15 +01:00
try {
if(window.self !== window.top){
2020-12-03 01:05:39 +01:00
console.info("%cWe aren't in an iframe.", "color: #afc, background: #174");
2020-03-09 19:41:15 +01:00
}
else{
2020-12-03 01:05:39 +01:00
console.info("%cWe are in an iframe!", "color: #fea, background: #d31", window.self, window.top);
2020-03-09 19:41:15 +01:00
}
} catch (e) {
2020-12-03 01:05:39 +01:00
console.info("%cWe are in an iframe!", "color: #fea, background: #d31");
2020-03-09 19:41:15 +01:00
}
}
const main = new UWContent();
main.init();