tweetblock working

This commit is contained in:
Garrett Finucane 2014-08-22 21:45:49 -04:00
parent d77a3d81a3
commit 5b78a26de5
3 changed files with 12 additions and 2 deletions

View file

@ -104,7 +104,7 @@
<div id = 'restartBtn'><div id = 'restartBtnInner'><i class="fa fa-refresh fa-2x"></i></div></div>
<div id="bottombar">
<div style="bottom:4px; padding-right:4px;" class="fb-like" data-href="http://hextris.github.io/hextris" data-width="20" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
<a href="https://twitter.com/intent/tweet?hashtags=hextris&original_referer=http%3A%2F%2F0.0.0.0%3A8080%2F&text=Play%20Hextris!%20-&tw_p=tweetbutton&url=http%3A%2F%2Fhextris.github.io%2F" class="twitter-share-button" data-url="http://hextris.github.io/" data-text="Play Hextris! -" data-hashtags="hextris">Tweet</a>
<a onClick="tweetblock=true" href="https://twitter.com/intent/tweet?hashtags=hextris&original_referer=http%3A%2F%2F0.0.0.0%3A8080%2F&text=Play%20Hextris!%20-&tw_p=tweetbutton&url=http%3A%2F%2Fhextris.github.io%2F" class="twitter-share-button" data-url="http://hextris.github.io/" data-text="Play Hextris! -" data-hashtags="hextris">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.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>
<iframe id = 'ghl' src="http://ghbtns.com/github-btn.html?user=Hextris&repo=Hextris&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="90" height="20" onload='showbottombar()'></iframe>
</div>

View file

@ -125,7 +125,16 @@ function handleClickTap(x,y) {
}
if (gameState == 2 && canRestart) {
setTimeout(function(){
if(tweetblock) {
tweetblock = false;
return;
}
else{
init(1);
}
return;
}, 1000);
return;
}

View file

@ -99,6 +99,7 @@ function init(b) {
prevScore = 0;
spawnLane = 0;
op = 0;
tweetblock=false;
scoreOpacity = 0;
gameState = 1;
$("#restartBtn").hide();