Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#137 Adding external message listener #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasperTack
Copy link

By adding this listener for external messages, we allow for other extensions or web pages themselves to send messages to the SabConnect++ extension.

This is for example useful when sabnzbd links are injected dynamically by another extension. Since the links on a webpage are only analysed once right after the page is loaded, any content that has been inject dynamically at a later stage won't be analysed and won't be sent to the SabConnect++ extension. Therefore, it would be useful if the other extension is able to send the 'addToSabnzbd' message manually to the SabConnect++ extension.

@vanilla-thunder
Copy link
Contributor

otherwise you could add event listenes like this:
$("body").on("click",$element, function() { add_link_to_sabnzbd(); });
instead of placing event listenes on buttons / links itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants