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

Does not function in Firefox #43

Closed
tb000 opened this issue Dec 5, 2013 · 8 comments
Closed

Does not function in Firefox #43

tb000 opened this issue Dec 5, 2013 · 8 comments
Labels

Comments

@tb000
Copy link

tb000 commented Dec 5, 2013

This simple example does not seem to work in Firefox 25.0.1 on OS X (it works in other browsers):

http://jsfiddle.net/mnH2X/

The issue seems to be a NotSupportedError on line 35 of bigtext.js.

Forgive me if I'm missing something obvious.

@zachleat
Copy link
Owner

zachleat commented Dec 5, 2013

No problem! In Chrome the test seems to report:
Refused to execute script from 'https://raw.github.com/zachleat/BigText/master/bigtext.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Switch the URL to use https://rawgithub.com/ instead?

@tb000
Copy link
Author

tb000 commented Dec 5, 2013

Thanks for the response!

With that change, it continues to work in Chrome and Safari, but not in Firefox:

http://jsfiddle.net/MWFFA/

@dlosie
Copy link

dlosie commented Dec 6, 2013

I had this same problem today on a site I'm building. BigText was working in Chrome, but not Firefox or IE. I was getting the same NotSupportedError on line 35.

After troubleshooting, it is finally working now. It seems that by just moving the line linking to bigtext.js from the head to right before or after the closing body tag fixes the issue.

Hopefully that solves the problem for you as well.

@zachleat
Copy link
Owner

zachleat commented Dec 6, 2013

For sure you can use the DOMContentLoaded or onload events to fire it and it should work fine.

I’m still looking into how to fix this transparently in the script.

@paul-cla
Copy link

Just had the same issue, thanks for this

@CodingSamurai
Copy link

Just had the same issue as well. Kudos to dlosie for the fix!

@isellsoap
Copy link

@zachleat Looking forward to the fix, thanks!

Edit: Apparently wrapping getComputedStyle in ready() solves the issue (see Stack Overflow question and answer).

dasmall added a commit to dasmall/BigText that referenced this issue Mar 18, 2014
@zachleat
Copy link
Owner

Per BigText requirements, the script may only be run after DOMContentLoaded. I don’t think we’ll fix this transparently in the script. Thanks!

Please reopen if the current master version is causing you issues even after wrapping inside a $(document).ready

shime added a commit to shime/kadcezucko.info that referenced this issue Aug 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants