feat(aio): temporarily add debugging code for google crawler (#17046)
This commit is contained in:
parent
7ffb75f476
commit
5f723cb92c
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue