Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Mime-type handling #1

Closed
semperos opened this Issue Dec 29, 2011 · 3 comments

Comments

Projects
None yet
2 participants

To start off, thanks for contributing what looks to be an awesome library for making presentations.

I've tried to take your example app for a spin (using the instructions in the README to create a presentation called mypres), and have hit a snag. I'm running:

  • Mac OSX Lion
  • lighttpd/1.4.28 (ssl) (installed via Homebrew)
  • Chrome 16.0.912.63

My first snag was the include_shell declaration at the top of lighttpd.conf. That Perl file does not exist in my installation, but even after finding a copy and adding it, the mime-type was still not set correctly (when going to http://localhost:8080/mypres.svg, the file was simply downloaded). After a little searching, I added this to my lighttpd.conf and at least got the page to load:

mimetype.assign = (
  ".svg" => "image/svg+xml"
)

However with this, I get some JavaScript errors in an alert box that look like this:

TypeError: Cannot call method 'getElementsByTagName' of undefined
TypeError: Cannot call method 'getElementsByTagName' of undefined
    at Pf (http://localhost:8888/traction-0.0.1.js:141:37)
    at Rf (http://localhost:8888/traction-0.0.1.js:142:54)
    at qa.<anonymous> (http://localhost:8888/traction-0.0.1.js:151:318)
    at mb.handleEvent (http://localhost:8888/traction-0.0.1.js:13:720)
    at Vb (http://localhost:8888/traction-0.0.1.js:23:26)
    at Ub (http://localhost:8888/traction-0.0.1.js:22:387)
    at qa.<anonymous> (http://localhost:8888/traction-0.0.1.js:27:6)
    at qa.dispatchEvent (http://localhost:8888/traction-0.0.1.js:39:219)
    at Qc (http://localhost:8888/traction-0.0.1.js:42:479)
    at qa.jb (http://localhost:8888/traction-0.0.1.js:41:81)

...and I get the following my Chrome console:

Error in event handler for 'undefined': TypeError: Cannot call method 'removeEventListener' of null (extensions/event.js:181)
    at bindShortcuts (chrome-extension://alelhddbbhepgpmgidjdcjakblofbmce/javascripts/content_script.js:418:7)
    at chrome-extension://alelhddbbhepgpmgidjdcjakblofbmce/javascripts/content_script.js:21:4
    at [object Object].dispatch (extensions/event.js:179:28)
    at extensions/renderer_extension_bindings.js:99:24
    at [object Object].dispatch (extensions/event.js:179:28)
    at Object.<anonymous> (extensions/renderer_extension_bindings.js:164:22)
    at qa.<anonymous> (http://localhost:8888/traction-0.0.1.js:151:461)
    at mb.handleEvent (http://localhost:8888/traction-0.0.1.js:13:720)
    at Vb (http://localhost:8888/traction-0.0.1.js:23:26)
    at Ub (http://localhost:8888/traction-0.0.1.js:22:387)
chrome.Event.dispatch

(12 times) event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future. (extensions/event.js:181)

Looking forward to using traction going forward; thanks for the contribution.

@ghost ghost assigned Chouser Dec 30, 2011

Owner

Chouser commented Dec 30, 2011

Well, thanks for the quick feedback. Sounds like a train wreck. I'll try to take a look at it tomorrow.

Owner

Chouser commented Dec 30, 2011

I've updated the lighttpd config -- hopefully it will work on more platforms now. But I can't reproduce your JavaScript errors. Do you see them if you go to http://chouser.n01se.net/misc/traction-cljs.svg ?

The manual mime-type additions to the lighttpd.conf file fixed all the issues for me (and no, I don't get any errors when visiting your presentation on n01se.net). Thanks for the quick turnaround!

@semperos semperos closed this Dec 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment