Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Del 2240: Updated changes for disabling proview for specific users #1

Merged
merged 4 commits into from
Jun 2, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function receiveMessage(event) {
//Javascript function to start proview invoked upon postmessage from iframe
function startProview(authToken, session, proview_url, clear, skipHardwareTest, previewStyle) {
let url = proview_url || '//cdn.proview.io/init.js';
//Setting src attribute as error page URL so if the proview is not loaded error page will be shown
document.getElementById('contentIFrame').src = 'https://pages.talview.com/proview/error/';
mishra1113 marked this conversation as resolved.
Show resolved Hide resolved
let iframeWindow = document.getElementById('contentIFrame').contentWindow;
(function(i,s,o,g,r,a,m){i['TalviewProctor']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down Expand Up @@ -121,12 +123,10 @@ function stopProview(url) {
window.location.href = url;
})
}

}
(function() {
const urlParams = new URLSearchParams(window.location.search);
window.iframeUrl = urlParams.get('url');
document.getElementById('contentIFrame').src = iframeUrl;
startProview(urlParams.get('token'),urlParams.get('profile'),urlParams.get('proview_url'))
})();
</script>
Expand Down