This file contains 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
<div id="fb-root"></div> | |
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> | |
<script type="text/javascript"> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : "XXXXXXXXX", | |
status : false, | |
cookie : true, | |
xfbml : true | |
}); |
This file contains 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
<script type="text/javascript"> | |
window.twttr = (function (d, s, id) { | |
var t, js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "//platform.twitter.com/widgets.js"; | |
fjs.parentNode.insertBefore(js, fjs); | |
return window.twttr || (t = { | |
_e: [], |
This file contains 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
document.body.addEventListener('click', function(event) { | |
if ( !event.target.closest("SELECTOR").length && document.querySelector("SELECTOR").hasClass("active") ) { | |
// Your function here | |
}; | |
}); |
This file contains 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 isEmpty(obj) { | |
return ( | |
(typeof obj == 'undefined' || obj === null || obj === '') | |
|| (typeof obj == 'number' && isNaN(obj)) | |
|| (obj instanceof Date && isNaN(Number(obj))) | |
); | |
}; |
This file contains 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
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); |
This file contains 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
<div id="fb-root"></div> | |
<script src="https://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
var appId = 'XXXXXXXXXXXXX'; | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: appId, | |
status: true, | |
cookie: true, |
This file contains 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
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL |
This file contains 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 appId = 'XXXXXXXXXXXXXXX'; | |
// Taken from the App's configuration page | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: appId, | |
status: true, | |
cookie: true, | |
xfbml: true | |
}); |
This file contains 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
const rand = (min, max) => Math.floor(Math.random() * (max - min)) + min; |
OlderNewer