Code Monkey home page Code Monkey logo

better's Introduction

Hi there ๐Ÿ‘‹

Iโ€™m an engineer - specializing in web & mobile software, with some experience in data science, hardware, blockchains and physics/mathematics. After my engineering education & MBA, I have worked with tech startups and companies like Meta and ClearTax in roles as diverse as hands-on engineer, co-founder, and engineering leadership for almost 20 years. Fundamentally, I love both hacking and engineering.

This is what I am upto these days. I maintain a list of my requests for hacks. I love open-source and contribute changes wherever I can. Here are some of my open-source projects:

  • aicombinator: An GPT-based personal assistant bot that runs locally, understands tasks in natural language and with a human-reviewed library of composable tasks, can perform complex online tasks across multiple websites and webapps, by driving a browser on your local machine or call APIs when available.

  • LearnDB: A universal, open-source map of learning resources that helps you discover the right material at the right time with reviews from your trusted friends and experts.

  • Better: A browser extension that suggests healthy/ethical/better alternatives to products/businesses you are currently browsing

I also like to learn maths and make music. If you wish to contact me about something, please send me a message on Mastodon.

better's People

Contributors

anirudhvarma12 avatar nileshtrivedi avatar oxalorg avatar revathskumar 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

better's Issues

Thoughts on using something like Preact or Handlebars?

I don't have a lot of experience with building extensions, but I think to make the creation of UI elements easier we can use something like Preact or Handlebars?

They might even help with creating better Options/Settings page, and Extension Icon Popup in the future like this:

image

Allow users to subscribe to multiple lists

This will be good for decentralization and separates content from the software. Here is how uBlock does it:
image

Some code refactoring will be needed for this. Also, in the pop-up, we should then show the source of recommendation.

This is not urgent. We should first build one high-quality list as per #7. And then revisit this if users demand it (or managing our own list causes governance issues).

Codeberg

I see that this project has been migrated onto Codeberg. Is it planned to move there or will it stay on GitHub?

Firefox addon not working

I installed the addon but it does not seem to work.
When opening pages from the list (slack.com, ...) there's no popup that shows me alternatives.
Also the addon does not appear as an icon next to my other addons. Maybe that's related to the issue.
Version: 0.1.1 - updated 01.09.20

Schema of alternatives list

For flexibility in terms of UI, Options, and other future features we should probably make the schema more normalised

[
	{
		"evilUrl": "https?:\/\/(www.)?google.com\/chrome",
		"betterUrl": "https://mozilla.com",
		"betterText": "Mozilla Firefox",
		"betterDescription": "Firefox is open source, backed by the Mozilla Foundation".
		"betterHow": [
			"ethical", "privacy-focused", "random-tag"
		],
	}
]

This should also help mitigate #3

Submit to Product Hunt / HackerNews / Reddit

We can try to get real users and their feedback by posting on these sites.

I'm not sure if now is the right time. We should probably wait till the default list is a bit more useful?

Inconsistent space width

Indentations are currently mixed 2/4 spaces in the js files.

I think the standard nowadays is to use 2 spaces as the indentation.

Prettier by default also uses 2 space indents.

Should we give this a thought?

Proposal for lists

Choosing what to recommend can be a tricky subject, and the pros and cons of various options are more than can be expressed in a small popup. Thus I believe that it would be better to use a third-party list of replacements. That way you can link to a more complete explanation and simply worry about the browser extension rather than the politics of recommending certain replacements. It also allows the users to more reasonably consider the alternatives instead of making a judgement based on a short phrase.

I like how this extension often recommends switching.software. I believe this would be a good precedent to extend to the other recommendations as well.

Need a way to gradually adopt better

At the moment, the better suggestions take up a large amount of real estate on the screen. This makes regular surfing/browsing hard. There is a close button and I can get rid of the better popup. When I'm on a new page my first intention is to see the content of the page and so I tend to hit this close button. When I'm doing something like an intense session of google searches, I'd have to repeatedly close the popup. So, the option in front of me would be to press "do not show suggestions for this URL".

