34 votes

Tildes Extended

So it all begun as a [something]monkey script but I decided to give it a try to web extensions after several years of not touching it.

If you don't care about the yada yada, skip right at the bottom now.

Why

So the whole thing revolve around a simple concept: I'd like tildes to remain as lightweight as possible with a simple and clean interface and not too many user settings.
We don't know the full structure of the code yet but, by experience, frontend and backend require quite an effort to be kept in balance so that one or either don't becomes a mess.

From this idea, the next step has been quite obvious. Users that would like a more advanced frontend experience could just download an extension (probably an app for mobile once it becomes possible).

What

Right now the extension does some simple things. It is basically just a porting of the script I made some time ago so you'll get non-tildes link in a new tab and a button to jump to new comments in a topic you already visited.
The extension don't retain any user data. it doesn't care who you are or what you browse. If you're unsure you can check the source code (below).

Future Goals

The immediate priority is to create a "settings" page so you can customize how the features should behave. As an example, about the links in new tab, letting you decide which kind of links should behave like this: all / comment's / text submission's / etc etc. I'm still thinking which are reasonable use-case

After that, I want to try and implement a user's labelling system and that is the reason for the app already requesting access to storage data on the browser. I've yet to figure it out but the gist of it is that I'll store something like username:tag duplet in your browser localstorage and on load of a page, check for usernames match and add the label you choose.

Additional Notes

I know the code is dirty. As I said, I didn't touch extensions since... I think more than 6 years ago. Maybe more.
On top of that, I went for jquery and am more of a modern framework JS developer with a strong preference and background as backend developer, so... you know.
I still think I'll stick to jquery because the syntax is quite clear and I want even non-technical people to be able to understand what's going on in the code if they want to double check.

If you want to contribute you're more than welcome but keep in mind that most basic things are still missing. To mention just a couple:

  • settings page
  • proper isolation of content scripts
  • guidelines or at least a sample to use to implement new features

if you have any resource that you used to build something similar (web extension or the like) please share them as I've a goddamn long commute every day and have time to read :)

Links

It should work on any fork of Chrome as well.
I can't assure the same for future development.


Current features:

  • Link in new tabs management
  • Button to jump to new comments in topics
  • Add custom CSS from external URL
  • Markdown Preview
  • Add User's labels

21 comments

  1. [2]
    ZaphodBeebblebrox
    Link
    Perhaps when it jumps to new comments, it could show the comment immediately above it as well for more context? Sometimes its hard to tell exactly what a comment is talking about without that context.

    Perhaps when it jumps to new comments, it could show the comment immediately above it as well for more context? Sometimes its hard to tell exactly what a comment is talking about without that context.

    6 votes
    1. crius
      (edited )
      Link Parent
      I thought about that already but right know I just wanted to kick off the project otherwise I would just keep postponing. It's not hard to implement. I'll push it in the next update. Edit: I just...

      I thought about that already but right know I just wanted to kick off the project otherwise I would just keep postponing.

      It's not hard to implement. I'll push it in the next update.

      Edit: I just remembered why I didn't do it. A new comment could be like the 20th of a parent comment. If I focus on the parent, you won't see the actual new comment. Instead if I focus on the new comment, you can click on parent and it will bring you to the parent comment.
      The parent comment will have a [back] link to go back as well.

      8 votes
  2. [6]
    crius
    Link
    As a side note, I just realised it works on Yandex as well. I've no idea about how safe it is as I only discovered this mobile browser 10 minutes ago. If someone has more info it would be nice to...

    As a side note, I just realised it works on Yandex as well.

    I've no idea about how safe it is as I only discovered this mobile browser 10 minutes ago.

    If someone has more info it would be nice to share. You can install the chrome extension on it.

    3 votes
    1. [4]
      Gyrfalcon
      Link Parent
      It looks like Yandex is a chromium fork so it should work pretty well?

      It looks like Yandex is a chromium fork so it should work pretty well?

      3 votes
      1. [3]
        crius
        (edited )
        Link Parent
        Yes, the difference is that Yandex allow to install add-ons but I don't know enough about the company behind it. As far as I know it's the only chromium fork for mobile devices that allow plugins....

        Yes, the difference is that Yandex allow to install add-ons but I don't know enough about the company behind it.

        As far as I know it's the only chromium fork for mobile devices that allow plugins.

        Brave is another fork of chromium and the plugin should work there as well but I don't think they have a mobile version yet. It's quite new.

        4 votes
        1. [2]
          dodger
          Link Parent
          Brave has a mobile app (using it now) but I can't see a way to add extensions on it.

          Brave has a mobile app (using it now) but I can't see a way to add extensions on it.

          4 votes
          1. crius
            Link Parent
            Thank you, I didn't know about it. It's a fork of chromium anyway so I suppose at some point they could implement it. I would prefer that to using Yandex.

            Thank you, I didn't know about it.

            It's a fork of chromium anyway so I suppose at some point they could implement it. I would prefer that to using Yandex.

    2. EightRoundsRapid
      Link Parent
      I use Yandex browser on Android because it allows me to use Chrome extensions, and is faster/more responsive when using them than Firefox mobile is. Yandex are basically the Russian "Google", like...

      I use Yandex browser on Android because it allows me to use Chrome extensions, and is faster/more responsive when using them than Firefox mobile is.

      Yandex are basically the Russian "Google", like Tencent are the Chinese "Google".

      3 votes
  3. crius
    Link
    Just updated with working settings page to customize your preferences: https://i.imgur.com/WT3wIrW.png

    Just updated with working settings page to customize your preferences:

    https://i.imgur.com/WT3wIrW.png

    3 votes
  4. crius
    Link
    Update with additional feature: Load external CSS (waiting for chrome and firefox market to publish the update)

    Update with additional feature: Load external CSS

    (waiting for chrome and firefox market to publish the update)

    3 votes
  5. [5]
    bee
    Link
    Looks good! Is there a public repo somewhere?

    Looks good! Is there a public repo somewhere?

    2 votes
    1. [2]
      crius
      Link Parent
      Yep, the "source code" link point to the github repo. I'm thinking of moving everything to gitlab to be honest. I'll update the link in case it happens.

      Yep, the "source code" link point to the github repo.
      I'm thinking of moving everything to gitlab to be honest. I'll update the link in case it happens.

      4 votes
  6. DonQuixote
    Link
    Nice! It does what I needed, which is to open to a new tab. Great work!

    Nice! It does what I needed, which is to open to a new tab. Great work!

    2 votes
  7. merick
    Link
    Well that didn't take very long! Good work! Looking forward to what the community will come up with for Tildes.

    Well that didn't take very long! Good work! Looking forward to what the community will come up with for Tildes.

    2 votes
  8. [2]
    Comment deleted by author
    Link
    1. crius
      Link Parent
      Glad to hear that, I didn't test it on mobile but I'll try my best to support as many browser as possible :)

      Glad to hear that, I didn't test it on mobile but I'll try my best to support as many browser as possible :)

      1 vote
  9. Grapevine
    Link
    ignore this comment, just want to come back to this thread later

    ignore this comment, just want to come back to this thread later

    1 vote
  10. crius
    Link
    Added support for live preview. Credits given to avinassh but most of the script has been reviewed to make it leaner :)

    Added support for live preview.

    Credits given to avinassh but most of the script has been reviewed to make it leaner :)

    1 vote
  11. crius
    Link
    Updated with user's labels

    Updated with user's labels

    1 vote