Greetings. I am trying to create a web extension that will determine if there is a card in the card reader. I have a simple extension set up to just test run. When I run the web page I am getting browser.pkcs11 undefined. I have a PKCS11 Module created in my firefox call “TAA ActivClient Module”. Any help would be greatly appreciated.
Here is my simple manifest.json
{
"manifest_version": 2,
"name": "CACListener",
"version": "1.0",
"description": "Adds a polling Listener to the carder reader slot",
"icons":
{
"48": "icons/border-48.png"
},
"permissions":
[
"pkcs11"
],
"content_scripts":
[
{
"matches": ["*://*/taa/*"],
"js": ["CACListener.js"]
}
]
}
Here is the code that is failing:
try
{
if (!navigator.appName.toUpperCase().substring(0, 9) == "MICROSOFT");
{
<b>var getting = browser.pkcs11.getModuleSlots("TAA ActivClient Module");</b>
alert(lastStatus);
if(lastStatus != currentStatus)
{
(currentStatus.equalsIgnoreCase("Inserted") ? onSmartCardInsert() : onSmartCardRemove() );
}
setTimeout(checkReaderStatus, 1000);
}
alert("2");
}
catch(e)
{
alert(e);
}