diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-01-17 00:15:04 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-01-17 00:15:04 +0100 |
commit | 5a41103e7d7f67e001926ab4741cfec0bcbe8526 (patch) | |
tree | 9284c1f61f8877358c26705ae688b930907c0898 /src/plugins | |
parent | 6d4fba24f82ddc8c96f9296bc1319826c29e1e34 (diff) |
Draw header title and background over body
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Fourchan.cpp | 9 | ||||
-rw-r--r-- | src/plugins/Manganelo.cpp | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp index 438dc3b..212e197 100644 --- a/src/plugins/Fourchan.cpp +++ b/src/plugins/Fourchan.cpp @@ -137,8 +137,13 @@ namespace QuickMedia { static void extract_comment_pieces(const char *html_source, size_t size, CommentPieceCallback callback) { TidyDoc doc = tidyCreate(); - for(int i = 0; i < N_TIDY_OPTIONS; ++i) - tidyOptSetBool(doc, (TidyOptionId)i, no); + TidyIterator it_opt = tidyGetOptionList(doc); + while (it_opt) { + TidyOption opt = tidyGetNextOption(doc, &it_opt); + if (tidyOptGetType(opt) == TidyBoolean) + tidyOptSetBool(doc, tidyOptGetId(opt), no); + } + tidyOptSetInt(doc, TidyWrapLen, 0); if(tidyParseString(doc, html_source) < 0) { CommentPiece comment_piece; comment_piece.type = CommentPiece::Type::TEXT; diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp index 2b69e62..425bf4d 100644 --- a/src/plugins/Manganelo.cpp +++ b/src/plugins/Manganelo.cpp @@ -119,7 +119,7 @@ namespace QuickMedia { if(result != 0) goto cleanup; - result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='container-chapter-reader']//img", + result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='container-chapter-reader']/img", [](QuickMediaHtmlNode *node, void *userdata) { auto *urls = (std::vector<std::string>*)userdata; const char *src = quickmedia_html_node_get_attribute_value(node, "src"); |