13
13
-webkit-border-radius : 5px ;
14
14
border-radius : 5px ;
15
15
}
16
+
17
+ body {
18
+ margin : 0 ;
19
+ padding : 0 ;
20
+ background-color : # 000000 ;
21
+ color : # eee ;
22
+ font-family : Helvetica, Arial, sans-serif;
23
+ }
24
+ .btns {
25
+ height : 60px ;
26
+ width : 320px ;
27
+ overflow : hidden;
28
+ }
29
+
30
+ .btns a {
31
+ height : 60px ;
32
+ width : 160px ;
33
+ float : left;
34
+ }
35
+
36
+ .fb-btn {
37
+ background : # 999 ;
38
+ }
39
+
40
+ .tw-btn {
41
+ background : # 888 ;
42
+ }
43
+
44
+ .btns-i {
45
+ width : 400px ;
46
+ }
47
+
48
+ # scoreboard {
49
+ position : absolute;
50
+ background : # 000 ;
51
+ z-index : 1000 ;
52
+ top : 0 ;
53
+ left : 0 ;
54
+ width : 320px ;
55
+ display : none;
56
+ }
57
+
16
58
</ style >
59
+
17
60
< script src ="phaser.min.js "> </ script >
61
+
62
+ < script type ="text/javascript " src ="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js "> </ script >
63
+
64
+
18
65
</ head >
19
66
< body >
20
67
21
68
< script src ="flappyBids.js "> </ script >
69
+ < div id ="scoreboard ">
70
+ < a href ="index.html "> Back to Game</ a >
71
+ < div id ="score "> </ div >
72
+ < div class ="btns ">
73
+ < div class ="btns-i ">
74
+ < a class ="fb-btn " href ="javascript:void(0); "> </ a >
75
+ < a class ="tw-btn " href ="javascript:void(0); "> </ a >
76
+ </ div >
77
+ </ div >
78
+ < div class ="stream ">
79
+ < a class ="twitter-timeline " href ="https://twitter.com/search?q=%23flappybids " data-widget-id ="435820094212435968 "> Tweets about "#flappybids"</ a > </ div >
80
+ < script > ! function ( d , s , id ) { var js , fjs = d . getElementsByTagName ( s ) [ 0 ] , p = / ^ h t t p : / . test ( d . location ) ?'http' :'https' ; if ( ! d . getElementById ( id ) ) { js = d . createElement ( s ) ; js . id = id ; js . src = p + "://platform.twitter.com/widgets.js" ; fjs . parentNode . insertBefore ( js , fjs ) ; } } ( document , "script" , "twitter-wjs" ) ; </ script >
81
+ </ div >
82
+
83
+ < script type ="text/javascript ">
84
+ function getScore ( ) {
85
+ var url = window . location . href ;
86
+ if ( url . indexOf ( '?s=' ) >= 0 ) {
87
+ score = url . split ( '?s=' ) [ 1 ] ;
88
+ document . getElementById ( 'score' ) . innerHTML = 'Your Score: ' + score ;
89
+ document . getElementById ( 'scoreboard' ) . style . display = 'block' ;
90
+ }
91
+
92
+ }
93
+
94
+ function bindBtns ( ) {
95
+ $ ( document ) . on ( 'click' , '.tw-btn' , function ( ) {
96
+ window . open ( 'https://twitter.com/share?url=https%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button' , 'TweetWin' , 'outerWidth=600,width=500,innerWidth=400,resizable,scrollbars,status' ) ;
97
+ return false ;
98
+ } ) ;
22
99
100
+ $ ( document ) . on ( 'click' , '.fb-btn' , function ( ) {
101
+ FB . ui (
102
+ {
103
+ method : 'feed' ,
104
+ name : 'Facebook Dialogs' ,
105
+ link : 'https://developers.facebook.com/docs/dialogs/' ,
106
+ picture : 'http://fbrell.com/f8.jpg' ,
107
+ caption : 'Reference Documentation' ,
108
+ description : 'Dialogs provide a simple, consistent interface for applications to interface with users.'
109
+ } ,
110
+ function ( response ) {
111
+ if ( response && response . post_id ) {
112
+ alert ( 'Post was published.' ) ;
113
+ } else {
114
+ alert ( 'Post was not published.' ) ;
115
+ }
116
+ }
117
+ ) ;
118
+ return false ;
119
+ } ) ;
120
+ }
121
+
122
+ $ ( document ) . ready ( function ( ) {
123
+ bindBtns ( ) ;
124
+ } ) ;
125
+
126
+ getScore ( ) ;
23
127
</ script >
128
+ < script type ="text/javascript ">
129
+ ( function ( d ) {
130
+ var js , id = 'facebook-jssdk' ; if ( d . getElementById ( id ) ) { return ; }
131
+ js = d . createElement ( 'script' ) ; js . id = id ; js . async = true ;
132
+ js . src = "//connect.facebook.net/en_US/all.js" ;
133
+ d . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( js ) ;
134
+ } ( document ) ) ; </ script >
135
+
136
+
137
+
24
138
</ body >
25
139
</ html >
0 commit comments