Alex_Qwerty
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Юзерагент для чтения мобильной версии хабра: Opera/9.80 (Android; Opera Mini/36.2.2254/119.132; U; id) Presto/2.12.423 Version/12.16 Код: div.tm-promo-block img.tm-megapost__image, .tm-votes-meter, .tm-data-icons__icon_views, .tm-data-icons__counter_views, .tm-data-icons__icon_bookmarks, .tm-data-icons__counter_bookmarks, .tm-sharing, .tm-footer, .tm-header, .tm-article__counters, .tm-jobs-list, .tm-image-placeholder_user-blue, .tm-user-info__userpic, html > body > div#layout > div#footer, html > body > div#layout > div#header, .footer__apps, .tm-article-donate, .bottom_buttons_panel {display:none !important} .posts .post .post_inner {padding:10px !important}/**/ .tm-article-title_preview, .tm-article-similar, .tm-article-similar_preview {padding: 0px !important; margin: 0px !important} .tm-article-similar__user-meta {display:block !important; margin: 4px !important} code {white-space: pre-wrap !important; font-family: "Andale Mono" !important}/**/ .tm-page-article__content_narrow, .tm-page_narrow {max-width: 95% !important} .tm-article-comments, .tm-icon-text__icon {display: block !important} .tm-article-title.tm-article-title_preview {display:inline-block !important} .tm-tags, .tm-article-similar__counters {float: right}/**/ .tm-user-card, .tm-article-comments {display: inline-block !important} | Код: // ==UserScript== // @include https://m.habr.com/* // ==/UserScript== (function(opera){ var once = true; var ScriptName = 'habr.com.js'; opera.addEventListener("BeforeExternalScript",function(e){ e.preventDefault(); if (once) once = opera.postError(ScriptName+' block: * '+e.element.src); },false); opera.addEventListener("BeforeScript",function(e){ e.preventDefault(); if (once) once = opera.postError(ScriptName+' block *'); },false); document.addEventListener('DOMContentLoaded',function(){ Array.from(document.querySelectorAll('.spoiler_title')).forEach(function(s){ s.onclick = function(e) { var t = this.parentNode.querySelector('.spoiler_text'); t.style = t.style.display=='block' ? "display:none" : "display:block; opacity:1"; } }); Array.from(document.querySelectorAll('.tm-iframe_temp')).forEach(function(d){ d.innerHTML='<iframe src="'+d.getAttribute('data-src')+'" style="'+d.getAttribute('data-style')+'"></iframe>'; }); },false); })(opera) | |