16

Ok, so I've been thinking for a bit, and I know there's a ton of alternative "libre" frontends for websites like YouTube and Reddit. However, I was thinking: what If I just wanted to make my own frontend? Not specifically for the intentions of "libre", but I wanted to change the controls and appearence of the website. I'm honestly unsure of how to approach this. Any thoughts?

you are viewing a single comment's thread
view the rest of the comments
[-] Deckweiss@lemmy.world 3 points 11 months ago

A website is just textfiles that your browser downloads. You can open the debug menu and read them, and even edit them. Sometimes the files are minified or obfuscated and you need to use some special tools to make them readable. But the core concept is: the files are on your pc, you can do with them whatever you want.

If you don't know how to start, it seems to me that you wouldn't have enough skill to succeed. So instead I'd suggest you start with what's called "userscripting" (greasemonkey or similar). Userscripting is a way to modify a website on the fly. For example you could remove some elements, reposition elements, add buttons with new functionality etc. That will let you start with your goal on a small scale, possibly with some compromises from your vision. But you will be able to get into the general workflow and get results in a reasonable timeframe.

If you want to do it properly you have to study the API, which can be either publicly documented or you have to read the websites source to reverse engineer it. Then you just program a website like usual which uses the API and does something with the results. If there are already open source frontends, and no public API docs, you can read those projects source instead, which is easier than reverse engineering.

Hope this helps as an entry point

[-] g6d3np81@kbin.social 1 points 11 months ago

I also have a similar side project planned for a revamp. Successfully made a v1 with grease monkey (vanilla JS) + stylish back in maybe 2016. Super dangerous to keep firefox 56 running only for this front-end. Just need to do the v2 then migrate to latest librewolf.

I want to redo the whole thing in Vue, client side routing with build step. The problem is that

  • site is not open source
  • no API doc (but I already made my own)
  • required log-in (no sensitive info)
  • some route request must be made from that domain due to CORS

My goal is not to change the UI but wipe the whole page and start over with custom API call instead. V1 do this by visiting a 404 route to stop unnecessary load and use my own URL param for the API call. For bonus cringe I used local storage for database.

Ended up having to use userscript, and now I'm kinda stuck with how to mash Vite build and tamper/violent monkey together :(
Do you have any suggestion or resource I can learn more on this?

this post was submitted on 12 Nov 2023
16 points (94.4% liked)

Programming

17326 readers
148 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS