• 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. Modifications
    5. History Clock (keeping easter egg alive)

    History Clock (keeping easter egg alive)

    Modifications
    javascript modding archived
    8
    81
    8.1k
    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.
    • luetage
      L
      luetage Supporters Soprano
      last edited by luetage

      This is a quick mod to keep the history clock working past 1st April. @Hadden89 has just posted a feature request for it, so maybe the Vivaldi devs will reintroduce the feature in a future version of the browser anyway, but in the meantime…

      /* History Clock */
      
      function historyClock() {
          const clock = document.querySelector('#switch button.history');
          var time = new Date();
          var hours = time.getHours();
          var minutes = time.getMinutes();
          if (clockSetInt === true) {
              if (clockRelax !== -1 && clockRelax !== minutes) {
                  clearInterval(clockTimer)
                  setInterval(historyClock, 60000);
                  clockSetInt = false;
              }
              clockRelax = minutes;
          }
          if (clock) {
              clock.style = '--timeHourRotation: rotate(' + Math.floor(hours*30+minutes/2) + 'deg); --timeMinuteRotation: rotate(' + minutes*6 + 'deg)';
          }
      };
      
      var clockSetInt = true;
      var clockRelax = -1;
      var clockTimer = setInterval(historyClock, 1000);
      
      

      github ◊ vfm

      ?
      stardepp
      S
      2 Replies Last reply
      Reply Quote 10
      • stardepp
        S
        stardepp Translator Ambassador
        last edited by

        Where do you write this script into, in which folder?

        🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

        1 Reply Last reply Reply Quote 0
        • stardepp
          S
          stardepp Translator Ambassador
          last edited by

          @Gwen-Dragon That is very complicated.

          🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

          1 Reply Last reply Reply Quote 0
          • Hadden89
            H
            Hadden89
            last edited by

            Nice, switched to 1/5/19 and it works.
            Tomorrow I'll add the link to the feature request 😛

            Vivaldi Stable+Snap | Patience Is The Key To Get The Vivaldi Spree | Unsupported Extensions | Github | windows 11 | Manjaro KDE | Q4OS Trinity | Android 13

            1 Reply Last reply Reply Quote 2
            • stardepp
              S
              stardepp Translator Ambassador
              last edited by stardepp

              @Gwen-Dragon I can not save '<link ' stylesheet 'href =' style / custom.css '/>' in 'browser.html', I'm denied, I opened 'browser.html' in Word.

              🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

              luetage
              L
              1 Reply Last reply
              Reply Quote 0
              • luetage
                L
                luetage Supporters Soprano @stardepp
                last edited by

                @stardepp You need to use a text editor, not a word processor to edit the file. I wanted to write german instructions for modding Vivaldi anyway… keep hanging in there.

                github ◊ vfm

                stardepp
                S
                1 Reply Last reply
                Reply Quote 3
                • stardepp
                  S
                  stardepp Translator Ambassador @luetage
                  last edited by

                  @luetage Even with the editor will save me the store.

                  🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

                  1 Reply Last reply Reply Quote 0
                  • stardepp
                    S
                    stardepp Translator Ambassador
                    last edited by

                    Now it worked, I activated my admin rights and now everything went fine.

                    🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

                    1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @luetage
                      last edited by

                      @luetage said:

                      You can test this today (1st April) by changing your system clock to another date.

                      Or you can keep it without this mod by changing your system clock every day... 😬

                      tam710562
                      T
                      1 Reply Last reply
                      Reply Quote 4
                      • tam710562
                        T
                        tam710562 @A Former User
                        last edited by

                        @potmeklecbohdan Or you can stop the system clock 🙂

                        ?
                        1 Reply Last reply
                        Reply Quote 1
                        • ?
                          A Former User @tam710562
                          last edited by

                          @tam710562

                          1. Then the clock would be useless
                          2. Is that possible? How?
                          1 Reply Last reply Reply Quote 0
                          • luetage
                            L
                            luetage Supporters Soprano
                            last edited by

                            Everyone here posted a day ago, including this comment 🤔

                            github ◊ vfm

                            1 Reply Last reply Reply Quote 1
                            • luetage
                              L
                              luetage Supporters Soprano
                              last edited by luetage

                              Ok, it's 2nd April and the clock works. I did some improvements since initially posting, the code should be a bit more efficient. Additionally I tried to future proof it: Should Vivaldi decide to remove the feature completely in an upcoming version (which wouldn't be surprising), this mod should still continue working.

                              Also an interesting unrelated addendum, the standard watch hands ( "uneasteregged" 😛 ) don't show a valid time – one more reason to run the mod…

                              github ◊ vfm

                              1 Reply Last reply Reply Quote 3
                              • stardepp
                                S
                                stardepp Translator Ambassador @luetage
                                last edited by

                                @luetage Should this script be copied into 'css' of this folder?

                                C:\Program Files (x86)\Vivaldi\Application\2.5.1503.4\resources\vivaldi

                                🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

                                Hadden89
                                H
                                Folgore101
                                F
                                2 Replies Last reply
                                Reply Quote 0
                                • Hadden89
                                  H
                                  Hadden89 @stardepp
                                  last edited by Hadden89

                                  @stardepp
                                  This actually depends on where the script points in browser.html

                                  1# Goes in \vivaldi

                                  <script src="thismod.js"></script>
                                  

                                  2# Goes in \vivaldi\style

                                  <script src="style/thismod.js"></script>
                                  

                                  As you followed modding guide, you probably want to use #1.

                                  Vivaldi Stable+Snap | Patience Is The Key To Get The Vivaldi Spree | Unsupported Extensions | Github | windows 11 | Manjaro KDE | Q4OS Trinity | Android 13

                                  1 Reply Last reply Reply Quote 1
                                  • Folgore101
                                    F
                                    Folgore101 Patron Translator @stardepp
                                    last edited by

                                    @stardepp It's not a "CSS" but a JS. You have to create a file called "history_clock.js", with inside the code written by @luetage, and copy it to C:\Program Files (x86)\Vivaldi\Application\2.5.1503.4\resources\vivaldi
                                    Also in this folder edit the file "browser.html" adding this line: <script src="history_clock.js"></script> next
                                    <script src="bundle.js"></script>

                                    "Non è tanto chi sei quanto quello che fai che ti qualifica" - "Il coraggio non è la mancanza di paura ma bensì la consapevolezza che qualcosa sia più importante della paura stessa" - Vivaldi il browser che si adatta all'utente

                                    Hadden89
                                    H
                                    stardepp
                                    S
                                    2 Replies Last reply
                                    Reply Quote 0
                                    • Hadden89
                                      H
                                      Hadden89 @Folgore101
                                      last edited by

                                      @Folgore101 yeah, I read again the guide and it place js mods out the style folder whereas I always placed everything in style folder.

                                      Vivaldi Stable+Snap | Patience Is The Key To Get The Vivaldi Spree | Unsupported Extensions | Github | windows 11 | Manjaro KDE | Q4OS Trinity | Android 13

                                      Folgore101
                                      F
                                      tam710562
                                      T
                                      2 Replies Last reply
                                      Reply Quote 0
                                      • Folgore101
                                        F
                                        Folgore101 Patron Translator @Hadden89
                                        last edited by

                                        @Hadden89 Really!, you're the veteran, i'm just starting out with the mods. :smiling_face_with_open_mouth_cold_sweat:

                                        "Non è tanto chi sei quanto quello che fai che ti qualifica" - "Il coraggio non è la mancanza di paura ma bensì la consapevolezza che qualcosa sia più importante della paura stessa" - Vivaldi il browser che si adatta all'utente

                                        1 Reply Last reply Reply Quote 0
                                        • stardepp
                                          S
                                          stardepp Translator Ambassador @Folgore101
                                          last edited by

                                          @Folgore101 Yes, I understood that now, but when saving the modified 'browser.html' file comes this error, although I am an administrator.

                                          0_1554227035898_2019-04-02 19_36_01-browser.html - Editor.jpg

                                          🍀 Work spaces changed my work flow🍀Search Engine Collection🍀My Themes🍀Windows11 24H2🍀Motorola Edge 60 Fusion * Android 15🍀

                                          Hadden89
                                          H
                                          Folgore101
                                          F
                                          2 Replies Last reply
                                          Reply Quote 0
                                          • Hadden89
                                            H
                                            Hadden89 @stardepp
                                            last edited by Hadden89

                                            @stardepp Try to make a copy of browser.html in a "neutral path" like c:\browser.html (windows can be annoying with program files folder), do the need edit there and then replace the file moving it back in vivaldi folder (ovewriting).
                                            Even with admin rights, sometimes windows decide you can't save the file.
                                            Or you could try to open the editor as administrator and then the file. (This don't always works).

                                            Vivaldi Stable+Snap | Patience Is The Key To Get The Vivaldi Spree | Unsupported Extensions | Github | windows 11 | Manjaro KDE | Q4OS Trinity | Android 13

                                            stardepp
                                            S
                                            1 Reply Last reply
                                            Reply Quote 3
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 1 / 5
                                            • 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