Outils pour utilisateurs

Outils du site


vivaldi

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
vivaldi [2021/01/11 20:47]
behemoth
vivaldi [2021/01/11 21:12] (Version actuelle)
behemoth [Modifications]
Ligne 1: Ligne 1:
 ====== Vivaldi ====== ====== Vivaldi ======
 ===== Modifications ===== ===== Modifications =====
 +[[https://forum.vivaldi.net/category/52/modifications?lang=fr&page=1|Lien forum Vivaldi]]\\
 +
 ==== jdHooks ==== ==== jdHooks ====
 [[https://github.com/justdanpo/VivaldiHooks|Lien GitHub]] [[https://github.com/justdanpo/VivaldiHooks|Lien GitHub]]
Ligne 8: Ligne 10:
 </code> </code>
 ==== Cacher automatiquement la barre d'état dans l'horloge ==== ==== Cacher automatiquement la barre d'état dans l'horloge ====
-[[https://forum.vivaldi.net/post/380804|Lien forum Vivaldi]].+[[https://forum.vivaldi.net/post/380804|Lien forum Vivaldi]].\\
 Le script original provoque un petit problème d'affichage chez moi. Feuille de style modifiée ci-dessous. \\ Le script original provoque un petit problème d'affichage chez moi. Feuille de style modifiée ci-dessous. \\
 Dans les paramètres, il faut sélectionner `Afficher la barre d'état`. Dans les paramètres, il faut sélectionner `Afficher la barre d'état`.
Ligne 31: Ligne 33:
 #panels-container.icons:not(:hover) #switch, #panels-container.switcher:not(:hover) #switch {opacity:0; max-width:8px; height:50px; top: calc(50% - 25px); transition: .1s .9s, opacity 0s 1s !important;} #panels-container.icons:not(:hover) #switch, #panels-container.switcher:not(:hover) #switch {opacity:0; max-width:8px; height:50px; top: calc(50% - 25px); transition: .1s .9s, opacity 0s 1s !important;}
 </code> </code>
 +==== Activer les différents panneaux au survol de la souris ====
 +[[https://forum.vivaldi.net/topic/28413/open-panels-on-mouse-over/61|Lien forum Vivaldi]]
 +<code javascript>
 +// https://forum.vivaldi.net/topic/28413/open-panels-on-mouse-over/22?_=1593504963587
 +function panelMouseOver(autoHide, delay_show, delay_change, delay_hide) {
 +    var buttons = document.getElementById('switch').getElementsByTagName('button');
 +    var show_token = null;
 +    var activeButton = null;
 +
 +    /* Stop timer if mouse exits screen */
 +    document.addEventListener("mouseout", function (e) {
 +        clearTimeout(show_token);
 +    });
 +
 +    /* Do auto-hide if applicable */
 +    if (autoHide) {
 +        var content = document.getElementById("webview-container").onmouseover = function () {
 +            if (!document.getElementById("panels-container").getAttribute('class').includes("icons")) {
 +                clearTimeout(show_token);
 +                setTimeout(function () {
 +                activeButton = activeButton ? activeButton : getActiveButton();
 +                    if (activeButton && (activeButton.getAttribute('class').includes("active"))) {
 +                        activeButton.click();
 +                        activeButton = null;
 +                    }
 +                }, delay_hide);
 +            }
 +        };
 +    }
 +
 +
 +    function activeButtonIndex() {
 +        for (let i = 0; i < buttons.length - 2; i++) {
 +            if (buttons[i].getAttribute('class').includes('active')) {
 +                return i;
 +            }
 +        }
 +        return -1;
 +    }
 +
 +    function getActiveButton() {
 +    if(buttons[activeButtonIndex()]) {
 +    return buttons[activeButtonIndex()];
 +    }
 +    return null;
 +    }
 +
 +    function setActive(index, doDelay) {
 +        clearTimeout(show_token);
 +        var delay = 0;
 +        if (doDelay) {
 +            delay = (activeButtonIndex() < 0) ? delay_show : delay_change;
 +        }
 +        show_token = setTimeout(function () {
 +            var newButton = buttons[index];
 +            if (!newButton.getAttribute('class').includes('active')) {
 +                activeButton = newButton;
 +                activeButton.click();
 +                panel = index;
 +            }
 +        }, delay);
 +    }
 +
 +    function setListeners() {
 +        for (let index = 0; index < buttons.length - 2; index++) {
 +            buttons[index].onmouseover = function () {
 +                setActive(index, true);
 +            };
 +            buttons[index].onmouseout = function () {
 +                clearTimeout(show_token);
 +            };
 +            buttons[index].ondragover = function () {
 +                setActive(index, false);
 +            };
 +        }
 +    }
 +
 +    setListeners();
 +}
 +
 +function addObserver() {
 +    const switchPanel = document.getElementById('switch');
 +    const config = {
 +        childList: true,
 +        subtree: true
 +    };
 +    const callback = function (mutationList, observer) {
 +        for (let mutation of mutationList) {
 +            if (mutation.type === 'childList') {
 +                panelMouseOver(true, 100, 50, 250);
 +            }
 +        }
 +    };
 +    const observer = new MutationObserver(callback);
 +    observer.observe(switchPanel, config);
 +};
 +
 +setTimeout(function wait() {
 +    const browser = document.getElementById('browser');
 +    if (browser) {
 +        panelMouseOver(true, 100, 50, 250);
 +        addObserver();
 +    } else {
 +        setTimeout(wait, 300);
 +    }
 +}, 300);
 +</code>
 +==== Faire clignoter le lien actif ====
 +[[https://forum.vivaldi.net/topic/46807/active-link-marker-css-mod|Lien forum Vivaldi]]
 +<code css>
 +a:active {animation: flk .15s steps(2) 0s infinite;}
 +@keyframes flk {50% {filter: invert(1);}}
 +</code>
 +
  
vivaldi.1610394438.txt.gz · Dernière modification: 2021/01/11 20:47 de behemoth