Hide client portal footer if shown in iframe

This commit is contained in:
Hillel Coren 2017-08-31 23:00:34 +03:00
parent dab4b2a48b
commit 18ce61c6ef
4 changed files with 22 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -465,6 +465,15 @@ function comboboxHighlighter(item) {
return result.replace(new RegExp("\n", 'g'), '<br/>');
}
// https://stackoverflow.com/a/326076/497368
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
function comboboxMatcher(item) {
return ~stripHtmlTags(item).toLowerCase().indexOf(this.query.toLowerCase());
}

View File

@ -51,8 +51,12 @@
}
}
if (inIframe()) {
$('#footer').hide();
} else {
positionFooter();
$(window).resize(positionFooter);
}
})
</script>