Pahan,
In order to remove the listeners in the content script based on some
action in the popup page you will need to use Message Passing to
notify the content script and then use the native removeEventListener
function. With a "simple one-time request" should be enough
(http://code.google.com/chrome/extensions/messaging.html#simple)

If the keyboard shortcut is triggered inside the popup window you will
need the same kind of communication. If it's triggered in the main web
page then you can handle everything directly from the content script.

Ernest


On Sat, Dec 26, 2009 at 7:19 AM, Pahan Sarathchandra <pahan...@gmail.com> wrote:
> Hi,
> I am new to chrome extension developing and to this group too.
> Ok, here is my dumb question
> I wrote some content scripts with some event listers. its working fine. but
> the thing is I want to turn off the event listner when I wanted. lets say I
> want to select on/off from the popup.html and based on that eventlistner
> runs , Triggering to a keyboard short cut is also a thing I wanted.
> Pls reply If you know how to create them.
> thank you.
>
> --
> පහන්
> Pahan Charithanga
> http://www.pahans.com
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@googlegroups.com.
> To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to