NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Sme.sk reduce fluff
// @namespace http://tampermonkey.net/
// @version 0.5.1
// @description Rearrange parts of page that are just obtrusive
// @author Gandor
// @license MIT
// @match https://*.sme.sk/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var q=document.querySelector.bind(document);
var qa=document.querySelectorAll.bind(document);
console.log('Removing fluff now!');
var targets=[
q('.header-top'),
q('.title-right-panel'),
q('.right-panel-2'),
qa('.right-panel'),
q('.col-responsive'),
q('.main-nav-sticky'),
q('.js-main-nav-sticky'),
q('.editorial-promo'),
qa('.artemis-ad-position'),
qa('.ad-composer'),
q('.share-box:not(.share-box-bottom)'),
q('.top-panel-wrapper'),
q('.megaboard-wrap'),
q('[id^=admngr]'),
q('.js-notification-window'),
];
targets.forEach(function delNodes(item){
if (item && item.forEach && 'length' in item) {
item.forEach(delNodes);
return;
}
if (item && item.parentElement) {
item.parentElement.removeChild(item);
}
});
[...qa('.left-panel'),...qa('.left-panel-2'),q('.title-left-panel')].forEach((item) => item && (item.style.width = '100%'));
qa('.media-left').forEach((item)=>(item.style.width = '17%'));
qa('.media-body').forEach((item)=>(item.style.width = '78%'));
var mediaLeft = q('.media-left');
if (mediaLeft) {
mediaLeft.style.width = '19%';
}
var bloggerBox = q('.js-deep-container-bloger-card')
if (bloggerBox) {
bloggerBox.style.display="none"
}
qa('span[style]:not([class])').forEach(span=>{span.style.color='#bbb'});
var head=document.head,
styleVal=['.article-published,.perex,span{color: #666} body .poll_vote_option,body div#js-body-wrapper a {color:#37a !important;}.dxse_comment h4{position:relative;display:inline-block}',
'.dxse_comment.reaction_piano{border-color:#ddf;background:#346 !important}#dxse_col2w_diskuswid{width:100% !important}',
'#dxse_col3w_diskus{width:100% !important}#dxse_col3w_diskus .discuss-news-item{display:inline-block} .dxse_comment{background:#344}',
'body div.reaction_selected {border-width: 8px} body,table,body,td,body .site-wrapper, body .content, body .right-box, body .right-box aside,#dxse_mainw_diskus{background-color:#344;background-image:none;color:#bbb;} ',
'body .site-wrapper{ width: 100%; padding: 0 40px; box-sizing:border-box; max-width: 10000px} .middle-panel .article-short-widget-list-title{background:transparent}',
'.wideform-perex-photo-desc{color:#8c8c8c}.extend-article article>p{max-width:none}.article-avizo.fl{clear:left}',
'body .dxse_comtext, .dxse_comtext *{color:#bdb} body .grid-container, body .grid-container .left-box-fluid {width: 100%; margin:0; max-width: 10000px} iframe,.player5 {max-width: 1600px !important; margin: 0 auto} ',
'.media-two-cols .media-image { width: 18% !important } .media-header { width: 78% !important } .anz-container {max-width: initial !important;} #anzu-forum-campaign-1,.artemis-ad-position {display:none !important;}',
'.anz-bg-black-3{background-color: #466} .anz-wrapper{color: #666} .anz-posts__item {padding-bottom:10px} .anz-mb-xxl{margin-bottom:10px} .site-wrapper-super-title .main-panel { width: calc(100% - 680px) !important}'
].join(''),
styleTag=document.createElement('style');
styleTag.type='text/css';
if (styleTag.styleSheet){
styleTag.styleSheet.cssText = styleVal;
} else {
styleTag.appendChild(document.createTextNode(styleVal));
}
head.appendChild(styleTag);
})();