blob: 49eddbde697b8e6e6f952dc1401f7106ca82ff3b [file] [log] [blame]
<!doctype html>
<html>
<head>
<style>
/* 402 is the project code name used in the content loaded by this page.
* We need to override their focus behavior to improve keyboard focus
* accessibility.
*/
.t402-prompt-websat .t402-prompt-root .t402-button:focus {
outline-style: auto;
}
.t402-css-theme-hats-material1 .t402-titlebar-title-alt:focus {
outline-style: auto;
}
:focus {
/* Needs to override dynamically loaded, more specific styles. */
outline-color: rgb(77, 144, 254) !important;
}
/* Make sure scroll bars are added only when necessary, the overriden
* value is 'scroll' which causes scroll bars always show.
* TODO(weili): Remove this once the overriden value changed to auto.
*/
#t402-prompt.t402-prompt-websat-modal {
overflow: auto !important;
}
</style>
<script>
/**
* Close the window when the survey is submitted or when the survey
* has already been submitted in the past.
* @param {boolean} isFirstRun Will be true when the user just earned
* access to the content and false if the user had already had access
* previously.
*/
function didFinishSurvey(isFirstRun) {
if (!isFirstRun) {
return;
}
window.close();
}
/**
* Called after the survey HTML is injected into the page.
*/
function onSurveyShown() {
/* Don't show logo on the survey */
const elements = document.getElementsByClassName('t402-prompt-logo');
for (const element of elements)
element.style.display = 'none';
}
</script>
<script src="$i18n{scriptSrc}"></script>
</head>
<body>
</body>
</html>