Skip to content

Commit

Permalink
Merge pull request #416 from oduwsdl/issue-414
Browse files Browse the repository at this point in the history
Allow replay text form to function without JS, closes #414
  • Loading branch information
machawk1 authored Jul 4, 2018
2 parents d214a33 + b0108ef commit 02cb905
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ipwb/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ def commandDaemon(cmd):
return Response('bad command!')


@app.route('/memento/*/')
def showMementosForURIRs_sansJS():
urir = request.args.get('url')
return redirect('/memento/*/' + urir, code=301)


@app.route('/memento/*/<path:urir>')
def showMementosForURIRs(urir):
urir = getCompleteURI(urir)
Expand Down
4 changes: 2 additions & 2 deletions ipwb/webui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div id="wrapper">
<div>
<h1><img src="./webui/logo.png" alt="ipwb" /></h1>
<form onsubmit="handleSubmit(); return false;">
<input type="text" placeholder="http://example.com" id="url" aria-label="Enter a URI" />
<form onsubmit="handleSubmit(); return false;" method="get" action="/memento/*/">
<input type="text" placeholder="http://example.com" id="url" name="url" aria-label="Enter a URI" />
<input type="submit" value="Search URL in the archive"/>
</form>
</div>
Expand Down

0 comments on commit 02cb905

Please sign in to comment.