mirror of
https://github.com/Pathduck/pathduck.github.io.git
synced 2025-12-29 11:45:20 -05:00
changes to custom+header css
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
.vivaldi .expand-arrow {display: none;}
|
||||
|
||||
/* Skinnier mainbar */
|
||||
.mainbar>.toolbar-mainbar,
|
||||
.mainbar>.toolbar-mainbar .button-toolbar button,
|
||||
.mainbar>.toolbar-mainbar .toolbar-extensions,
|
||||
.mainbar>.toolbar-mainbar .toolbar-extensions .button-toolbar button {
|
||||
.mainbar .toolbar-mainbar,
|
||||
.mainbar .toolbar-mainbar .button-toolbar button,
|
||||
.mainbar .toolbar-mainbar .toolbar-extensions,
|
||||
.mainbar .toolbar-mainbar .toolbar-extensions .button-toolbar button {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
/* Skinnier statusbar */
|
||||
#browser footer .toolbar-statusbar {
|
||||
height: 22px;
|
||||
height: 20px;
|
||||
}
|
||||
#browser footer .toolbar-statusbar button {
|
||||
height: 22px;
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
#browser footer .toolbar-statusbar .override.button-icon {
|
||||
@@ -46,7 +46,8 @@
|
||||
|
||||
/* SiteInfo secure background colour */
|
||||
.SiteInfoButton.secure, .SiteInfoButton.certified {
|
||||
background-color: #004400;
|
||||
background-color: #004400 !important;
|
||||
opacity: unset;
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
}
|
||||
@@ -154,7 +155,6 @@
|
||||
|
||||
/* Tab tooltip hide size+ruler+thumbnail */
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-text hr,
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-text .size,
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-image {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/* Set mainbar/bookmark-bar l/r padding */
|
||||
#browser:not(.tabs-top) .toolbar-mainbar,
|
||||
#browser:not(.tabs-top):not(.address-top):not(.normal) .bookmark-bar {
|
||||
padding-left: 30px;
|
||||
padding-left: 26px;
|
||||
padding-right: 130px;
|
||||
}
|
||||
|
||||
@@ -22,16 +22,21 @@
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/* Make sure buttons are in front */
|
||||
#browser:not(.tabs-top) .vivaldi,
|
||||
#browser:not(.tabs-top) .window-buttongroup {
|
||||
z-index: 10;
|
||||
/* Window buttons size + zindex */
|
||||
#browser:not(.tabs-top) .window-buttongroup,
|
||||
#browser .window-buttongroup button {
|
||||
height: 30px !important;
|
||||
z-index: 10 !important;
|
||||
}
|
||||
|
||||
/* Override V icon size */
|
||||
#browser:not(.tabs-top) .vivaldi {
|
||||
width: 34px;
|
||||
/* V icon size + zindex */
|
||||
#browser:not(.tabs-top) #titlebar .vivaldi {
|
||||
width: 26px;
|
||||
height: 30px;
|
||||
scale: unset;
|
||||
z-index: 10;
|
||||
}
|
||||
/* V icon SVG size */
|
||||
#browser:not(.tabs-top) .vivaldi svg {
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
.speeddial .dial .thumbnail-image {
|
||||
display: block;
|
||||
padding: 1em;
|
||||
/* background: rgba(25,25,25,0.4); */
|
||||
}
|
||||
|
||||
/* Speed Dials thumbnail fit container */
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Backup Search Engines
|
||||
// version 2022.3.3
|
||||
// version 2022.4.0
|
||||
// https://forum.vivaldi.net/post/277594
|
||||
// Adds functionality to backup and restore search engines in
|
||||
// vivaldi://settings/search.
|
||||
|
||||
(function () {
|
||||
(function backupSearchEngines() {
|
||||
function msg(print) {
|
||||
clearTimeout(msgTimeout);
|
||||
if (print === "backup") {
|
||||
@@ -17,67 +17,77 @@
|
||||
msgTimeout = setTimeout(() => (info.innerText = ""), 5000);
|
||||
}
|
||||
|
||||
function lookup(n) {
|
||||
const defaults = [n.defaultSearch, n.defaultPrivate, n.defaultImage];
|
||||
return defaults;
|
||||
}
|
||||
|
||||
function bringingItAllBackHome(remains) {
|
||||
function bringingItAllBackHome(remains, defaultsArray) {
|
||||
vivaldi.searchEngines.getTemplateUrls((engines) => {
|
||||
for (i = 0; i < defaultsArray.length; i++) {
|
||||
const getName = engines.templateUrls.map((e) => e.name);
|
||||
const index = getName.lastIndexOf(defaultsArray[i][0]);
|
||||
const getKeys = engines.templateUrls.map((e) => e.keyword);
|
||||
for (let i = 0; i < defaultsArray.length; i++) {
|
||||
const index = getKeys.lastIndexOf(defaultsArray[i][0]);
|
||||
const id = engines.templateUrls[index].id.toString();
|
||||
const search = defaultsArray[i][1];
|
||||
if (search === 0) {
|
||||
vivaldi.searchEngines.setDefault(
|
||||
vivaldi.searchEngines.DefaultType.DEFAULT_SEARCH,
|
||||
id,
|
||||
);
|
||||
} else if (search === 1) {
|
||||
vivaldi.searchEngines.setDefault(
|
||||
vivaldi.searchEngines.DefaultType.DEFAULT_PRIVATE,
|
||||
id,
|
||||
);
|
||||
} else {
|
||||
vivaldi.searchEngines.setDefault(
|
||||
vivaldi.searchEngines.DefaultType.DEFAULT_IMAGE,
|
||||
id,
|
||||
);
|
||||
}
|
||||
const ds = defaultsArray[i][1];
|
||||
vivaldi.searchEngines.setDefault(ds, id);
|
||||
}
|
||||
remains.forEach((remove) => {
|
||||
vivaldi.searchEngines.removeTemplateUrl(remove);
|
||||
});
|
||||
defaultsArray = [];
|
||||
msg("restore");
|
||||
});
|
||||
}
|
||||
|
||||
function exec(collection) {
|
||||
vivaldi.searchEngines.getTemplateUrls((engines) => {
|
||||
const oldDefaults = lookup(engines);
|
||||
const newDefaults = lookup(collection);
|
||||
const oldDefaults = [
|
||||
engines.defaultImage,
|
||||
engines.defaultPrivate,
|
||||
engines.defaultSearch,
|
||||
];
|
||||
const newDefaults = [
|
||||
collection.defaultImage,
|
||||
collection.defaultPrivate,
|
||||
collection.defaultSearch,
|
||||
collection.defaultSearchField,
|
||||
collection.defaultSearchFieldPrivate,
|
||||
collection.defaultSpeeddials,
|
||||
collection.defaultSpeeddialsPrivate,
|
||||
];
|
||||
engines.templateUrls.forEach((engine) => {
|
||||
if (oldDefaults.indexOf(engine.id) === -1) {
|
||||
vivaldi.searchEngines.removeTemplateUrl(engine.id);
|
||||
}
|
||||
});
|
||||
console.info("restoring search engines...");
|
||||
const defaultsArray = [];
|
||||
collection.templateUrls.forEach((collect) => {
|
||||
vivaldi.searchEngines.addTemplateUrl(collect, () => {
|
||||
console.info(` \u2022 ${collect.name}`);
|
||||
if (newDefaults.indexOf(collect.id) > -1) {
|
||||
const indeces = newDefaults
|
||||
.map((e, i) => (e === collect.id ? i : ""))
|
||||
.filter(String);
|
||||
indeces.forEach((index) => {
|
||||
const tunnel = [collect.name, index];
|
||||
let ds;
|
||||
if (index === 0) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_IMAGE;
|
||||
} else if (index === 1) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_PRIVATE;
|
||||
} else if (index === 2) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_SEARCH;
|
||||
} else if (index === 3) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_SEARCH_FIELD;
|
||||
} else if (index === 4) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_SEARCH_FIELD_PRIVATE;
|
||||
} else if (index === 5) {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_SPEEDDIALS;
|
||||
} else {
|
||||
ds = vivaldi.searchEngines.DefaultType.DEFAULT_SPEEDDIALS_PRIVATE;
|
||||
}
|
||||
const tunnel = [collect.keyword, ds];
|
||||
defaultsArray.push(tunnel);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
const remains = [...new Set(oldDefaults)];
|
||||
bringingItAllBackHome(remains);
|
||||
bringingItAllBackHome(remains, defaultsArray);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -111,14 +121,14 @@
|
||||
|
||||
function backup() {
|
||||
vivaldi.searchEngines.getTemplateUrls((engines) => {
|
||||
const backupCode = JSON.stringify(engines);
|
||||
const backupCode = JSON.stringify(engines, null, 2);
|
||||
navigator.clipboard.writeText(backupCode);
|
||||
msg("backup");
|
||||
});
|
||||
}
|
||||
|
||||
function ui() {
|
||||
const check = document.getElementById("vm-backup");
|
||||
const check = document.getElementById("vm-bse-backup");
|
||||
if (!check) {
|
||||
const place = document.querySelector(
|
||||
".setting-section > div > .setting-group.unlimited > .setting-single"
|
||||
@@ -126,49 +136,48 @@
|
||||
const btn = document.createElement("input");
|
||||
btn.setAttribute("type", "button");
|
||||
btn.setAttribute("value", "Backup");
|
||||
btn.id = "vm-backup";
|
||||
btn.classList.add("vm-bse-backup");
|
||||
place.insertBefore(btn, place.lastChild);
|
||||
btn.addEventListener("click", backup);
|
||||
const input = document.createElement("input");
|
||||
input.setAttribute("type", "text");
|
||||
input.setAttribute("placeholder", "Restore Backup");
|
||||
input.id = "vm-restore";
|
||||
input.classList.add("vm-bse-restore");
|
||||
place.insertBefore(input, place.lastChild);
|
||||
input.addEventListener("paste", restore);
|
||||
input.addEventListener("drop", restore);
|
||||
info = document.createElement("span");
|
||||
info.id = "vm-msg";
|
||||
info.classList.add("vm-bse-msg");
|
||||
place.insertBefore(info, place.lastChild);
|
||||
}
|
||||
}
|
||||
|
||||
const css = `
|
||||
#vm-restore {
|
||||
.vm-bse-restore {
|
||||
width: 130px;
|
||||
margin-left: 6px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
#vm-restore::-webkit-input-placeholder {
|
||||
.vm-bse-restore::-webkit-input-placeholder {
|
||||
opacity: 1;
|
||||
color: var(--colorHighlightBg);
|
||||
text-align: center;
|
||||
}
|
||||
#vm-msg {
|
||||
.vm-bse-msg {
|
||||
margin-left: 12px;
|
||||
}
|
||||
`;
|
||||
|
||||
let msgTimeout;
|
||||
let defaultsArray = [];
|
||||
const settingsUrl =
|
||||
"chrome-extension://mpognobbkildjkofajifpdfhcoklimli/components/settings/settings.html?path=";
|
||||
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
if (changeInfo.url === `${settingsUrl}search`) {
|
||||
setTimeout(ui, 100);
|
||||
const check = document.getElementById("vm-engines");
|
||||
const check = document.getElementById("vm-bse-css");
|
||||
if (!check) {
|
||||
const style = document.createElement("style");
|
||||
style.id = "vm-engines";
|
||||
style.id = "vm-bse-css";
|
||||
style.innerHTML = css;
|
||||
document.getElementsByTagName("head")[0].appendChild(style);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
/* Skinnier statusbar */
|
||||
#browser footer .toolbar-statusbar {
|
||||
height: 22px;
|
||||
height: 20px;
|
||||
}
|
||||
#browser footer .toolbar-statusbar button {
|
||||
height: 22px;
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
#browser footer .toolbar-statusbar .override.button-icon {
|
||||
@@ -152,9 +152,11 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Tab tooltip hide image */
|
||||
#vivaldi-tooltip .tooltip .tooltip-item .thumbnail-image {
|
||||
display: none;
|
||||
/* Tab tooltip hide size+ruler+thumbnail */
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-text hr,
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-text .size,
|
||||
#vivaldi-tooltip .tooltip-item .thumbnail-image {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Tab tooltip size */
|
||||
|
||||
Reference in New Issue
Block a user