2019-06-07 14:39:39 +02:00
|
|
|
// ==UserScript==
|
2019-06-07 14:49:51 +02:00
|
|
|
// @name Expand rbb24.de comments
|
2019-06-07 18:01:12 +02:00
|
|
|
// @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.
|
2019-06-07 21:15:27 +02:00
|
|
|
// @version 2019.06.07.7
|
2019-06-07 14:49:51 +02:00
|
|
|
// @author tastytea
|
|
|
|
// @copyright 2019, tastytea (https://tastytea.de/)
|
|
|
|
// @license GPL-3.0-only
|
|
|
|
// @namespace tastytea.de
|
|
|
|
// @homepageURL https://schlomp.space/tastytea/userscripts
|
|
|
|
// @supportURL https://schlomp.space/tastytea/userscripts/issues
|
|
|
|
// @downloadURL https://schlomp.space/tastytea/userscripts/raw/branch/main/comment-sections/rbb24_expand_comments.user.js
|
|
|
|
// @grant none
|
2019-06-07 18:07:41 +02:00
|
|
|
// @match https://*.rbb24.de/*
|
2019-06-07 14:49:51 +02:00
|
|
|
// @run-at document-end
|
|
|
|
// @inject-into content
|
2019-06-07 14:39:39 +02:00
|
|
|
// ==/UserScript==
|
|
|
|
|
|
|
|
function expand_comments()
|
|
|
|
{
|
2019-06-07 18:35:33 +02:00
|
|
|
const loadmore = document.getElementsByClassName("load_more_comments");
|
|
|
|
const showall = document.getElementsByClassName("show_all");
|
2019-06-07 18:25:04 +02:00
|
|
|
|
2019-06-07 18:35:33 +02:00
|
|
|
if (loadmore.length > 0)
|
2019-06-07 18:25:04 +02:00
|
|
|
{
|
2019-06-07 18:35:33 +02:00
|
|
|
loadmore[0].click();
|
2019-06-07 18:25:04 +02:00
|
|
|
}
|
|
|
|
|
2019-06-07 18:35:33 +02:00
|
|
|
if (showall.length === 0) // Cancel if we are not on an article page.
|
2019-06-07 18:07:41 +02:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-06-07 18:01:12 +02:00
|
|
|
setTimeout(function() // Wait for comments to load.
|
2019-06-07 21:15:27 +02:00
|
|
|
{ showall[0].click(); }, 10000);
|
2019-06-07 14:39:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
expand_comments();
|