====== Vivaldi ======
===== Modifications =====
[[https://forum.vivaldi.net/category/52/modifications?lang=fr&page=1|Lien forum Vivaldi]]\\
==== jdHooks ====
[[https://github.com/justdanpo/VivaldiHooks|Lien GitHub]]
=== Installation ===
alias hooks="cd /opt/vivaldi-snapshot/resources/vivaldi && sudo sed -i '/src=\"bundle.js\"/i \ \ \ \ ' browser.html && cd /home/REPERTOIRE_UTILISATEUR/"
==== Cacher automatiquement la barre d'état dans l'horloge ====
[[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. \\
Dans les paramètres, il faut sélectionner `Afficher la barre d'état`.
/* Automate status bar into clock button */
.toolbar-statusbar {position:fixed; bottom:0; right:0; height:24px; width:auto; border-radius: var(--radius) 0 0 0; border:none; box-shadow: 0 0 0 1px var(--colorBorder), 0 2px 6px rgba(0, 0, 0, 0.25);}
.toolbar-statusbar > div:not(.ClockButton) {max-width: 2000px; transition: max-width .25s ease-out 0s, visibility .2s 0s !important;}
.toolbar-statusbar:not(:focus-within):not(:hover) > div:not(.ClockButton) {visibility:hidden; max-width:0; transition: max-width .25s ease-out .4s, visibility .5s !important;}
.toolbar-statusbar .button-toolbar {align-self: auto;}
#browser:not(.fullscreen) .StatusInfo {position:fixed; left:2px; bottom:2px; height: 20px; padding: 2.5px 3px 0; background: var(--colorBgDark); border-radius: var(--radiusHalf); pointer-events: none; max-width: calc(100vw - 60px);}
==== Masquer les panneaux et les activer lors du survol de la souris ====
[[https://forum.vivaldi.net/post/378402|Lien forum Vivaldi]]
#panels {overflow:visible;}
:not(.resizing)#panels-container.overlay .panel-group {transition: width .1s linear !important;}
#panels-container.overlay {width:0 !important;}
#panels-container.right.overlay > .SlideBar--FullHeight.alternate, #panels-container.right.icons:not(.overlay) {margin-left:-34px;}
#panels-container.left.overlay > .SlideBar--FullHeight.alternate, #panels-container.left.icons:not(.overlay) {margin-right: -34px;}
#panels-container #switch {z-index:1; max-width: 34px; height: 100%; visibility:visible !important; top:0;}
#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;}
==== 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]]
// 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);
==== Faire clignoter le lien actif ====
[[https://forum.vivaldi.net/topic/46807/active-link-marker-css-mod|Lien forum Vivaldi]]
a:active {animation: flk .15s steps(2) 0s infinite;}
@keyframes flk {50% {filter: invert(1);}}