(function () {
	try {
		document.domain = "qq.com";
	} catch (_) {
		alert("invalid domain");
	}
	function getParam(name) {
		var re = new RegExp("(?:\\?|#|&)" + name + "=([^&]*)(?:$|&|#)", "i"), m = re.exec(window.location.href);
		var ret = m ? m[1] : "";
		ret = ret.replace(/[+]/ig, "%20");
		return ret;
	}
	var iface = getParam("iface");
	switch (iface) {
	case "AppChallenge":
	case "AppInvitation":
	case "AppGiftRequest":
	case "SendStory": {
		var appid = getParam("oauth_consumer_key"), type = getPara