index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <div id='wx_pic' style='margin:0 auto;display:none;'>
  5. <img src='photo.jpg' />
  6. </div>
  7. <title>变态测试题</title>
  8. <meta name="mobile-web-app-capable" content="yes" />
  9. <meta name="keywords" content="变态测试题,变态测试题html5游戏" />
  10. <meta name="description" content="变态测试题html5游戏,变态测试题手机在线游戏" />
  11. <link rel="apple-touch-icon" href="icon.png" />
  12. <link rel="shortcut icon" href="icon.png" />
  13. <link rel="icon" href="icon.png" />
  14. <meta charset="utf-8">
  15. <meta name="apple-mobile-web-app-capable" content="yes">
  16. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  17. <meta name="format-detection" content="telephone=no">
  18. <meta name="viewport" content="width=device-width, height=device-height, initial-scale=0.5, maximum-scale=0.5, user-scalable=no">
  19. <link rel="stylesheet" type="text/css" href="css/style.css?ver">
  20. <script src="js/jquery-min.js"></script>
  21. <script src="js/framer.js"></script>
  22. <script src="js/appv5.js?v=081801"></script>
  23. <script type="text/javascript">
  24. // 游戏结束的时候提示语句
  25. var endGameTips = ['祝处女座生日快乐,为不创造下一个处女座努力',
  26. '纯,属虚构;乱,是佳人','挣的是临时工的钱,操的是CEO的心',
  27. '只要你努力,世上没什么事是你搞不砸的',
  28. '为什么我做得这么差,如果没有压力,我可以更差',
  29. '最近又胖了,打电话时一笑脸蛋子就碰能到挂机键',
  30. '帅哥尽量少娶美女,因为龙凤成翔',
  31. '挤公交=散打+瑜珈+柔道+平衡木',
  32. '枯藤老树昏鸦,空调wifi西瓜,午饭有鱼有虾,你丑没事我瞎',
  33. '你骂我,因为你不了解我,等你了解我,你会动手打我',
  34. '去一次星巴克,拍365张照片,发一年朋友圈',
  35. '今天上街碰到一个臭流氓,我实在受不了了,就帮他洗了个澡',
  36. '明日复明日,明日何其多!既然这么多,不妨再拖拖',
  37. '我是你转身就忘的路人甲,凭什么陪你蹉跎年华到天涯'
  38. ];
  39. function getEndGameTips(){
  40. var index = parseInt(endGameTips.length * Math.random());
  41. return endGameTips[index];
  42. }
  43. // 根据答对个数获取勋章名称
  44. var martals = [{start:0,end:4,name:'万人践踏'},
  45. {start:5,end:8,name:'万人唾弃'},
  46. {start:9,end:12,name:'万人鄙视'},
  47. {start:13,end:16,name:'万人嫌弃'},
  48. {start:17,end:20,name:'万人惊叹'},
  49. {start:21,end:26,name:'万众瞩目'},
  50. {start:27,end:29,name:'万众崇拜'},
  51. {start:30,end:33,name:'万众钦佩'},
  52. {start:34,end:37,name:'万众景仰'},
  53. {start:38,end:44,name:'万众膜拜'},
  54. {start:45,end:52,name:'万众折服'},
  55. {start:53,end:60,name:'万众跪舔'},
  56. {start:61,end:60000000,name:'万王之王'}];
  57. function getMartalName(count){
  58. for(var i=0; i<martals.length; i++){
  59. var martal = martals[i];
  60. if(count>=martal.start && count<=martal.end){
  61. return martal.name;
  62. }
  63. }
  64. return "";
  65. }
  66. // 击败的百分比 y=(-1/3600.0)*x*x+(1/30.0)*x
  67. function getWinPercent(count){
  68. return parseInt(((-1/3600.0)*count*count+(1/30.0)*count)*100+"");
  69. }
  70. function resetShareContent(){
  71. var martal = getMartalName(correctCount);
  72. dp_share(correctCount,getWinPercent(correctCount));
  73. }
  74. function getUrlParam(name){
  75. var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  76. var r = window.location.search.substr(1).match(reg);
  77. if (r!=null) return r[2]; return null;
  78. }
  79. </script>
  80. <script type="text/javascript">
  81. $(function(e) {
  82. var windowwidth = $(window).width();
  83. //document.title = windowwidth + 'px';
  84. if(windowwidth >= 1080){
  85. //document.body.style.cssText = document.body.style.cssText + '; -webkit-transform: scale(1.5); ';
  86. $("#gamemain").attr("style","-webkit-transform: scale(0.5); ");
  87. }
  88. var vipsrc = getUrlParam('vipsrc');
  89. if('app' == vipsrc && !appbrowser.versions.android){
  90. $("#gamemain").attr("style","-webkit-transform: scale(0.5); -webkit-transform-origin: 0 0;");
  91. }
  92. if(appbrowser.versions.android){
  93. //document.body.style.cssText = document.body.style.cssText + '; -webkit-transform: scale('+(windowwidth/640)+');';
  94. $("#gamemain").attr("style",'-webkit-transform: scale('+(windowwidth/640)+');');
  95. }
  96. });
  97. var appbrowser={
  98. versions:function(){
  99. var u = navigator.userAgent, app = navigator.appVersion;
  100. return { //移动终端浏览器版本信息
  101. trident: u.indexOf('Trident') > -1, //IE内核
  102. presto: u.indexOf('Presto') > -1, //opera内核
  103. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  104. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  105. mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
  106. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  107. android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
  108. iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
  109. iPad: u.indexOf('iPad') > -1, //是否iPad
  110. webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
  111. };
  112. }(),
  113. language:(navigator.browserLanguage || navigator.language).toLowerCase()
  114. };
  115. </script>
  116. </head>
  117. <body>
  118. <div id="gamemain">
  119. </div>
  120. <script language=javascript>
  121. var mebtnopenurl = 'http://game.ikongzhong.cn/';
  122. window.shareData = {
  123. "imgUrl": "http://game.ikongzhong.cn/games/btcst/btcst.jpg",
  124. "timeLineLink": "http://game.ikongzhong.cn/games/btcst/",
  125. "tTitle": "搞笑问答题,看看你能回答对几道",
  126. "tContent": "智商时代,必须可爱"
  127. };
  128. function showshare(){
  129. document.getElementById("share").style.display = "";
  130. };
  131. function clickMore(){
  132. window.location = mebtnopenurl;
  133. };
  134. var imgUrl = window.shareData.imgUrl;
  135. var lineLink = window.shareData.timeLineLink;
  136. var descContent = window.shareData.tContent;
  137. var shareTitle = window.shareData.tTitle;
  138. function shareFriend() {
  139. WeixinJSBridge.invoke('sendAppMessage',{
  140. "img_url": imgUrl,
  141. "img_width": "200",
  142. "img_height": "200",
  143. "link": lineLink,
  144. "desc": descContent,
  145. "title": shareTitle
  146. }, function(res) {
  147. //_report('send_msg', res.err_msg);
  148. })
  149. }
  150. function shareTimeline() {
  151. WeixinJSBridge.invoke('shareTimeline',{
  152. "img_url": imgUrl,
  153. "img_width": "200",
  154. "img_height": "200",
  155. "link": lineLink,
  156. "desc": shareTitle,
  157. "title": descContent
  158. }, function(res) {
  159. //_report('timeline', res.err_msg);
  160. });
  161. }
  162. function shareWeibo() {
  163. WeixinJSBridge.invoke('shareWeibo',{
  164. "content": descContent,
  165. "url": lineLink,
  166. }, function(res) {
  167. //_report('weibo', res.err_msg);
  168. });
  169. }
  170. // 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
  171. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  172. // 发送给好友
  173. WeixinJSBridge.on('menu:share:appmessage', function(argv){
  174. shareFriend();
  175. });
  176. // 分享到朋友圈
  177. WeixinJSBridge.on('menu:share:timeline', function(argv){
  178. shareTimeline();
  179. });
  180. // 分享到微博
  181. WeixinJSBridge.on('menu:share:weibo', function(argv){
  182. shareWeibo();
  183. });
  184. }, false);
  185. function dp_share(a,b){
  186. if(a>0){
  187. document.title = window.shareData.tContent = descContent ='在变态测试题中,我答对了'+a+'到题目,击败了'+b+'%的人,快来挑战吧!';
  188. }
  189. };
  190. </script>
  191. <div id=share style="display: none">
  192. <img width=100% src="share.png" style="position: fixed; z-index: 5; top: 0; left: 0; display: " ontouchstart="document.getElementById('share').style.display='none';" onclick="document.getElementById('share').style.display='none';" />
  193. </div>
  194. </body>
  195. <div style="display:none;">
  196. <script src="../js/stat.js"></script>
  197. </div>
  198. </html>