18 lines
905 B
JavaScript
18 lines
905 B
JavaScript
! function (a, b, c) {
|
|
function d(c) {
|
|
var d = b.createElement("iframe"),
|
|
e = c.goto;
|
|
e += c.style ? "&style=" + c.style : "", e += c.href ? "&href=" + c.href : "", d.src = e, d.frameBorder = "0", d.allowTransparency = "true", d.scrolling = "no", d.width = "300px", d.height = "320px", d.style.transform = 'scale(0.8) translateY(-10%)';
|
|
var f = b.getElementById(c.id);
|
|
f.innerHTML = "", f.appendChild(d), d.onload = function () {
|
|
a.addEventListener("message", function (b) {
|
|
if(b.data && typeof b.data == "string" && b.data.substring(0,4) != 'http'){
|
|
return false;
|
|
}
|
|
b.data && b.origin.indexOf("work.weixin.qq.com") > -1 && (a.location.href = b.data)
|
|
}), d.contentWindow.postMessage("ask_usePostMessage", "*")
|
|
}
|
|
}
|
|
a.WwLogin = d
|
|
}(window, document);
|