Update layout BPC GitLab bio

master
magnolia1234 2022-03-17 19:38:54 +01:00
parent bf211d8aa4
commit 1f02824611
4 changed files with 33 additions and 5 deletions

View File

@ -7,6 +7,7 @@ Fix Algemeen Dagblad (regional; refresh)
Fix Folha de S. Paulo
Fix Funke Mediengruppe (opt-in to custom sites for unlisted)
Fix Lequipe.fr (refresh)
Update layout BPC GitLab bio
* v2.6.0.0 (2022-03-13)
Add Connaissance des Arts (France)

View File

@ -58,7 +58,32 @@ else if (matchDomain('nyteknik.se')) {
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
}, 2000); // Delay (in milliseconds)
}, 2000);
}
else if (matchDomain('gitlab.com')) {
window.setTimeout(function () {
let bio = document.querySelector('div.profile-user-bio');
if (bio) {
let split = bio.innerText.split(/(https:[\w\-/.]+)|\|/g).filter(x => x && x.trim());
bio.innerText = '';
for (let part of split) {
let elem;
if (part.startsWith('https')) {
elem = document.createElement('a');
elem.innerText = part;
elem.href = part;
elem.appendChild(document.createElement('br'));
} else {
elem = document.createElement('b');
elem.appendChild(document.createTextNode(part));
if (!part.includes(':'))
elem.appendChild(document.createElement('br'));
}
bio.appendChild(elem);
}
}
}, 1000);
}
function matchDomain(domains, hostname) {

View File

@ -26,7 +26,8 @@
"matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nyteknik.se/*"
"*://*.nyteknik.se/*",
"*://*.gitlab.com/magnolia1234"
],
"run_at": "document_start",
"js": ["contentScript_once.js"]
@ -40,5 +41,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.6.0.3"
"version": "2.6.0.4"
}

View File

@ -29,7 +29,8 @@
"matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nyteknik.se/*"
"*://*.nyteknik.se/*",
"*://*.gitlab.com/magnolia1234"
],
"run_at": "document_start",
"js": ["contentScript_once.js"]
@ -626,5 +627,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.6.0.3"
"version": "2.6.0.4"
}