Skip to content

Instantly share code, notes, and snippets.

@joseadrian
Created July 11, 2012 17:57
Show Gist options
  • Save joseadrian/3092037 to your computer and use it in GitHub Desktop.
Save joseadrian/3092037 to your computer and use it in GitHub Desktop.
Bookmarklet: Direct Link Config Fb App
(function(){
var regex = /(?:^https?:\/\/(?:www\.)?(?:developers\.)?facebook.com\/(?:apps\/)?(?:.+(?:\/|\?sk=))(?:app_)?)([0-9]{15})(?:.+)?/;
if( (app_id = location.href.match(regex)) != null )
{
location.href= 'https://developers.facebook.com/apps/'+app_id[1]+'/summary';
}
})();
// Bookmarklet
(function(){ var regex = /(?:^https?:\/\/(?:www\.)?(?:developers\.)?facebook.com\/(?:apps\/)?(?:.+(?:\/|\?sk=))(?:app_)?)([0-9]{15})(?:.+)?/; if( (app_id = location.href.match(regex)) != null ) location.href= 'https://developers.facebook.com/apps/'+app_id[1]+'/summary'; })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment