• Browser
  • Mail
  • News
  • Community
  • About
Register Login
HomeBlogsForumThemesContributeSocial

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    We will be doing maintenance work on Vivaldi Translate on the 11th of May starting at 03:00 (UTC) (see the time in your time zone).
    Some downtime and service disruptions may be experienced.
    Thanks in advance for your patience.

    1. Home
    2. Desktop
    3. Customizations & Extensions
    4. Extensions
    5. Help with Regex to rename tabs

    Help with Regex to rename tabs

    Extensions
    3
    9
    392
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • barbudo2005
      B
      barbudo2005
      last edited by

      I use a script to rename tabs that give this menu for Vivaldi Forum:

      815176a3-2640-4db9-b3b3-2a6b5d073f84-image.png

      You use:

      2b9ab82c-0e5d-47bd-959e-82fa78f59f9c-image.png

      Search for: " | Vivaldi Forum" and Replace with: "" (nothing)

      You have to do it only once per domain and all the pages of that domain will be modified automatically.

      763d6df6-f5ef-45b8-bd1a-fc177812a75e-image.png

      I would like to have besides this generic change a more specific one, but it does not allow to have more than one change per domain.

      This is solved since it allows to add through Regex:

      7c6ed4fe-0b85-472a-9ff3-8d988f1cc69d-image.png

      Let's assume this title:

      5a8cf739-1724-4483-96a7-9fc75df35fff-image.png

      I want this part of the title to be removed as well: "Vivaldi Desktop Browser".

      Then how would the Regex code be to take into account the final part of the title " | Vivaldi Forum" and also "Vivaldi Desktop Browser"?

      nomadic
      N
      paul1149
      P
      3 Replies Last reply
      Reply Quote 0
      • nomadic
        N
        nomadic Soprano @barbudo2005
        last edited by

        @barbudo2005 I always forget everything about Regex in between the infrequent times it comes up in projects.

        The best way to figure it out is with a tool like https://regex101.com. You can paste the tab title in as the Test String and use the Quick Reference to slowly build up the required Regular Expression.

        barbudo2005
        B
        1 Reply Last reply
        Reply Quote 2
        • nomadic
          N
          nomadic Soprano @barbudo2005
          last edited by nomadic

          @barbudo2005 Gave it a go, but not sure how it would interact with the extension. Might need some refinement.

          The actual Regex hidden in case you want to figure it out on your own

          https://regex101.com/r/trNRyL/1

          /(?: \| Vivaldi Forum|Vivaldi Desktop Browser)/mg

          And you can just keep adding on phrases separated by the | character inside the parentheses to search for additional things.

          1 Reply Last reply Reply Quote 1
          • barbudo2005
            B
            barbudo2005 @nomadic
            last edited by

            @nomadic

            Thank you very much. I will try it.

            Said:

            I always forget everything about Regex in between the infrequent times it comes up in projects.

            😂 😂 😂 🤣 🤣 🤣

            It would seem to be unintuitive if forgotten.

            1 Reply Last reply Reply Quote 1
            • paul1149
              P
              paul1149 Supporters @barbudo2005
              last edited by

              @barbudo2005 said in Help with Regex to rename tabs:

              You have to do it only once per domain and all the pages of that domain will be modified automatically

              I use Tab Modifier extension, which allows subdomain and regex url matching.

              Current Vivaldi snapshot.. MX-23 Linux x64, KDE desktop.

              barbudo2005
              B
              1 Reply Last reply
              Reply Quote 0
              • barbudo2005
                B
                barbudo2005 @paul1149
                last edited by

                @paul1149

                Said:

                which allows subdomain and regex url matching.

                It does not matter and does not help that the Regex is used in the URL.

                The important and powerful thing is to use the Regex in the part of the title you want to change.

                Tell me how you can use this extension to remove this part of the title for all forum pages of Vivaldi Forum, just by doing it once?:

                " | Vivaldi Forum"

                This:

                9aa5335b-4534-41a3-8f2f-71008d758d12-image.png

                Instead of this:

                513874e5-9145-43e2-b702-ab2a477e5b51-image.png

                paul1149
                P
                1 Reply Last reply
                Reply Quote 0
                • paul1149
                  P
                  paul1149 Supporters @barbudo2005
                  last edited by paul1149

                  @barbudo2005 One way, not perfect, is to capture only a certain number of characters in the Title.

                  Another would be to set up two capture groups, something like

                  (.*)(\| VIVALDI FORUMS)
                  $1

                  Current Vivaldi snapshot.. MX-23 Linux x64, KDE desktop.

                  barbudo2005
                  B
                  1 Reply Last reply
                  Reply Quote 0
                  • barbudo2005
                    B
                    barbudo2005 @paul1149
                    last edited by barbudo2005

                    @paul1149

                    Please show the change of the title to obtain it:

                    cc48664f-3b36-4639-8353-76385d0a0237-image.png

                    Please show a image of the title of two tabs with short titles (before and after).

                    I should clarify that the forum example was not obtained with Regex.

                    It is necessary only when you want to make two or more changes in a domain.

                    223e7ac5-e8b6-4b95-a0ff-f85f988064c0-image.png

                    paul1149
                    P
                    1 Reply Last reply
                    Reply Quote 0
                    • paul1149
                      P
                      paul1149 Supporters @barbudo2005
                      last edited by

                      @barbudo2005 I have found it tricky, but usually have been able to get it to work.

                      Current Vivaldi snapshot.. MX-23 Linux x64, KDE desktop.

                      1 Reply Last reply Reply Quote 0
                      Loading More Posts
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes
                      Reply
                      • Reply as topic
                      Log in to reply
                      • 1 / 1
                      • First post
                        Last post

                      Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.

                      Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status