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

feat(aio): temporarily add debugging code for google crawler #17046

Merged
merged 1 commit into from May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions aio/src/index.html
Expand Up @@ -37,6 +37,31 @@
<!-- End Google Analytics -->

<script>
window.onerror = function (message, url, lineNo, colNo, error) {
let container = document.createElement('div');

container.style.color = 'red';
container.style.position = 'fixed';
container.style.background = '#eee';
container.style.padding = '2em';
container.style.top = '3em';
container.style.left = '1em';

let msg = document.createElement('pre');
msg.innerText = [
'UA: ' + window.navigator.userAgent,
'Message: ' + message,
'URL: ' + url,
'Line: ' + lineNo,
'Column: ' + colNo,
'Stack: ' + (error && error.stack)
].join('\n');

container.appendChild(msg);

setTimeout(function() {document.body.appendChild(container)}, 0);
};

if (window.document.documentMode) {
var script = document.createElement('script');
script.src = 'generated/ie-polyfills.min.js';
Expand Down