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

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Desktop
    3. Customizations & Extensions
    4. Modifications
    5. Project History Moon

    Project History Moon

    Modifications
    javascript modding
    8
    72
    2302
    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.
    • V
      valiowk @luetage
      last edited by

      @luetage Thank you very much, I can visualize how to play with this enough to get a working mod now with a template to get started!

      1 Reply Last reply Reply Quote 0
      • luetageL
        luetage
        last edited by

        Update to the mod! I created new icons for all moon phases from scratch. For the original release I was more concerned with the calculation, but I was never quite satisfied with the icons, because they displayed the moon in the background color and especially new moon and full moon seemed to be reversed. The new SVG icons need far less code and therefore I removed the CSS – this has become a pure Javascript modification. Additionally I implemented a handy switch to choose between northern and southern hemisphere by changing a single variable. Edited original post to point out the changes.

        github ◊ vfm

        stardeppS 1 Reply Last reply Reply Quote 1
        • stardeppS
          stardepp Translator @luetage
          last edited by

          @luetage I just decided today to switch from History Clock to History Moon and I am very happy with the result. @luetage thanks for your effort 👍🔥🍀

          Window-stgru 09-10-2021  17_19_54.jpg

          vivaldifeatures.gif

          🍀 Before you ask, use Vivaldi Help (F1)🍀Ambassador🍀Search Engine Collection🍀My Themes🍀Windows11 22H2*Samsung A54 Android13🍀

          luetageL 1 Reply Last reply Reply Quote 1
          • luetageL
            luetage @stardepp
            last edited by

            @stardepp I find it interesting the icon looks so large in your case, this is how it looks on my install:

            Screenshot from 2021-10-09 18-39-15.png

            github ◊ vfm

            stardeppS 1 Reply Last reply Reply Quote 0
            • stardeppS
              stardepp Translator @luetage
              last edited by

              @luetage This is probably because @nomadic made my buttons thinner:

              Window-stgru 09-10-2021  18_41_13.jpg

              🍀 Before you ask, use Vivaldi Help (F1)🍀Ambassador🍀Search Engine Collection🍀My Themes🍀Windows11 22H2*Samsung A54 Android13🍀

              luetageL 2 Replies Last reply Reply Quote 0
              • luetageL
                luetage @stardepp
                last edited by luetage

                @stardepp This code influences urlbar buttons, which makes sense, since these are thick and the panel buttons are already thin by default. Some other code you are running is influencing the size of the history button perhaps. Can’t really tell. Try to load the mod without any other mods running and see what happens.

                github ◊ vfm

                1 Reply Last reply Reply Quote 0
                • luetageL
                  luetage @stardepp
                  last edited by

                  @stardepp Anyway, I updated the code to bring back the svg declaration, which should potentially stop other code messing with it.

                  github ◊ vfm

                  1 Reply Last reply Reply Quote 1
                  • J
                    jocktmpltmea Banned
                    last edited by jocktmpltmea

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • luetageL
                      luetage
                      last edited by

                      I updated OP to bring this mod up to speed and enhance it with the new custom buttons feature. What this means is that it’s possible to load/move the history button in any toolbar and it will consistently show the moon phase. It’s native now. 2 SVG files have to be created to feed the button editor, code is available from OP, but you might as well load all 3 files from Github.

                      github ◊ vfm

                      1 Reply Last reply Reply Quote 3
                      • V
                        valiowk @luetage
                        last edited by

                        @luetage said in Project History Moon:

                        @valiowk We could calculate it anew whenever the mutationobserver triggers, but this happens frequently, basically whenever you open/close the history panel, that’s why I avoided it; percentage changes only about 3 times a day after all. You can trigger a new calculation by removing the history button from the panel and adding it again and this can be done with right‐click menu. Or even simpler: move all tabs to a new window. Or do it automatically by exchanging the observer function with following code:

                            let moonwatch = (mutations, phase) => {
                                mutations.forEach(mutation => {
                                    if (mutation.attributeName === 'class') {
                                        const lc = moon.phase();
                                        historymoon(lc.phase);
                                        document.querySelector('.panelbtn.history').title = `History \n${lc.name} Moon ${lc.progress}`;
                                    }
                                })
                            }
                        

                        You provided me with this code for the old version to recalculate the percentage and moon if the history panel is opened/closed. Would it be possible to provide an updated version for the new code? Thanks!

                        luetageL 1 Reply Last reply Reply Quote 0
                        • luetageL
                          luetage @valiowk
                          last edited by

                          @valiowk The posted version doesn’t contain a mutation observer anymore, so this will not work. But the new Vivaldi icon setup apparently has other problems I’m not sure how to tackle yet. Maybe a new version will mod all history buttons whenever one of them shows up. I have a version in development which does just that, but it doesn’t work reliably. Strange things are going on.

                          github ◊ vfm

                          1 Reply Last reply Reply Quote 0
                          • luetageL
                            luetage
                            last edited by luetage

                            @valiowk So, I updated OP. All history button instances in the UI, including toolbar editor, settings and startpage, will be updated as soon as another instance is added. This should suffice.

                            github ◊ vfm

                            1 Reply Last reply Reply Quote 1
                            • 1
                            • 2
                            • 3
                            • 4
                            • 4 / 4
                            • 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