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

Script source using Document Write no longer valid #26

Open
Tigerlady opened this issue Apr 2, 2019 · 0 comments
Open

Script source using Document Write no longer valid #26

Tigerlady opened this issue Apr 2, 2019 · 0 comments

Comments

@Tigerlady
Copy link

Steve,

I have been using this extension on several sites but have been getting errors in Chrome console because of using Document Write to get the code.

(index):1213 [Violation] Avoid using document.write(). https://developers.google.com/web/updates/2016/08/removing-document-write
(anonymous) @ (index):1213
(index):1213 [Violation] Parser was blocked due to document.write(<script>)
(anonymous) @ (index):1213
(index):1213 A parser-blocking, cross site (i.e. different eTLD+1) script, https://maps.google.com/maps/api/js?key=mykey, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ (index):1213
(index):1213 [Violation] Parser was blocked due to document.write(<script>)
(anonymous) @ (index):1213
(index):1213 A parser-blocking, cross site (i.e. different eTLD+1) script, https://maps.google.com/maps/api/js?key=mykey, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.

I have tried this
<script async src="https://maps.google.com/maps/api/js?key=Mykey"> </script>

but then i get a Jquery error that google is undefined.

Can you please take a look and see if there is a way to fix this. I am currently using this on over 20 sites and they all have the same issue.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant