inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,017
January 2018
retread
|
Post by Retread on Sept 12, 2019 12:00:20 GMT -8
I had a plugin submission rejected from the Library.
I'll spare you all the convoluted css in the plugin and get to the core. It uses this in the Global Header:
<script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element'); } </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Would adding async defer likely be enough to correct the issue or am I wasting someone's time if I resubmit with the following changes:
<script async defer type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element'); } </script><script async defer type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
|
|
#eb7100
33409
0
1
Nov 23, 2024 16:57:32 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Sept 12, 2019 13:32:50 GMT -8
The plugin would still be rejected on the basis that it's reliant on the Google Translate JS file on the last line.
Plugins submitted to the library cannot be reliant on external code as there's no guarantee the file located at that URL will remain there indefinitely, never change, or never be substituted for a script containing harmful or malicious code.
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,017
January 2018
retread
|
Post by Retread on Sept 13, 2019 5:09:29 GMT -8
Thanks for the speedy reply, Brian.
|
|