Code Monkey home page Code Monkey logo

Comments (5)

jacksonjude avatar jacksonjude commented on July 23, 2024

👍 (I've been meaning to get around to this)

from usa-election-map.

jayqui avatar jayqui commented on July 23, 2024

@jacksonjude: sorry, I feel like this issue was rude . . . I didn't offer any detail about my request. Apologies for that.

You've made an awesome product. I'm a fan of the YouTube channel Let's Talk Elections, and he plugged your map in a recent video.

I'm curious if open source contributions would be welcome for any of the TODO list items etc. I also wonder about the instructions for getting a fork running locally.

from usa-election-map.

jacksonjude avatar jacksonjude commented on July 23, 2024

No worries! A README is definitely something that I should've added earlier. TODO list items are definitely open for anyone to recommend, just open an issue and I'll mark it as "feature".

Running a fork locally is really simple since this code only uses the base HTML/CSS/JS stack (+JQuery, which I have included locally anyways). Just clone the repo and open index.html to run!

There is a caveat here since Chrome (and Safari) are very stingy about loading local svg files due to CORS restrictions. Fixing this CORS issue on Safari is somewhat simple (goto Develop > Disable Cross-Origin Restrictions). Chrome is a little more complicated (you can try running "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=~/chromeTemp on Windows or open -a <chrome executable path> --args --disable-web-security --user-data-dir on Mac). Alternatively, you can try running it on Firefox.

I will update the README with this information since I'm realizing that this is a more complex issue than I first thought :)

from usa-election-map.

jayqui avatar jayqui commented on July 23, 2024

I cloned and did notice the CORS issue in Chrome. On my Mac, one solution was as simple as running a local server in the repo:

brew install http-server
http-server

from usa-election-map.

jacksonjude avatar jacksonjude commented on July 23, 2024

That does make sense since the CORS error happens because of the "file://" protocol, and the local server changes the protocol to "localhost". I'll add that solution to the README.

from usa-election-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.