Thank you! It is better than "if (typeof(GM_registerMenuCommand) !==
'undefined') { ... }".On Nov 15, 6:26 pm, Anthony Lieuallen <[email protected]> wrote: > On 11/15/2011 05:20 AM, Valentine Sarychev wrote: > > > How to detect GM_registerMenuCommand availability? > > Probably the most reliable: > > try { > GM_registerMenuCommand(...);} catch (e) { > > alert('Could not call GM_registerMenuCommand!'); > > } > > But "window.GM_registerMenuCommand" will never ever be defined. > Definitely no need to try to check for that. -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
