[orkut-developer] Re: How to test application already added and display add-to-profile link/button

2008-10-17 Thread rd-london
Hi Jason, That's great, works fine. Many thanks, R On Oct 16, 6:43 pm, Jason <[EMAIL PROTECTED]> wrote: > Here's a quick regular expression that you can use: > > var match = window.location.toString().match(/#gadgetId=(\d*)&/); > if (match) { >   output(match[1]); > > } > > Cheers! > - Jason >

[orkut-developer] Re: How to test application already added and display add-to-profile link/button

2008-10-16 Thread Jason
Here's a quick regular expression that you can use: var match = window.location.toString().match(/#gadgetId=(\d*)&/); if (match) { output(match[1]); } Cheers! - Jason On Oct 14, 3:47 am, rd-london <[EMAIL PROTECTED]> wrote: > Hi Jason, > All very helpful, many thanks. > > You say: > > " > In

[orkut-developer] Re: How to test application already added and display add-to-profile link/button

2008-10-14 Thread rd-london
Hi Jason, All very helpful, many thanks. You say: " In this case, you can retrieve the current window location to get the gadget's ID and build the link manually: " What's the recommended way of doing this? Of getting the current window location and then extracting the gadget's ID? Many thanks

[orkut-developer] Re: How to test application already added and display add-to-profile link/button

2008-10-13 Thread Jason
1. There may be a simpler solution in the future, but for now, the most straightforward way to determine whether a user has an app is to fetch the VIEWER object and determine whether it's non-null. If so, the user has your app installed. Otherwise, your app doesn't have access to the user's inform