LiveJournal Comments expander

Allows you to automatically expand all comments on the page

目前为 2023-03-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         LiveJournal Comments expander
// @namespace    Whiletruedoend
// @original-script https://gist.github.com/Whiletruedoend
// @original-script https://gf.qytechs.cn/ru/scripts/461690-livejournal-comments-expander
// @version      1.0
// @description  Allows you to automatically expand all comments on the page
// @author       Whiletruedoend
// @match        *.livejournal.com/*
// @match        livejournal.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=livejournal.com
// @grant        none
// @license      GNU GPLv3
// ==/UserScript==

function expandComments(doc){
    var compactedComments = doc.querySelectorAll('[id^="expand_"], [class^=" mdspost-comment-actions__item  mdspost-comment-actions__item--expandchilds   "]');

    for (var i in compactedComments) {
        var elem = compactedComments[i]
        if (elem && elem.lastChild && elem.lastChild.nodeName!="#text"){
            elem.lastChild.click();
        }
    }
}

expandComments(document);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址