- function googleTranslateElementInit() {
- new google.translate.TranslateElement(
- {
- pageLanguage: ‘zh-CN’,
- includedLanguages: ‘zh-CN,aaa,en,hr,cs,da,nl,fr,de,el,iw,hu,ga,it,ja,ko,pt,ro,ru,sr,es,th,vi’,
- layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
- autoDisplay: true,
- },
- ‘google_translate_element’
- );
- document.querySelectorAll(".goog-te-menu-value img")[0].remove();
- document.querySelectorAll(".goog-te-menu-value img")[0].remove();
- //for (var i = 0, len = document.querySelectorAll(".goog-te-menu-value img").length; i < len; i++) { document.querySelectorAll(".goog-te-menu-value img")[0].remove(); }
- }
- function getck(name) {
- var cookie_start = document.cookie.indexOf(name);
- var cookie_end = document.cookie.indexOf(";", cookie_start);
- if (cookie_start == -1) {
- return ”;
- } else {
- var v = document.cookie.substring(cookie_start + name.length + 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length));
- return unescape(v);
- }
- }
- if (getck("googtrans") == ”) {
- document.cookie = "googtrans=/zh-CN/en";
- }
复制代码
|