[Make DTF Great Again] UserScript раскрывающий комментарии
Для пользователей десктопной версии без плюса.
// ==UserScript==
// @name DTF Comments Auto Expand Redesign Edition
// @namespace ¯\_(ツ)_/¯
// @match https://dtf.ru/*
// @version 0.1.0
// @author ¯\_(ツ)_/¯
// @description ¯\_(ツ)_/¯
// ==/UserScript==
(() => {
expand_elem__click();
function expand_elem__click() {
let comments_elem = document.querySelector('.comments');
if (!comments_elem) return;
if (!comments_elem.classList.contains('comments--limited')) return;
let expand_elem = document.querySelector('.comments-limit__expand');
if (expand_elem) {
expand_elem.click();
}
}
let html_tag_observer = new MutationObserver((mutationRecords) => {
html_tag_observer.disconnect();
expand_elem__click();
html_tag_observer__start();
});
html_tag_observer__start();
function html_tag_observer__start() {
html_tag_observer.observe(document.querySelector(`body`), {
attributes: false,
childList: true,
subtree: true,
characterData: false
});
}
})();
Как установить:
- Установить плагин для работы UsersScript для браузера: ViolentMonkey, TamperMonkey, GreaseMonkey.
- В настройках плагина добавить этот скрипт копированием и вставкой. Сохранить.
Ты зачем хочешь комитет без денег оставить?
Комментарий недоступен
А минусы?
P.s.: TamperMonkey, FireFox - не работает скрипт.
Нахтиновский без плашки. Может кому надо.