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