diff options
| author | Fuwn <[email protected]> | 2023-07-30 10:12:39 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-30 10:12:39 -0700 |
| commit | 573bfdc52cc54e11a7c67c8f7939c394b3b71ba5 (patch) | |
| tree | b20cb90167fa8d0dba0ebaa53a389125bb7fd237 /src | |
| parent | fix(index): flush on print (diff) | |
| download | old.due.moe-573bfdc52cc54e11a7c67c8f7939c394b3b71ba5.tar.xz old.due.moe-573bfdc52cc54e11a7c67c8f7939c394b3b71ba5.zip | |
feat(manga): disable outbound links by default
Diffstat (limited to 'src')
| -rw-r--r-- | src/due/html/manga.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/due/html/manga.py b/src/due/html/manga.py index dbf6154..a61516c 100644 --- a/src/due/html/manga.py +++ b/src/due/html/manga.py @@ -4,6 +4,7 @@ from due.cache import cache import math import os from .utilities import seen +from flask import request def rerequest(manga, year): @@ -37,6 +38,7 @@ def rerequest(manga, year): def manga_to_html(releasing_outdated_manga, show_missing): current_html = [] ids = [] + disable_outbound_links = request.args.get("outbound_links") is None def process(media): manga = media["media"] @@ -148,7 +150,7 @@ def manga_to_html(releasing_outdated_manga, show_missing): available_link = ( available - if mangadex_id is None + if mangadex_id is None or disable_outbound_links else f'<a href="https://mangadex.org/title/{mangadex_id}">{available}</a>' ) |