代码拉取完成,页面将自动刷新
同步操作将从 openGauss/blog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/**
* 可伸缩布局方案
* rem计算方式:设计图尺寸px / 100 = 实际rem 例: 100px = 1rem
*/
!function (window) {
var pageurl = window.location.href;
var langss = document.querySelector("html").lang === "zh-cn" ? "zh" : "en";
var url = document.getElementById("iframeUrl").value;
var domLoadFlag = 1;
function observe(el, options, callback) {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver
var observer = new MutationObserver(callback)
observer.observe(el, options)
}
var options = {
childList: true,
subtree: true,
characterData: true
}
observe(document.body, options, (records, instance) => {
setTimeout(function () {
var height = $("body").height();
domLoadFlag && parent.postMessage(height, url);
}, 500)
setTimeout(function () {
domLoadFlag = 0;
}, 7000)
})
if (pageurl.split(langss + "/")[1]) parent.postMessage(pageurl.split(langss + "/")[1], url);
if (document.querySelector("#notFound")) parent.postMessage("我404了", url);
// if (langss=== "zh") {
// $('h1,h2,h3,h4,h5,div,p,a,li,span').each(function () {
// if (!$(this).attr('style')) {
// $(this).attr("style", "font-family:FZLTHJW !important");
// }
// })
// } else {
// $('h1,h2,h3,h4,h5,div,p,a,li,span').each(function () {
// if (!$(this).attr('style')) {
// $(this).attr("style", "font-family:Roboto-Regular !important");
// }
// })
// }
/* 设计图文档宽度 */
var docWidth = 750;
var doc = window.document,
docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
var recalc = (function refreshRem() {
var clientWidth = docEl.getBoundingClientRect().width;
/* 8.55:小于320px不再缩小,11.2:大于420px不再放大 */
docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / docWidth), 11.2), 8.55) * 5 + 'px';
return refreshRem;
})();
/* 添加倍屏标识,安卓为1 */
docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
/* 添加IOS标识 */
doc.documentElement.classList.add('ios');
/* IOS8以上给html添加hairline样式,以便特殊处理 */
if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
doc.documentElement.classList.add('hairline');
}
if (!doc.addEventListener) return;
window.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
}(window);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。