From 7fee08d31f2cabbb81baf49c10bc7f0a1390633e Mon Sep 17 00:00:00 2001 From: Jesper Wrang Date: Sat, 4 Nov 2017 20:56:55 +0100 Subject: [PATCH] Added a bookmarklet for page --- README.md | 2 +- index.html | 5 +++-- static/css/style.css | 11 +++++++++++ static/js/functions.js | 19 +++++++++---------- static/js/thread.js | 1 + 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9ffdfe1..190251e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Usage: go to any reddit thread and change the `reddit` in the URL to `removeddit`. The site will only display the removed comments and thier parents, not the full thread. -This is a done by comparing the comments found from Reddit API and comments from [Jason Baumgartners](https://pushshift.io/) [Pushshift Reddit API](https://github.com/pushshift/api). The frontend is written with a fuckington of promises and some [Lodash](https://lodash.com/). You can use this code however you want, as long as it's non-commercial (and preferably open source). +This is a done by comparing the comments found from Reddit API and comments from [Jason Baumgartners](https://pushshift.io/) [Pushshift Reddit API](https://github.com/pushshift/api). The frontend is written with a fuckton of promises and some [Lodash](https://lodash.com/). You can use this code however you want, as long as it's non-commercial (and preferably open source). # The "I just want to get this shit running" guide Using [Ubuntu 16.04](http://releases.ubuntu.com/16.04/) and [nginx](https://www.nginx.com/resources/wiki/) diff --git a/index.html b/index.html index 2669a4d..1667ae7 100644 --- a/index.html +++ b/index.html @@ -21,12 +21,13 @@ Display removed and deleted comments from Reddit.

- How to use: go to any Reddit thread and replace the reddit in the URL with removeddit + Usage: Drag this bookmarklet Removeddit to your bookmark bar and use it to get from reddit to removeddit. +

+ Alternatively you can manually replace the reddit in the URL to removeddit.
E.g. https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/ -

Created by Jesper Wrang and uses Jason Baumgartner service for getting removed comments. diff --git a/static/css/style.css b/static/css/style.css index 5f4b771..04151fe 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -285,3 +285,14 @@ a:hover { .comment-even { background-color: #161616; } + + +.bookmarklet { + background: #ca302c; + color: white; + padding: 9px; + font-size: large; + font-weight: bold; + display: inline-block; + border-radius: 5px; +} \ No newline at end of file diff --git a/static/js/functions.js b/static/js/functions.js index 13089b0..e2f5e35 100644 --- a/static/js/functions.js +++ b/static/js/functions.js @@ -10,20 +10,20 @@ var Status = (function(){ return { loading: function(msg) { - statusImage.src = loadingImg - loadingText.innerHTML = msg + statusImage.src = loadingImg; + loadingText.innerHTML = msg; }, success: function(msg) { - msg = _.defaultTo(msg, "") - statusImage.src = successImg - loadingText.innerHTML = msg + msg = _.defaultTo(msg, ""); + statusImage.src = successImg; + loadingText.innerHTML = msg; }, error: function(msg) { - statusImage.src = errorImg - loadingText.innerHTML = ""+msg+"" - console.error(msg) + statusImage.src = errorImg; + loadingText.innerHTML = ""+msg+""; + console.error(msg); } }})(); @@ -78,8 +78,7 @@ return { }) .catch(function(error) { return Promise.reject("Can't connect to Reddit API (401)"); - }) - + }); } }})(); diff --git a/static/js/thread.js b/static/js/thread.js index a58bb44..f4b0de0 100644 --- a/static/js/thread.js +++ b/static/js/thread.js @@ -387,6 +387,7 @@ var ThreadHTML = (function(){

'+(comment.body === "[removed]" && isRemoved ? "

[likely removed by automoderator]

" : Format.parse(comment.body))+'
\ '; return commentDiv;