开发者

Close a gmail contextual gadget

开发者 https://www.devze.com 2023-03-12 11:50 出处:网络
Is there a way to close / hide a gmail contextual Gadget? I know, there are extractors, which decide when to trigger the gadget at all. But these don\'t give enough options to help me.

Is there a way to close / hide a gmail contextual Gadget?

I know, there are extractors, which decide when to trigger the gadget at all. But these don't give enough options to help me.

What I'm trying to do is match the email addresses with the users contact list and if ther开发者_运维知识库e are no matches I need to close / hide the gadget.

So, it seams to me, this can not be done by an extractor.


Have a button/link that can show/hide the content part of the gadget. Save this preference in a <UserPref>. When the gadget is loaded again, show or hide based on that pref.

You can check how to define, set and get UserPref here: http://code.google.com/apis/gadgets/docs/basic.html#Userprefs

Also remember to change the height when showing or hiding the content pane within the gadget.


The user, or your gadget code, can set gadget height to 0 - if your gadget has no name or favicon, it will apparently disappear from Gmail (only a ~20-px high grey stripe will appear).

Gadget names and favicons are optional.

You can see this behavior with my gadget http://wishery.com/install

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号