/*
* @title True Reader Mode
* @description Show only main content
* @include http://*
* @license MIT License
* @require
*/
(function() {
function hide(el) {
var parent = el.parentNode;
if (parent) {
var sibling = parent.firstElementChild;
while (sibling) {
if (sibling != el) {
sibling.style.webkitFilter = 'brightness(1)';
}
sibling = sibling.nextElementSibling;
}
hide(parent);
}
}
var el = document.querySelector('*[role="main"]');
if (el) {
hide(el);
} else {
var root = document.body || document.documentElement;
root.style.webkitFilter = 'brightness(1)';
}
})()