123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>哥,挺住18秒!躲开条子</title>
- <link rel="icon" type="image/GIF" href="res/favicon.ico"/>
- <meta name="viewport" content="width=device-width,target-densitydpi=device-dpi,user-scalable=no" />
- <meta name="apple-mobile-web-app-capable" content="yes"/>
- <meta name="full-screen" content="yes"/>
- <meta name="screen-orientation" content="portrait"/>
- <meta name="x5-fullscreen" content="true"/>
- <meta name="360-fullscreen" content="true"/>
- <style>
- body, canvas, div {
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- -khtml-user-select: none;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- }
- .adbox{
- width: 100%;
- height: 50px;
- position: fixed;
- bottom: -50px;
- display: block;
- left: 50%;
- margin-left: -50%;
- background-size: contain;
- -webkit-animation: adbox .6s .2s;
- -webkit-animation-fill-mode: both;
- }
- .adbox2{
- width: 100%;
- height: 55px;
- position: fixed;
- top: -50px;
- display: block;
- left: 50%;
- margin-left: -50%;
- background-size: contain;
- -webkit-animation: adbox2 .6s .2s;
- -webkit-animation-fill-mode: both;
- }
- @-webkit-keyframes adbox{
- 100%{bottom: 0; }
- }
- @-webkit-keyframes adbox2{
- 100%{top: 0; }
- }
- canvas{
- background-size: contain;
- }
- </style>
- </head>
- <body style="padding:0; margin: 0; background: #000000;position: relative">
- <canvas id="gameCanvas" width="320" height="506" ></canvas>
- <!--<a href="#" style="position: absolute;left: 50%; top: 50%;background-image:url('res/uploadavatar/click.png')" >选择头像</a>-->
- <!--<input type="file" id="upload" style="opacity: 0;position: absolute;left: 50%; top: 50%;" name="image" />-->
- <script src="cocos2d-html5.js"></script>
- <script src="jquery-1.11.1.min.js" type="text/javascript"></script>
- <script language="JavaScript">
- /*document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
- WeixinJSBridge.call('hideToolbar');
- });*/
- </script>
- <span style="display:none;">
- <script type="text/javascript" src="device.js"></script>
- <script type="text/javascript">
- //if(IsPC()){ document.body.innerHTML = ""; }
- var _hmt = _hmt || [];
- var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
- document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F258fa23a79b44bae7819d5e2a301d54b' type='text/javascript'%3E%3C/script%3E"));
- //imgUrl:分享出去图片
- //lineLink:分享出去的地址
- //descContent:分享出去的内容;
- //shareTitle:分享出去的标题
- function getAbsolutePath(relativePath) {
- var img=new Image();
- img.src=relativePath;
- var absolute=img.src;
- return absolute;
- }
- function getShareUrlPath() {
- /*var curWwwPath = window.document.location.href;
- var path = curWwwPath.substring(0,curWwwPath.lastIndexOf('/'));*/
- //return (path + "/a.html"+"?r="+curWwwPath+"?act=weixin_link");
- return ("http://game.ikongzhong.cn/games/gqtz");
- }
- var lineLink = getShareUrlPath();
- var shareTitle = '哥,挺住18秒!躲开条子';
- var shareCallback = "http://game.ikongzhong.cn/";
- document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
- WeixinJSBridge.on('menu:share:appmessage', function (argv) {
- WeixinJSBridge.invoke('sendAppMessage', {
- "img_url": getAbsolutePath(headSrc==res_k_head1?res_k_head3:res_f_head3),
- "link":lineLink,
- "desc":ShareWords,
- "content":ShareWords,
- "url":lineLink,
- "title":shareTitle
- }, function (res) {
- try {
- _hmt.push(['_trackEvent', 'escape', 'click', 'callback', '1']);
- } catch(e) {}
- document.location.href = shareCallback;
- })
- });
- WeixinJSBridge.on('menu:share:timeline', function (argv) {
- WeixinJSBridge.invoke('shareTimeline', {
- "img_url": getAbsolutePath(headSrc==res_k_head1?res_k_head3:res_f_head3),
- "link":lineLink,
- "desc":ShareWords,
- "content":ShareWords,
- "url":lineLink,
- "title":ShareWords
- }, function (res) {
- try {
- _hmt.push(['_trackEvent', 'escape', 'click', 'callback', '1']);
- } catch(e) {}
- document.location.href = shareCallback;
- });
- });
- WeixinJSBridge.on('menu:share:weibo', function (argv) {
- WeixinJSBridge.invoke('shareWeibo', {
- "img_url": getAbsolutePath(headSrc==res_k_head1?res_k_head3:res_f_head3),
- "link":lineLink,
- "desc":ShareWords,
- "content":ShareWords,
- "url":lineLink,
- "title":shareTitle
- }, function (res) {
- try {
- _hmt.push(['_trackEvent', 'escape', 'click', 'callback', '1']);
- } catch(e) {}
- document.location.href = mebtnopenurl;
- });
- });
- }, false);
- var c = document.getElementById("gameCanvas");
- c.style.background = "url(res/background.jpg) no-repeat center";
- c.style.backgroundSize = "cover";
- </script>
- </body>
- </html>
|