rbb24_expand_comments: Load all comments before expanding them.

This commit is contained in:
tastytea 2019-06-07 18:01:12 +02:00
parent 991e8a0710
commit e04526fd69
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 8 additions and 7 deletions

View File

@ -1,8 +1,8 @@
// ==UserScript==
// @name Expand rbb24.de comments
// @description Expands comments under articles on rbb24.de.
// @description:de Klappt kommentare unter artikeln auf rbb24.de aus.
// @version 2019.06.07.2
// @description Loads all comments under articles on rbb24.de and expands them.
// @description:de Lädt alle kommentare unter artikeln auf rbb24.de und klappt sie aus.
// @version 2019.06.07.3
// @author tastytea
// @copyright 2019, tastytea (https://tastytea.de/)
// @license GPL-3.0-only
@ -18,10 +18,11 @@
function expand_comments()
{
for (let comment of document.getElementsByClassName("manualteasershorttext"))
{
comment.click();
}
document.getElementsByClassName("load_more_comments")[0].click();
setTimeout(function() // Wait for comments to load.
{
document.getElementsByClassName("show_all")[0].click();
}, 1000);
}
expand_comments();