HackerTrans
TopNewTrendsCommentsPastAskShowJobs

coldsauce

no profile record

Submissions

Show HN: Top of Hacker News

tophacker.news
1 points·by coldsauce·anno scorso·0 comments

Save ChatGPT Conversations to Notion

github.com
1 points·by coldsauce·3 anni fa·0 comments

Show HN: Lenses: AI-Augmented Twitter Timeline

chrome.google.com
1 points·by coldsauce·3 anni fa·1 comments

Building an Embeddings-Powered GPT-3 Bot for Our Browser Extension Community

plasmo.com
2 points·by coldsauce·4 anni fa·0 comments

Show HN: We just enabled Vercel's preview comments on our docs page

6 points·by coldsauce·4 anni fa·2 comments

Show HN: Plasmo – a framework for building modern Chrome extensions

github.com
132 points·by coldsauce·4 anni fa·37 comments

Show HN: Play Videos in the Chrome DevTools Console

github.com
1 points·by coldsauce·4 anni fa·0 comments

Gitleaks – Scan Git repos (or files) for secrets using regex and entropy

github.com
3 points·by coldsauce·4 anni fa·0 comments

comments

coldsauce
·3 anni fa·discuss
While I agree those areas are much nicer, most people still need to commute to go work in, and spend considerable amount of time in soma, fidi, etc.

I used to live in one of those areas you talk about, yet still was attacked and threatened several times in the span of 6 months during my commute to our office on Market street.
coldsauce
·3 anni fa·discuss
Hi HN! Excited to showcase a fun browser extension we built over the weekend. Lenses is a browser extension for Twitter that transforms all the tweets in your feed to make them match your mood.
coldsauce
·3 anni fa·discuss
So great to hear! What kind of extension are you building?
coldsauce
·3 anni fa·discuss
Great feedback! I'll push a change to add that.
coldsauce
·3 anni fa·discuss
We have a lot of ideas on how to make this problem a lot easier. It's a big reason why extensions aren't as big as they could be. Browser extension devs having to tinker and even think about the DOM or any other website-specific quirk is a leaky abstraction.

If it's an issue, people's usual approach to solving that problem is to create some mapping of "twitter-sidebar : some XPath selector" on the backend and have their extension query whenever they want to interact with the web page.

They'll have e2e tests to check if their selectors or xpaths still work. If not, they'll figure out what changed and modify the xpath. Some automate this step.

It's tricky because A/B tests are a thing, websites might change based on geographical region, and a bunch of other stuff that leads to users seeing different things in the DOM compared to the e2e test). Logging errors to something like Sentry mitigates some of this, but the complexity is still quite large.

It stems from the fact that frontends only consider humans, not robots. You either need to make your robot super resilient to change (above approach), make your robot act more like a human, have the website consider the robot ("Connect to Wallet", etc), or use the web app's backend API if it exists.

We're experimenting with all four of these approaches this year and seeing which ones are the most valuable to people, so stay tuned for more exciting extension stuff!
coldsauce
·3 anni fa·discuss
Shameless plug, but we built the Plasmo Framework to make that (and a lot more) super easy: https://github.com/plasmohq/plasmo
coldsauce
·4 anni fa·discuss
Yeah, I believe China doesn't even allow TLSv1.3
coldsauce
·4 anni fa·discuss
In his most recent testimony, Mudge mentioned that he was in the leaked OPM database with his details and clearance level leaked which implies he had clearance.
coldsauce
·4 anni fa·discuss
Thanks for the feedback! Updated it.
coldsauce
·4 anni fa·discuss
Thanks!
coldsauce
·4 anni fa·discuss
Our tooling is written in Node.js. So developers must have Node installed on their machines to utilize our tooling.

When they use our CLI to watch the file system for changes for live-reload or to build their extension, etc., that's a Node.js program.

The build target is browser Javascript, though.
coldsauce
·4 anni fa·discuss
We use Parcel under the hood and are huge fans! Our framework has opinionated abstractions on top of it that we think help improve the extension development experience considerably.

Features we've built so far:

- manifest.json is generated automatically. If you want to create a content script, you name a file content.ts, and it'll auto-gen the right manifest key-value pair for it. Same with backround.ts. [1]

- Mounting a React component to the popup or options page is similar. You create a popup.tsx or options.tsx file, export a default React component, and it'll automatically associate it in the manifest and mount the component automatically for you.

- We support environment variables with .env files [2]

- We just released support to automatically inject a shadow DOM into a webpage and mount a React component from a content script [3]

- We have remote code bundling that automatically fetches URL based imports (like Google Analytics) in build time to mitigate issues with MV3 not allowing remote code [4]

[1]: https://docs.plasmo.com/#where-is-the-manifestjson-file

[2]: https://docs.plasmo.com/workflows/env

[3]: https://github.com/PlasmoHQ/examples/tree/57791e70549441e391...

[4]: https://docs.plasmo.com/workflows/remote-code
coldsauce
·4 anni fa·discuss
Thanks! We wrote a custom Parcel runtime [1] inspired by Parcel's HMR runtime (which was too bloated and buggy for us) that injects a web socket listener into the development build of the extension.

Whenever a bundle change happens, Parcel sends it the refresh message and it either does `chrome.runtime.reload()` or `location.reload()` depending on the context.

[1]: https://github.com/PlasmoHQ/plasmo/blob/main/packages/parcel...
coldsauce
·4 anni fa·discuss
There's standardization work being done at the moment with the W3C WebExtensions Community Group [1] which is definitely a step in the right direction!

Mozilla has also done some great work building a web extension polyfill library that attempts to abstract away the differences between the browsers [2] but the translation will always be imperfect, and edge cases are abundant.

[1]: https://www.w3.org/community/webextensions/

[2]: https://github.com/mozilla/webextension-polyfill
coldsauce
·4 anni fa·discuss
It's definitely something we want to consider in the future! Right now, we want to focus on a single view framework and make the developer experience as seamless as possible with it. The framework we've chosen is React because we're most familiar with it.