/**
 * Copyright (C) 2015 yanni4night.com
 * s.js
 *
 * changelog
 * 2015-12-17[17:02:05]:revised
 *
 * @author yanni4night@gmail.com
 * @version 1.0.0
 * @since 1.0.0
 */

(function () {
    var baseRem = 50;
    var baseDeviceWidth = 750;
    /* less
    .px2rem(@name, @px) {
        @{name}: @px / 50 * 1rem;
    }
     */

    var dpr = window.devicePixelRatio;
    var docEle = document.documentElement;
    var rem = baseRem * (docEle.clientWidth * dpr / baseDeviceWidth);
    var scale = 1 / dpr;

    document.write('<meta name="viewport" content="initial-scale=' + scale + ', maximum-scale=' + scale +
        ', minimum-scale=' + scale +
        ', user-scalable=no">');
    document.write('<style>html{font-size:' + rem + 'px!important;}</style>');
})();
@@ -321,16 +321,385 @@
     */%0A%0A
+    var meta = document.querySelector('meta%5Bname=%22viewport%22%5D');%0A    %0A    if (!meta) %7B%0A        meta = document.createElement('meta');%0A        meta.setAttribute('name', 'viewport');%0A        document.head.insertBefore(meta, document.head.childNodes%5B0%5D);%0A    %7D%0A%0A    meta.setAttribute('content', 'initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');%0A
     var 
@@ -876,55 +876,38 @@
     
-document.write('%3Cmeta name=%22viewport%22 
+meta.setAttribute('
 content
-=%22
+', '
 init
@@ -952,32 +952,24 @@
 =' + scale +
-%0A       
  ', minimum-
@@ -1017,10 +1017,8 @@
 e=no
-%22%3E
 ');%0A

create meta element