Loading app.py +5 −2 Original line number Diff line number Diff line from flask import Flask, render_template, request, Response from flask import Flask, render_template, request, Response, redirect import re, urllib.parse Loading Loading @@ -47,6 +47,8 @@ async def youtube(v, id, site="youtube", json=True): @app.route("/noscript_init.html") async def noscript_init(): if id := request.args.get("d"): return redirect("/noscript_load.html?d=" + id) return """ <!DOCTYPE html> <html> Loading Loading @@ -111,7 +113,8 @@ async def index(): Shows the landing page """ default = request.args.get("q") or "" return render_template("init.html", default=default) default_id = coerce_to_id(default) or "" return render_template("init.html", default=default,default_id=default_id) def parse_changelog(changelog): """ Loading templates/init.html +2 −2 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ button[disabled] { </div> <div id="data"> <noscript> <iframe name="data-frame" src="/noscript_init.html" style="height:100%;width:100%;"> <iframe name="data-frame" src="/noscript_init.html?d={{default_id}}" style="height:100%;width:100%;"> Your browser doesn't support JavaScript or iframes.<br /> This website requires at least one of them. </iframe> Loading Loading
app.py +5 −2 Original line number Diff line number Diff line from flask import Flask, render_template, request, Response from flask import Flask, render_template, request, Response, redirect import re, urllib.parse Loading Loading @@ -47,6 +47,8 @@ async def youtube(v, id, site="youtube", json=True): @app.route("/noscript_init.html") async def noscript_init(): if id := request.args.get("d"): return redirect("/noscript_load.html?d=" + id) return """ <!DOCTYPE html> <html> Loading Loading @@ -111,7 +113,8 @@ async def index(): Shows the landing page """ default = request.args.get("q") or "" return render_template("init.html", default=default) default_id = coerce_to_id(default) or "" return render_template("init.html", default=default,default_id=default_id) def parse_changelog(changelog): """ Loading
templates/init.html +2 −2 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ button[disabled] { </div> <div id="data"> <noscript> <iframe name="data-frame" src="/noscript_init.html" style="height:100%;width:100%;"> <iframe name="data-frame" src="/noscript_init.html?d={{default_id}}" style="height:100%;width:100%;"> Your browser doesn't support JavaScript or iframes.<br /> This website requires at least one of them. </iframe> Loading