Hide client portal footer if shown in iframe
This commit is contained in:
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
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,8 +51,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
positionFooter();
|
||||
$(window).resize(positionFooter);
|
||||
if (inIframe()) {
|
||||
$('#footer').hide();
|
||||
} else {
|
||||
positionFooter();
|
||||
$(window).resize(positionFooter);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue