Posts

Showing posts with the label Hack

The Manual Way to Hide / Remove reCaptcha Audio

Image
Was trying to disable the audio option for reCaptcha, but couldn't find the official way to do so. So in the end, I used the old-school javascript + CSS method to hide the buttons. Hiding the buttons Add this code snipped anywhere after the reCaptcha code. <script type="text/javascript"> jQuery(document).ready(function(){ document.getElementById('recaptcha_switch_audio_btn').style.display="none"; document.getElementById('recaptcha_reload_btn').style.display="none"; document.getElementById('recaptcha_whatsthis_btn').style.display="none"; }); </script> Filling ackground color Now  we have a empty space in the column where the buttons are. So just use CSS to replace the color. #recaptcha_table tr {background:#dfdfdf;} There you go, a reCaptcha with no audio option. :)

Facebook

Been having problem with Facebook Apps auto-resize and tried to remove annoying vertical scrollbar. After Googled for a while, found the following snippet. Its a simple hack that works perfectly! <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId : 'YOUR-APP-ID-HERE', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); </script> <script type="text/javascript"> window.fbAsyncInit = function() { FB.Canvas.setSize(); } // Do things that will sometimes call sizeChangeCallback() function sizeChangeCallback() { FB.Canvas.setSize(); } </script>