But, it is just that I don't have the time to look at suggestions at this moment. I'm definitely interested in the suggestions, but just not now. Not straightaway. Maybe tomorrow. Maybe some other day.

So, I think there are two things that might be helpful:

  1. "Do not show suggestions for this URL for the next n hours"
  2. A smaller popup in the corner of the screen which doesn't hide the content of the page, but can be expanded to see the actual suggestions.

Don't inherit host site css for our popup UI

The better popup is formatting differently on different sites as it's inherting css.

We should be able to stop this by setting some default styles on the root div of our popup.

Populate the default list

I was thinking of shipping with a default list that recommends ethical / independent / privacy-protective alternatives (such as Hey.com or ProtonMail.com instead of Gmail.com).

It would be nice if organizations like IFF or EFF can take over this extension later. But other use-cases are possible: Bypassing paywalls using LibGen/SciHub, finding discounts and cheaper deals.

Destination URLs should be templates to populate named captures from url pattern

Destination URLs should be able to take params from the current URL. For eg: if you are visiting a particular book on Amazon.com whose ISBN can be picked from the URL, the same ISBN can be passed on to the alternatives like OpenLibrary. This can be done by using named captures in the regexp which seems to be supported in Javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges

This will be useful for directly taking the user to exactly the right destination from a large set (products, books, research papers, or anything that comes from a large set and has a somewhat portable identifier).

Dynamic templating in pure JS can be achieved with a helper function like this:

const templateString = "Hello ${this.name}!";
const templateVars = {
    name: "world"    
}

const fillTemplate = function(templateString, templateVars){
    return new Function("return `"+templateString +"`;").call(templateVars);
}

console.log(fillTemplate(templateString, templateVars));

Donate this extension to EFF or IFF or FSF or something else for better governance

Because this extension ships with a default list of alternatives, I think orgs like these would be best placed to maintain the quality of that list. Others can of course build alternative lists. Hosting with such orgs should also help with user confidence and therefore, adoption.

EFF already hosts a few tech tools related to privacy: https://www.eff.org/pages/tools

I will ping the folks at EFF, IFF, FSF, Mozilla etc to see if they'd be interested.

ui: firefox scrollbar

@anirudhvarma12

In firefox the popup is looking like this:

image

Adding scrollbar-width: none; fixes it. Maybe we can do this if time permits, not an important issue.

Automate importing data from alternative sources

Projects like switching.software, and others recommended in #7 are already doing the hard work of maintaing better suggestions.

We should write a script which imports from their data source to ours.

The importers can be made to run using Github actions CRON scheduling and to create a PR if there is a change detected.

While replacing innerHTML, protect against XSS attacks

Inside the popup, we want to give an explanation, as well as the names and links of 1 or more alternatives. Current solution is to replace innerHTML but that can enable XSS attacks. Need to think of and implement a better approach.

idea: crowdsource suggestions from the extenstions popup

We can have a popup UI from the extensions button (in the browser toolbar) to open where users of better can suggest an alternative for the current URL.

A simple web service running which grabs these suggestions from all our users (completely anonymously). I'd be happy to host it on one of my servers.

I think the entire strength of this extension lies in the better list, so this could help us get there much faster?

This also adds a more engaging element of "Help build a better internet", as we will actively be taking user recommendations.

Fix and test the options UI

Currently, the user can only subscribe to one remote list via the options UI:

image
image

While the code for changing this value seems to work, I haven't tested it for robustness. And eventually, we want to support multiple lists. Check #8 Here is how uBlock does it:
image

[TRIVIAL] Extension Icon Not Visible In Dark Mode

The current icon is really beautiful and minimalistic. However, for browsers that use a dark theme (a very popular choice these days), the icon is not visible at all and it becomes hard to interact through the extensions menu or URL bar.

An icon-based on a more prominent color that goes well with both light and dark themes would be more suited and make it easier for users to find the extension amidst others.

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.