prevent keeweb from working in iframe

This commit is contained in:
antelle 2017-08-31 18:56:11 +02:00
parent 4c33e60c69
commit 1ac61799fe
2 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,7 @@ const Locale = require('./util/locale');
const ready = Launcher && Launcher.ready || $;
ready(() => {
if (FeatureDetector.isPopup && AuthReceiver.receive()) {
if (FeatureDetector.isPopup && AuthReceiver.receive() || FeatureDetector.isFrame) {
return;
}
loadMixins();

View File

@ -11,6 +11,7 @@ const FeatureDetector = {
isMobile: MobileRegex.test(navigator.userAgent) || screen.width < MinDesktopScreenWidth,
isPopup: !!((window.parent !== window.top) || window.opener),
isStandalone: !!navigator.standalone,
isFrame: window.top !== window,
isBeta: window.location.href.toLowerCase().indexOf('beta.') > 0,
isSelfHosted: !isDesktop && !/^http(s?):\/\/((localhost:8085)|((app|beta)\.keeweb\.info))/.test(location.href),
needFixClicks: /Edge\/14/.test(navigator.appVersion),