From 573bfdc52cc54e11a7c67c8f7939c394b3b71ba5 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 30 Jul 2023 10:12:39 -0700 Subject: feat(manga): disable outbound links by default --- src/due/html/manga.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'{available}' ) -- cgit v1.2.3