//Transaclub.nl/forum verbeteraar VERSIE 1
//past vormgeving wat subtieler aan
//om onderwerpen die jij belangrijk vindt duidelijker te presenteren
//om personen wiens geouwehoer je minder belangrijk vindt te 'dimmen'
//take care, newStyle must be valid CSS
// *= is the CSS 'contains' selector
newStyle=`
/* Style the ongelezen/reacties list die jij belangrijk of niet vindt */
[board*="Techniek"],[board*="lid"],[board*="Transalp"]{
font-weight:bold;
}
[board*="Varadero"],[board*="Twin"]{
opacity:0.7;
}
/* Post header signature mogen wat subtieler, lezen we toch nooit */
.postcount,,keyinfo .smalltext,.reportlinks,.signature {opacity: 0.6;}
/* set minimum height so message area is app. same height as Avatar */
.inner {min-height: 12em;}
.reportlinks:hover,.signature:hover{opacity: 1;}
/* large quoted text (we're getting old and have problems with small fonts) */
.bbc_standard_quote.bbc_standard_quote {
font-size: 100%;border-top: unset;border-bottom: unset;margin-left: 2em;
}
/* persons I prefer not to read */
[poster*="Danny E"]{
max-height: 6em;
overflow: hidden;
opacity: 0.7;
border:1px dashed red;
}
[poster]:hover{
max-height:unset;
opacity:1;
}
}
`;//end style.innerHTML
/** Javascript is required to prepare the page for the above Styles
* Edit with care
**/
let proces=(selector,parent,attr)=>
//find selector
//take its textcontent
//stick it as attr on a parent HTML element
//now CSS Styles can target all its child content
[...document.querySelectorAll(selector)].forEach(el=>{
try{
el.closest(parent).setAttribute(attr,el.textContent.trim())
}catch(e){//a selector might not be on this HTML page
console.warn(selector,parent,attr,el);
}
});
proces('em','tr','board');
proces('.poster>H4','.post_wrapper','poster');
//add the newStyle to the page so it gets applied
let style=document.body.appendChild(document.createElement('STYLE'));
style.innerHTML = newStyle;
//MIT license
Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.