This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.responsive = { | |
breakpoints: [ | |
{ | |
name:'xs', | |
width: 641 | |
} | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB.getLoginStatus(function(response) { | |
if (response.status === "connected") { | |
// use the response.authResponse | |
} | |
else if (response.status === "not_authorized") { | |
FB.login(function(response) { | |
... | |
}, { scope: "email, read_stream" }); | |
} | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.fbAsyncInit = function () { | |
FB.init({ | |
appId:'XXXXXXXXXXXXXXXXXX', | |
status:true, | |
cookie:true, | |
xfbml:true | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function postWidgetToFeed() { | |
// calling the API ... | |
var obj = { | |
method: 'feed', | |
link: 'https://[URL-TO-PAGE]/app_[APP-ID]', | |
name: 'title', | |
caption: 'caption text', | |
description: 'descritption text', | |
picture: 'https://[PATH]/thumbnail.jpg', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($('#checkbox-id').is(':checked')){ | |
// checked | |
} else { | |
// unchecked | |
} | |
// radios | |
$('input[name=radioName]:checked').val() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Utils = { | |
Math:{ | |
roundFloat:function(number, dec) { | |
if (dec < 1 || dec > 14) { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require('facebook-sdk/facebook.php'); | |
define('APP_ID', 'XXXXXXXXX'); | |
define('APP_SECRET', 'XXXXXXXXXXXXXXXXXX'); | |
$facebook = new Facebook(array( | |
'appId' => APP_ID, | |
'secret' => APP_SECRET, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandom(min, max) { | |
if (min > max) { | |
return -1; | |
} | |
if (min == max) { | |
return min; | |
} | |
var r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = { | |
calculate:function(resultA, resultB, betA, betB) | |
{ | |
console.log('Result: ' + resultA + ':' + resultB + ' Bet: ' + betA + ':' + betB); | |
if(this.testStrike(resultA, resultB, betA, betB)) | |
{ | |
console.log('3 Points'); | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var error = false; | |
var pattern = /^([a-zA-Z0-9+_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/; | |
var mailAddress = '[email protected]'; | |
if(!pattern.test(mailAddress)) | |
{ | |
error = true; | |
} |