@@ -445,19 +445,17 @@ public function addScript(){
445445 layout: google.translate.TranslateElement.InlineLayout.VERTICAL,
446446 autoDisplay: false,
447447 additionalOption: {
448- disableAutoTranslation: true,
449448 disablePoweredBy: true
450449 }
451450 }, GTranslator.googleElement);
452451 },
453452
454453 GoogleScript: function(){
455454 var s1 = document.createElement('script');
456- s1.async = true;
457- s1.defer = true;
455+ // s1.async = true;
456+ // s1.defer = true;
458457 s1.type = 'text/javascript';
459458 s1.src='https://translate.google.com/translate_a/element.js?cb=GTranslator.GoogleInit';
460- /*var s0 = document.getElementsByTagName('script')[0];*/
461459 var s0 = document.getElementById('php-g-translator-plugin');
462460 s0.parentNode.insertBefore(s1, s0);
463461 },
@@ -646,14 +644,14 @@ public function addScript(){
646644 * @return string|html|css $styleSheet
647645 */
648646 private function addCss (){
649- $ styleSheet = " <style>body.php-google-translator{top:0 !important}.skiptranslate, # {$ this ->element }, #goog-gt-tt, .goog-te-banner-frame{display:none !important}#php-g-translator img{height:16px;width:16px} " ;
647+ $ styleSheet = " <style>body.php-google-translator{top:0 !important}.skiptranslate,.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,div[class^='VIpgJd-ZVi9od-aZ2wEe-wOHMyf-'], # {$ this ->element }, #goog-gt-tt, .goog-te-banner-frame{display:none !important}#php-g-translator img{height:16px;width:16px} " ;
650648 if ($ this ->provider == self ::DEFAULT ){
651649 $ styleSheet .= ".open-language-selector, .g-custom-js{display: inline-block;width:16px;height:16px;}
652650 .g-translator-custom:not(.g-custom-js){position: relative}
653651 .g-translator-custom .toggle-translator{font-family:Arial;font-size:10pt;text-align:left;cursor:pointer;overflow:hidden;width: {$ this ->selectWidth };line-height:17px;position: absolute;right: 0;list-style-type: none;padding-left: 0px}
654652 .g-translator-custom a{text-decoration:none;display:block;font-size:10pt;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
655653 .g-translator-custom a img{vertical-align:middle;display:inline;border:0;padding:0;margin:0;opacity:0.8}
656- .g-translator-custom a:hover img{opacity:1}
654+ .g-translator-custom a:hover img{opacity:1}
657655 .g-translator-custom .toggle-languages{background-color:#FFFFFF; position:relative; z-index:9999; cursor: pointer}
658656 .g-translator-custom .toggle-languages a{border:1px solid #CCCCCC;color:#666666;padding:3px 5px}
659657 .g-translator-custom .toggle-cert{background-image: url( \"data:image/svg+xml,%3Csvg class='caret-down' width='12' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1.5l-5 5-5-5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' stroke='%23000'%3E%3C/path%3E%3C/svg%3E \");background-repeat: no-repeat;background-position: center;padding:3px 5px;width: 12px;position: absolute;right: 0px;top: 0px;bottom: 0px;height: 22px}
0 commit comments