Incognito Button
-
For the people who use Firefox, they might know the possibility to customize address bar. One of the options is to add a button to open a incognito window (I have mine right next to home button). I loved the ideia, so i made (another) mod for this. Hope you enjoy!
/** * * Author: Leonardo Domingues * * Icon Shortcut * Opens incognito window */ setTimeout(function wait() { var adr = document.querySelector(".toolbar-addressbar.toolbar"); if (adr != null) { var iconbar = adr.querySelector("div.toolbar"); var btnS = document.createElement('button'); var svgS = document.createElementNS("http://www.w3.org/2000/svg", "svg"); var pathS1 = document.createElementNS("http://www.w3.org/2000/svg", "path"); var pathS2 = document.createElementNS("http://www.w3.org/2000/svg", "path"); var pathS3 = document.createElementNS("http://www.w3.org/2000/svg", "path"); var pathS4 = document.createElementNS("http://www.w3.org/2000/svg", "path"); var pathS5 = document.createElementNS("http://www.w3.org/2000/svg", "path"); btnS.classList.add('button-toolbar'); btnS.id = 'incognito'; btnS.setAttribute("tabindex", "-1"); svgS.setAttributeNS(null, "width", "18"); svgS.setAttributeNS(null, "height", "21"); svgS.setAttributeNS(null, "viewBox", "0 0 60 73"); btnS.addEventListener('click', function(){ const vivaldi = window.chrome; vivaldi.windows.create({"url": "chrome://newtab", "incognito": true, "state": 'maximized'}); }); iconbar.insertBefore(btnS, iconbar.lastChild) btnS.appendChild(svgS); svgS.appendChild(pathS1); svgS.appendChild(pathS2); svgS.appendChild(pathS3); svgS.appendChild(pathS4); svgS.appendChild(pathS5); pathS1.style = "d: path('M3.5 15.2c.8.6 1.9.3 2.4-.5L7.1 13c4.6-6.7 12.9-10 22-8.8 8.7 1.1 15.8 6.1 18.1 12.7 2 5.7 1.3 10.3.5 14.6-.2 1.1.5 2.1 1.6 2.2 1.1.2 2-.6 2.2-1.6 1.1-5.8 1.3-10.8-.7-16.5C47.4 6 36.6 0 25.4 0 18 0 10.9 2.7 5.8 8.3 4.5 9.7 3.7 10.8 3 12.6c-.6 1.2-.4 2 .5 2.6z'); fill-rule: evenodd"; pathS2.style = "d: path('M29.5 38.6c2.5-2.8 4.4-6 5.8-9.3 1.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3.2 1.4-1.9 1-4.8 2.5-9.8 4.2-.6.2-1.1.8-1.3 1.4-.3 1.4 1 2.8 2.4 2.3 5.3-1.8 8.4-3.5 10.4-4.5 1.5-.7 2.8-.6 3.5-1.7zM46.5 39.4C39 39.4 33 45.5 33 53.1c0 7.5 6 13.6 13.5 13.6S60 60.6 60 53.1c0-7.6-6-13.7-13.5-13.7zM52 53h-4v3h2v2h-2v1h2v2h-2v1h-3v-9h-3v-6h10v6z'); fill-rule: evenodd"; pathS5.style = "d: path('M44 49h6v2h-6zM33.1 69.1c-7.5-3.3-5.5-3.3-12.6 0-.7.3-1.1 1-1.1 1.8 0 1.2 1.1 1.9 2.1 1.9.3 0 .5-.1.8-.2 5.1-2.4 3.3-2.5 9.1 0 .2.1.5.2.8.2 1 0 2-.6 2.1-1.8 0-.8-.5-1.5-1.2-1.9z'); fill-rule: evenodd"; } else { setTimeout(wait, 300); } }, 300);
I reused Vivaldi's private intro icon. It Looks so damm good
-
@masterleo29 I dont know javascript and live alone, so that, I dont need incognito and I dont use it only css, but anyway great work.
-
-