From dc57f2586003177f247e682b973a378d01501db0 Mon Sep 17 00:00:00 2001 From: Mat Kelly Date: Tue, 25 Sep 2018 10:19:05 -0400 Subject: [PATCH 1/2] Surfaces the titles to the webUI and associates with the respective JSON and links for #178 --- ipwb/assets/webui.js | 3 +++ ipwb/replay.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ipwb/assets/webui.js b/ipwb/assets/webui.js index 4583dea6..c1d1a242 100644 --- a/ipwb/assets/webui.js +++ b/ipwb/assets/webui.js @@ -32,6 +32,9 @@ function addURIListToDOM () { li.setAttribute('data-mime', memento['mime']) li.setAttribute('data-status', memento['status']) + if ('title' in memento) { + li.setAttribute('title', memento['title']) + } const isHTML = memento['mime'].toLowerCase().startsWith('text/html') const isARedirect = memento['status'][0] === '3' diff --git a/ipwb/replay.py b/ipwb/replay.py index 2fceb63e..8f1f3d2d 100755 --- a/ipwb/replay.py +++ b/ipwb/replay.py @@ -947,6 +947,8 @@ def getURIsAndDatetimesInCDXJ(cdxjFilePath=INDEX_FILE): 'mime': jsonFields['mime_type'], 'status': jsonFields['status_code'] } + if 'title' in jsonFields: + mementoAsJSON['title'] = jsonFields['title'] uris[uri].append(mementoAsJSON) From 8b866e6c64d620da6a48479986f5a34d6c446bb8 Mon Sep 17 00:00:00 2001 From: Mat Kelly Date: Tue, 25 Sep 2018 10:45:52 -0400 Subject: [PATCH 2/2] Rm title association with li per #570 --- ipwb/assets/webui.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/ipwb/assets/webui.js b/ipwb/assets/webui.js index c1d1a242..4583dea6 100644 --- a/ipwb/assets/webui.js +++ b/ipwb/assets/webui.js @@ -32,9 +32,6 @@ function addURIListToDOM () { li.setAttribute('data-mime', memento['mime']) li.setAttribute('data-status', memento['status']) - if ('title' in memento) { - li.setAttribute('title', memento['title']) - } const isHTML = memento['mime'].toLowerCase().startsWith('text/html') const isARedirect = memento['status'][0] === '3'