Create a gist now

Instantly share code, notes, and snippets.

@aseemk /index.html Secret
Created Aug 21, 2012

Facebook comments, prevent mobile version on iPad
<div class="fb-comments" data-num-posts="5"><!-- other data- attributes as desired --></div>
if (navigator.userAgent.match(/\biPad\b/)) {
.setAttribute("data-mobile", "false");
<div id="fb-root"></div>
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); = id; js.async = true;
js.src = "//";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment