0

I'm using a plugin, and the docs say to use the following script:

<script type="text/javascript" src="https://cdn.emailjs.com/dist/email.min.js"></script>
<script type="text/javascript">
   (function(){
      emailjs.init("user_X");
   })();
</script>

But in Firefox, and only Firefox I'm getting:

ReferenceError: emailjs is not defined

UPDATE:

Looks like it's having a certificate issue:

cdn.emailjs.com uses an invalid security certificate.

The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported.

(Error code: sec_error_unknown_issuer)

Dan G Nelson
  • 862
  • 2
  • 11
  • 30
  • 1
    Could you try using a local copy of `email.min.js` and see if the error is still there? – Satej S Feb 17 '16 at 03:46
  • Cannot reproduce in Firefox 44.0.2. – Alexander O'Mara Feb 17 '16 at 03:50
  • 1
    What is your question? – Felix Kling Feb 17 '16 at 03:53
  • @FelixKling, essentially it can't find a definition for emailjs which is being called in the function.I believe this means the JS file hasn't been included properly. – Satej S Feb 17 '16 at 03:56
  • Try removing `https`. use `http` instead. – Redmega Feb 17 '16 at 03:58
  • @Redmega Both are available, and using `https` where possible is generally a good idea to avoid tampered scripts. Take the recent Chinese DDOS attack on Github for example. – Alexander O'Mara Feb 17 '16 at 03:59
  • @AlexanderO'Mara True. Sometimes it tends to cause issues when running locally/behind a proxy. Perhaps he should use [protocol-relative paths](http://stackoverflow.com/questions/2725523/how-to-include-css-and-js-files-via-https-when-needed) – Redmega Feb 17 '16 at 04:02
  • Try downloading `email.min.js` to your local server and give local server path in `script src` and see if you are able to run. – Royal Pinto Feb 17 '16 at 04:18

0 Answers0