I would like to know if there is any functionality in the Gecko SDK/NPAPI that would allow me to restrict a plugin-usage to restricted domains only. Exactly like SiteLock for IE does wi开发者_运维技巧th ActiveX components.
Any similar implementation in NPAPI, for example?
Looks like I have to do it manually using NPAPI's GetIdentifier methods to read the url from the DOM tree and act upon it. Ergo just get the page URL using whatever NPAPI method you want to use (NewStream or GetIdentifier) and then compare it to a list of allowed or disallowed domains.
精彩评论