Giter Site home page Giter Site logo

cristianbote / hnpwa-vanilla Goto Github PK

View Code? Open in Web Editor NEW
273.0 9.0 30.0 2.08 MB

Hacker News PWA implemented using no framework just javascript

Home Page: https://hnpwa-vanilla.firebaseapp.com/

License: MIT License

JavaScript 48.34% HTML 51.66%
javascript vanilla-javascript hacker-news hackernews service-worker pwa hnpwa

hnpwa-vanilla's People

Contributors

cristianbote avatar gersongams avatar iekumdario avatar kresnasatya avatar starchturrets avatar velusgautam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hnpwa-vanilla's Issues

Get error 401 (invalid credentials) after run npm run serve

Hi @cristianbote, it has been long time I don't check this project. I would like to test in locally by run npm run serve but Firebase give response error HTTP Error 401 like below:

Error: HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

Is that I'm missing something? I have tried to set up a Firebase project with the name hnpwa-vanilla and firebase give the project id name: hnpwa-vanilla-a2008. I run command explicitly firebase serve -p 8080 --project hnpwa-vanilla-a2008 and it still gives response HTTP error 401.

html injection

function ifStringSetText(val, el) {
if (!!val && !!val.match) {
el.innerHTML = val;
return true;
}
return false;
}

innerHTML might be an issue if the title of the post is something like:

PWA suffers <em onmouseover="alert('hi')"> html injection attack!

Missing script for npm run serve and run-prod

Is there a global cli tool that is implied in the README.md? I can't npm run serve or npm run-prod because neither is present in package.json.

โžœ  hnpwa-vanilla git:(master) โœ— npm run serve
npm ERR! missing script: serve
โžœ  hnpwa-vanilla git:(master) โœ— cat package.json | jq .scripts
{
  "build-sw": "node sw-build.js",
  "html-minify": "node html-minify.js",
  "copy-assets": "node copy-assets.js",
  "bundle": "microbundle --output public --target browser --format cjs",
  "build-prod": "rm -rf public; npm run bundle; npm run copy-assets; npm run build-sw; npm run html-minify",
  "deploy": "npm run build-prod; firebase deploy"
}

Running in local and please update README.md

Hi Cristian, thanks for your awesome hnpwa-vanilla repo. I just want to learn the code and how it works, but when I do npm run dev as per documentation it doesn't work. I check in package.json and it doesn't contain "scripts": { "dev": "bla bla bla" }. I go to your commit history and it shows that you replace several dependecies with microbundle and you remove the scripts { "dev": "bla bla bla" }. I go to microbundle repository and do as per documentation:

  1. npm i -D microbundle
  2. In package.json I add dev env in scripts: "scripts": { "build": "microbundle", "dev": "microbundle watch" }
  3. npm run dev but it just bundling and didn't show the URL that I must hit in browser.

Could you please give the solution about this with update README.md. Thanks a lot.

Render comments view incrementally

Long comments threads take too long to render. Should have a better experience.
A few options could include:

  • Collapsed threads
  • Lazy render the other
  • Have a thread skeleton render first

Figure it out!

Dark mode color issues

  • Octocat is not visible in amoled dark mode.
  • Link text blends in too well with other text such as username.

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.