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

This commit is contained in:
Igor Minar 2017-05-26 12:25:33 -07:00 committed by Chuck Jazdzewski
parent 7ffb75f476
commit 5f723cb92c
1 changed files with 25 additions and 0 deletions

View File

@ -37,6 +37,31 @@
<!-- End Google Analytics --> <!-- End Google Analytics -->
<script> <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) { if (window.document.documentMode) {
var script = document.createElement('script'); var script = document.createElement('script');
script.src = 'generated/ie-polyfills.min.js'; script.src = 'generated/ie-polyfills.min.js';