downforacross / downloadacross

chrome extension for downloading crosswords from various sources
4 stars 4 forks source link

Support Guardian Quick crosswords #14

Closed multimeric closed 4 years ago

multimeric commented 4 years ago

I didn't get time for the big rewrite I was hoping for, but I believe this works.

stevenhao commented 4 years ago

Surprisingly, using the copyright symbol in a string literal in source code is problematic (it was the last place I checked, in the process of debugging https://github.com/downforacross/downforacross.com/issues/90). This probably could've been avoided w/ a proper module bundler, so I'll try to get to setting that up for this project.

As part of the investigation / repro, I added window.copyrightSymbol = "©"; to the source code, then inspected the popup -- it became "©". I believe this is because the js source file is served with the incorrect mime type (or something along those lines -- unfortunately i'm not an expert in file encoding). I pushed a commit to fix this.

multimeric commented 4 years ago

You're right that the source of the problem was the perceived encoding of guardian.js, not anything else. But I solved that I think more neatly by just adding <script src="loaders/guardian.js" charset="utf-8"></script> to the HTML. When I view the extension source code in Chrome, it now no longer shows the wrong character.

stevenhao commented 4 years ago

You're right that the source of the problem was the perceived encoding of guardian.js, not anything else. But I solved that I think more neatly by just adding <script src="loaders/guardian.js" charset="utf-8"></script> to the HTML. When I view the extension source code in Chrome, it now no longer shows the wrong character.

That's a much neater solution, thanks.

multimeric commented 4 years ago

Thanks for the merge. Although I've found a small bug that's equally frustrating. The dashes in the clues are being converted to the paragraph symbol. For example: https://downforacross.com/beta/game/215914-smub. I'm really not sure where the error is occurring in this case.

multimeric commented 4 years ago

Can you publish a new version of the add-on with this change, please?

stevenhao commented 4 years ago

Yup, waiting for review!

stevenhao commented 4 years ago

@TMiguelT it's live!

multimeric commented 4 years ago

Cheers!

stevenhao commented 4 years ago

Closed #9