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?

  • 4L3moNemo@programming.dev
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago

    Easyest way, to begin with, is to use a browser addon and userscripts. Addons to look for are Greasemonkey, Tampermonkey, or Violentmonkey and alike alternatives. Keyword to google “userscripts”. P.S. As I see it, from your description, you just want some mods (changes) to existing UI, no need to rebuild one from a scratch in other more complicated ways.

    • Puzzled@programming.devOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I took a look at these, and decided that I’m gonna use something like flask as a lot of people seemed to express privacy concerns over all of them. If you disagree please let me know.

      • adr1an@programming.dev
        link
        fedilink
        arrow-up
        13
        ·
        1 year ago

        No offense but you should probably start by learning some frontend development (e.g. VueJs) because your pick sounds like you still don’t understand the ‘stack’ architecture, divided between API endpoints (e.g. flask) and the reactive components (Javascript)…

  • SpacePirate@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    The generalized approach in industry is to use API calls, and create classes to structure the data you receive as JSON or XML. At that point, it is entirely up to you how to format and display the data from your classes. Take a look at some of the Lemmy client code like Mlem, Memmy, or Voyager as examples. Though they have gotten more complicated, they all follow this client-server model for front end development.

    However, due to recent shenanigans around API and RSS by companies, mostly those looking to prevent AI companies from using their data for free, the alternative, much worse method is to take the HTML output from a standard web request, and try to reverse engineer the page information into a class structure. This sucks, breaks frequently, and requires you to code around ads and other junk on pages in order to get at the content.