Import File Password

Hi,

I am using the latest version of X-notifier in Mozilla firefox. I have downloaded the mail.com js script to add mail.com notifications into my firefox. However, when I click on the import button, I get a popup with the message "Enter password for the file". Please note that this is the downloaded mail.com.js file from x-notifier website and it is NOT exported by me.

Can someone help?

Thanks,

Balaji.

pnbalaji's picture

Subject entered.

You don't add a custom script using the Import button... Import is only for reloading saved Exports.

[In the old X-Notifier version 3.x]... If you want to Add a custom script like mail.com.js... you click the Scripts button, then the Add button.

[Edit:  (Thanks to Jeroen).  With version 4.x of X-Notifier for Firefox, you can no longer add custom scripts, because the change in programming with the new Firefox API prevents the ability to use custom scripts, as the developer has said.  So there is no longer a Scripts button and thus no Add button... and Import is still only to reload Exported backups.]

jeroen's picture

When he means version 4 he obviously cannot add scripts.

pnbalaji's picture

I could see that I am using 4.0.3 version of Xnotifier. So, I cannot add mail.com script in any way?

There are -no- available means of adding any custom scripts, such as mail.com, into the Firefox version of X-Notifier 4.x ...you would have to revert to X-Notifier 3.5.23 (or possibly 3.5.24 if you want Gmail) to restore the ability to add custom scripts... and then also turn off the auto-update feature in the X-Notifier Add-ons, Extensions options (Tools, Add-ons, Extensions, (find X-Notifier, click 'More'), scroll down, click the 'Off' setting for Automatic updates) .
Note:  The Chrome version of X-Notifier 4.x still allows for adding custom scripts

jeroen's picture

But know that the lifespan of X-notifier version 3 is limited.
When Firefox reaches version 57 and Mozilla decides (as announced at that instance) to disable the old XUL/XCOM API, version 3 is history. Then we depend on the developer to add scripts as part of the XN install package. Not that different from the old version 3 for us users, but we have to wait and see which scripts get added by admin. It means more maintenance for the basic package. I reckon that was the idea behind the custom scripts concept.

Kalimist's picture

I hope tobwithu finds a way to add custom scripts feature to X-Notifier V4 for Firefox. I think he has still not researched WebExtensions deeply enough.

Mozilla developers said WebExtensions would be as powerful as Chrome extensions, basically because their purpose was to make them compatible and easier for the developers to program extensions for both browsers.

CFBancroft's picture

Tobwithu set "false" on a custom script on Firefox with 4.0.3, because of Mozilla wants it!
Chrome allowed custom script.
Safari from Apple... not allowed... only way is download directly developer (Tobwithu's website). it works with a custom script.

Not issue about "he has still not researched Web Extension deeply enough."

Kalimist's picture

I meant WebExtensions were created to be compatible with Chrome Extensions, so everything you can program for Chrome can be replicated in a WebExtension for Firefox.

Just FYI... (no debate). Have you seen his post "Future of X-Notifier for Firefox" on xnotifier.tobwithu.com 'home' page? Have to click 'Read more' (lower right corner of post) to see this comment:

X-notifier 4.0 could not pass review process of AMO.

This is because of 'eval' function which is used to load userscript.

It means that you cannot use userscript in X-notifier 4.0 for Firefox.

------------------------------------
Any other way to load a script?

jeroen's picture

@Kalimist:
Your thoughts about admin are just too silly to me. You obviously have no clue about his skill level and experience. But I am also quite sure you mean well ;-)

I did some investigation to illustrate his information (that is exactly the correct term: It is FYI).

XPCOM API:
Long ago I thought to have found this eval function he mentioned in his code:
Components.utils.evalInSandbox(text, sandbox)
Investigation shows this is indeed correct:
"To use evalInSandbox(), you must first create a sandbox object using its constructor, Components.utils.Sandbox. In the constructor you define the security principal for code running in the sandbox, and can make various properties available to code running in the sandbox.
The sandbox will become the global scope object when you pass it to
evalInSandbox(text, sandbox).
You can import functions or objects into the sandbox simply by assigning them to the sandbox object."
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.evalInSandbox

WebExtensions API:
Looking for an equivalent function, I found this obvious answer (because there isn't):
extension.isAllowedFileSchemeAccess()
"Return value:
A Promise that will be fulfilled with a boolean:
true if the extension is allowed access to "file://" URLs, false otherwise.
Firefox will always return false."
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/extension/isAllowedFileSchemeAccess