Skip to content

Instantly share code, notes, and snippets.

View brandwaffle's full-sized avatar

Vasken Hauri brandwaffle

View GitHub Profile
@brandwaffle
brandwaffle / facebook.html
Created September 27, 2011 00:11
facebook data retrieval
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# brandwaffel:
http://ogp.me/ns/apps/brandwaffel#">
<meta property="fb:app_id" content="164019983683858" />
<meta property="og:type" content="brandwaffel:the_noid" />
<meta property="og:title" content="the Noid" />
<meta property="og:image" content="http://brandwaffle.info/facebook/noid.gif" />
<meta property="og:description" content="Can you do it?" />
@brandwaffle
brandwaffle / jquery.commentswitcher.js
Created April 21, 2011 00:31
switches betwixt fb and wp comments
jQuery('.switch-to-fb-comments').live('click', function(){
window.wp_comm_form = jQuery('#respond').html();
jQuery('#facebook_comments').remove();
jQuery('#respond').html('<a href="#" class="switch-to-wp-comments">Switch to WP</a><fb:comments id="facebook_comments" href="url_to_comment"></fb:comments>');
fbAsyncInit();
event.preventDefault();
});
jQuery('.switch-to-wp-comments').live('click', function(){
jQuery('#respond').html(window.wp_comm_form);
event.preventDefault();
@brandwaffle
brandwaffle / jquery.scrolltest.js
Created April 20, 2011 02:20
hashbang jQuery scroller
jQuery(window).load(function(){
var scroll_array = window.location.hash.split('/', 2);
if(scroll_array[0] === '#!showcomment')
window.scroll(0,jQuery('#div-comment-'+scroll_array[1]).offset().top - 100);
jQuery('#div-comment-'+scroll_array[1]).css('background-color', '#F5A9A9');
});