Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does your extension really need all those permissions?

    "permissions": [
        "webRequest",
        "tabs",
        "http://*/*",
        "https://*/*",
        "storage"
    ]
Does your code really need to be minified? Why do you fetch the HN front page using an external API (http://producthunter.awesome.io/hn.json) when you could easily scrape HN's front page directly?

Finally, you should probably disclose that you are tracking people who use your extension through Google Analytics (https://gist.github.com/anonymous/9847044#file-gistfile1-js-...).

Sorry for being a bit paranoid... Other than that, seems like a nice extension!



thanks for reaching out

      Does your extension really need all those permissions?
        "permissions": [
            "webRequest",
            "tabs",
            "http://*/*",
            "https://*/*",
            "storage"
        ]
Good question - maybe you know ways to improve this

Storage is to cache results, webrequests to request the json, tabs to place the tab.

Im unsure if i access anything through http:// anymore - might just be a development relict.

I could limit to certain domains to avoid hacking vectors.

But that's a bit too much for an simple friday afternoon hack i guess.

    Does your code really need to be minified?
I used grunt / yeoman for chrome extensions. Minifactions came out of the box and i didn't see any reason not to minify. Eg i also minify all JS on my websites

    Why do you fetch the HN front page using an external API 
    when you could easily scrape HN's front page directly?
HN's html structure is quiet a pita so i wanted to keep this on the server site (updates through chrome app store can take days).

I could use inofficial HN JSON APIs but i needed to add my imgur links anyway and i don't know any safe way to make those on the client side without enabling people reusing my api keys.

    Finally, you should probably disclose that you are tracking 
    people who use your extension through Google Analytics 
Good idea.

It didn't came to mind because most extensions like this use GA to track usage/events/etc - some even use JS error loggers.

Where would you communicate this? TBH i hardly ever communicate this on my website projects neither (apart of in the wall-of-text-TOS)

thanks for the feedback




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: