mirror of https://github.com/keeweb/keeweb.git
prevent keeweb from working in iframe
This commit is contained in:
parent
4c33e60c69
commit
1ac61799fe
|
@ -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();
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue