mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Added a bookmarklet for page
This commit is contained in:
parent
341c63e3ea
commit
7fee08d31f
5 changed files with 25 additions and 13 deletions
|
|
@ -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/)
|
||||
|
|
|
|||
|
|
@ -21,12 +21,13 @@
|
|||
Display <span title="Removed by mods" style="font-weight:bold; color:#ca302c;">removed</span> and <span title="Deleted by users" style="font-weight:bold; color:#00007D;">deleted</span> comments from Reddit.
|
||||
</p>
|
||||
<p>
|
||||
<b>How to use</b>: go to any Reddit thread and replace the <i>reddit</i> in the URL with <i>removeddit</i>
|
||||
<b>Usage</b>: Drag this bookmarklet <a class="bookmarklet" href="javascript: document.location = document.URL.replace('reddit.com','removeddit.com');">Removeddit</a> to your bookmark bar and use it to get from reddit to removeddit.
|
||||
<br><br>
|
||||
Alternatively you can manually replace the <i>reddit</i> in the URL to <i>removeddit</i>.
|
||||
<br>E.g.
|
||||
<a href="/r/TwoXChromosomes/comments/6z1hch/">
|
||||
https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/
|
||||
</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
Created by <a href="https://github.com/JubbeArt/">Jesper Wrang</a> and uses <a href="https://pushshift.io/">Jason Baumgartner</a> service for getting removed comments.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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 = "<b>"+msg+"</b>"
|
||||
console.error(msg)
|
||||
statusImage.src = errorImg;
|
||||
loadingText.innerHTML = "<b>"+msg+"</b>";
|
||||
console.error(msg);
|
||||
}
|
||||
}})();
|
||||
|
||||
|
|
@ -78,8 +78,7 @@ return {
|
|||
})
|
||||
.catch(function(error) {
|
||||
return Promise.reject("Can't connect to Reddit API (401)");
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
}})();
|
||||
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ var ThreadHTML = (function(){
|
|||
<div class="comment-body">'+(comment.body === "[removed]" && isRemoved ? "<p>[likely removed by automoderator]</p>" : Format.parse(comment.body))+'</div> \
|
||||
<div class="comment-links"> \
|
||||
<a href="/r/'+Reddit.subreddit+'/comments/'+Reddit.threadID+'/_/'+comment.id+'/">permalink</a> \
|
||||
<a href="https://www.reddit.com/r/'+Reddit.subreddit+'/comments/'+Reddit.threadID+'/_/'+comment.id+'/">reddit</a> \
|
||||
</div>';
|
||||
|
||||
return commentDiv;
|
||||
|
|
|
|||
Loading…
Reference in a new issue