\n\t\t\tsubmitted
'+(null==(b=Format.prettyDate(thread.created_utc))?"":b)+' by\n\t\t\t
'+(null==(b=thread.author)?"":b)+" \n\t\t",
+;(function(){var e=typeof self=="object"&&self&&self.Object===Object&&self,e=typeof global=="object"&&global&&global.Object===Object&&global||e||Function("return this")(),f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,h=f&&typeof module=="object"&&module&&!module.nodeType&&module,c=e._||{},d={comment:function(a){a||(a={});var b,g="";with(a){a=c.has(comment,"removed");var d=c.has(comment,"deleted"),e="comment comment-"+(a?"removed":d?"deleted":0==comment.depth%2?"even":"odd"),g=g+('\n\n
\n\t\n\t
\n\t\t'+(null==(b="[removed]"===comment.body&&a?"
[likely removed by automoderator]
":Format.parse(comment.body))?"":b)+'\n\t
\n\t\n
\n\n');
+}return g},elasticCommentIDs:function(a){a||(a={});var b;with(a)a=""+('{\n\t"query":{\n\t\t"ids":{\n\t\t\t"values":['+(null==(b=ids.join())?"":b)+']\n\t\t}\n\t},\n\t"_source":[\n\t\t"author","body","created_utc","parent_id","score"\n\t]\n}');return a},elasticComments:function(a){a||(a={});var b;with(a)a=""+('{\n\t"query":{\n\t\t"term":{\n\t\t\t"link_id":'+(null==(b=id)?"":b)+'\n\t\t}\n\t},\n\t"_source":[\n\t\t"author","body","created_utc","parent_id","score"\n\t],\n\t"size":50\n}');return a},elasticSubreddit:function(a){
+a||(a={});var b;with(a)a='{\n\t"query":{\n\t\t"bool":{\n\t\t\t"must":[\n\t\t\t\t',"all"!==c.toLower(subreddit)&&(a+='\n\t\t\t\t{\n\t\t\t\t\t"term":{\n\t\t\t\t\t\t"subreddit":"'+(null==(b=c.toLower(subreddit))?"":b)+'"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'),a+='\n\t\t\t\t{\n\t\t\t\t\t"range":{\n\t\t\t\t\t\t"created_utc":{\n\t\t\t\t\t\t\t"gt":'+(null==(b=time)?"":b)+'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\t"_source":[\n\t\t"author","url","subreddit","link_flair_text","score","title","created_utc","num_comments","domain","permalink","id","thumbnail","thumbnail_height","thumbnail_width"\n\t],\n\t"sort":[\n\t\t{"score":"desc"}\n\t],\n\t"from":'+(null==(b=(page-1)*postPerPage)?"":b)+',\n\t"size":'+(null==(b=postPerPage)?"":b)+"\n}";
+return a},elasticThread:function(a){a||(a={});var b;with(a)a=""+('{\n\t"query":{\n\t\t"term":{\n\t\t\t"id":"'+(null==(b=id)?"":b)+'"\n\t\t}\n\t},\n\t"_source":[\n\t\t"author","created_utc","domain","link_flair_text","num_comments","url","subreddit","score","title","selftext","permalink","thumbnail","thumbnail_height","thumbnail_width"\n\t],\n\t"size":1\n}');return a},search:function(a){with(a||(a={}),a);return'\n\tvar radioInput = function(name, displayNames, values) {\n\t\tvar inputs = "";\n\t\t\n\t\tfor(var i = 0, len = displayNames.length; i < len; i++){\n\t\t\tinputs += \'
\';\n\t\t\tinputs += \' \';\n\t\t\tinputs += \'\'+displayNames[i]+\' \';\n\t\t}\n\t\treturn inputs;\n\t};\n\n\tvar textInput = function(name){\n\t\treturn \'
\'; \n\t};\n\n\tvar label = function(name, display) {\n\t\treturn \'
\'+display+\': \';\n\t};\n\n\tvar inputRow = function(text, input) {\n\t\treturn \'
\'+text+\' \'+input+"
";\n\t};\n\n\tvar selectTime = function() {\n\t\tvar values = ["hour", "12hour", "day", "week", "month", "6month", "year", "all"];\n\t\tvar display = ["past hour", "past 12 hours", "past day", "past week", "past month", "past 6 months", "past year", "all time"];\n\t\tvar html = \'
\';\n\n\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\thtml += \'\'+display[i]+\' \';\n\t\t}\n\n\t\treturn html + " ";\n\t};\n\n\tvar select = function(name, display, values){\n\t\tvar html = \'
\';\n\t\t\n\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\thtml += \'\'+display[i]+\' \';\n\t\t}\n\n\t\treturn html + " ";\n\t};\n\nreturn {\n\tcreateSearch: function(){\n\t\tvar searchBox = document.createElement("div");\n\t\tsearchBox.id = "main-box";\n\t\tsearchBox.className = "search-box";\n\t/*\n\t\tComments:\n\t\ttext\t\t\t(body)\t\tstring\n\t\ttitle \t\t(title)\t\tstring\n\t\tsubreddit\t\t(subreddit)\tstring\n\t\tauthor\t\t(author)\t\tstring\n\t\tover_18\t\t(over_18)\t\tsfw,nsfw,both *\n\t\tlocked\t\t(locked)\t\tbool *\n\t\tbetween\t\t(after/before)\t"date"\n\t\tsort \t\t(sort)\t\tasc,desc\n\t*/\n\t\tvar html = inputRow(\'Im looking for: \', radioInput("thread", ["Thread","Comment"], ["true", "false"]));\t\t\n\t\thtml += inputRow(label("text", "Text"), textInput("text"));\n\t\thtml += inputRow(label("title","Title"), textInput("title"));\n\t\thtml += inputRow(label("subreddit", "Subreddit"), textInput("subreddit"));\n\t\thtml += inputRow(label("author", "Author"), textInput("author"));\n\t\thtml += inputRow("Over 18: ", radioInput("over_18", ["Both","NSFW","SFW"], ["both","nsfw","sfw"]));\n\t\thtml += inputRow("Locked: ", radioInput("locked", ["Both","True", "False"], ["both","true","false"]));\n\t\thtml += inputRow("Removed: ", select("removed", ["Removed and non-removed", "Only removed", "Only deleted"], ["all", "removed", "deleted"]));\n\t\thtml += inputRow("From:", selectTime());\n\t\thtml += inputRow("Sort: ", select("sort", ["Highest score","Lowest score","Newest","Oldest"], ["score_desc","score_asc","time_desc","time_asc"]));\n\t\thtml += \'
\';\n\t\thtml += \'
\';\n\t\tsearchBox.innerHTML = html;\n\t\n\t\tmainDiv.appendChild(searchBox);';
+},subredditInfo:function(a){a||(a={});var b;with(a)a=""+('
\n\ttop post of
/r/'+(null==(b=subreddit)?"":b)+' from:\n\t
\n\t\tpast hour \n\t\tpast 12 hours \n\t\tpast day \n\t\tpast week \n\t\tpast month \n\t\tpast 6 months \n\t\tpast year \n\t\tall time \t\t\n\t \t\t\t\t\n
"},subredditPagination:function(a){a||(a={});var b;with(a){a='"},thread:function(a){a||(a={});var b;with(a){a='
\n',typeof postNr!="undefined"&&(a+='\n\t
'+(null==(b=postNr)?"":b)+" \n"),a+='\n\t
\n\t\t
\n\t\t
'+(null==(b=Format.prettyScore(thread.score))?"":b)+'
\n\t\t
\n\t
\n';
+var d=c.replace(thread.url,"https://www.reddit.com","https://www.removeddit.com");if(c.includes(["self","default","image","nsfw"],thread.thumbnail))a+='\n\t\t
\n';else{var e=.5*c.defaultTo(thread.thumbnail_width,140),f=.5*c.defaultTo(thread.thumbnail_height,140);a+='\t
\n\t\t\t \n\t\t \n';
+}a+='\n\t
\n\n\t\t
'+(null==(b=thread.title)?"":b)+" \n",c.isNil(thread.link_flair_text)||(a+='\n\t\t
'+(null==(b=thread.link_flair_text)?"":b)+" \n"),a+='\t\n\t\t
('+(null==(b=thread.domain)?"":b)+') \n\t\t
\n\t\t\n\t
\n
';
-}return a}};typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(["lodash"],function(t){c=t,t.templates=t.extend(t.templates||{},d)}):g?(c=require("lodash"),(g.exports=d).templates=d,f.templates=d):c&&(c.templates=c.extend(c.templates||{},d))}).call(this);
\ No newline at end of file
+}return a},threadInfo:function(a){a||(a={});var b;with(a)a=""+('\n');return a}};typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(["lodash"],function(t){c=t,t.templates=t.extend(t.templates||{},d)}):h?(c=require("lodash"),(h.exports=d).templates=d,
+f.templates=d):c&&(c.templates=c.extend(c.templates||{},d))}).call(this);
\ No newline at end of file
diff --git a/static/js/search.js b/static/js/search.js
index 27a85be..0c3575f 100644
--- a/static/js/search.js
+++ b/static/js/search.js
@@ -25,17 +25,6 @@ return {
}
};
})();
-/*
-Comments:
-text (body) string
-title (title) string
-subreddit (subreddit) string
-author (author) string
-over_18 (over_18) sfw,nsfw,both *
-locked (locked) bool *
-between (after/before) "date"
-sort (sort) asc,desc
-*/
var Vars = (function(){
var lookup = {};
diff --git a/static/js/subreddit.js b/static/js/subreddit.js
index 1410cbf..f00d428 100644
--- a/static/js/subreddit.js
+++ b/static/js/subreddit.js
@@ -4,10 +4,17 @@ var app = (function(){
return {
loadPage: function() {
Status.loading("Loading subreddit...");
- document.title = Reddit.isAll ? 'all subreddits' : Reddit.subreddit;
+ document.title = Reddit.isAll ? "all subreddits" : Reddit.subreddit;
HTML.main.innerHTML += _.templates.subredditInfo({subreddit: Reddit.subreddit, time: Vars.time});
- Fetch2.get(ElasticSearch.subreddit(Reddit.subreddit, Time.difference(Vars.time), Vars.page), "Could not get removed posts")
+ var urlData = {
+ subreddit: Reddit.subreddit,
+ time: Time.difference(Vars.time),
+ page: Vars.page,
+ postPerPage: Vars.postPerPage
+ };
+
+ Fetch2.get(ElasticSearch.threadURL+_.templates.elasticSubreddit(urlData), "Could not get removed posts")
.then(Fetch2.json)
.then(function(json){
var startPostNr = (Vars.page - 1) * Vars.postPerPage + 1;
@@ -38,30 +45,6 @@ var Vars = (function(){
};
})();
-var ElasticSearch = (function(){
-return {
- subreddit: function(subreddit, time, page){
- var condition = '[{"term":{"subreddit":"'+_.toLower(subreddit)+'"}},'+
- '{"range":{"created_utc":{"gt":'+time+'}}}]';
-
- if(Reddit.isAll) {
- condition = '{"range":{"created_utc":{"gt":'+time+'}}}';
- }
-
- return 'https://elastic.pushshift.io/rs/submissions/_search?source={'+
- '"query":{'+
- '"bool":{'+
- '"must":'+condition+
- '}'+
- '},'+
- '"_source":["author","url","subreddit","link_flair_text","score","title","created_utc","selftext","num_comments","domain","permalink","id","thumbnail","thumbnail_height","thumbnail_width"],'+
- '"sort":[{"score":"desc"}],'+
- '"from":'+(page-1)*Vars.postPerPage+','+
- '"size":'+Vars.postPerPage+'}';
- }
-};
-})();
-
if(isSupported) {
app.loadPage();
}
\ No newline at end of file
diff --git a/static/js/thread.js b/static/js/thread.js
index 4ddddd1..cf8d7b7 100644
--- a/static/js/thread.js
+++ b/static/js/thread.js
@@ -4,282 +4,121 @@ var app = (function(){
return {
loadPage: function() {
// Just fucking crach if the user is retarded
- if(_.isUndefined(Reddit.threadID) || _.isUndefined(Reddit.subreddit)) {
+ if(_.isNil(Reddit.threadID)) {
Status.error("Missing necessary parts of the URL");
return;
}
Status.loading("Loading thread...");
- Reddit.fetchToken()
- .then(function(){
- return Promise.all([
- fetch(URLs.thread, Reddit.init)
- .then(Fetch2.json)
- .then(ThreadHTML.createThread)
- .catch(function(error) {
- return Promise.reject("Could not get thread from Reddit");
- }),
+ var urlData = {id: parseInt(Reddit.threadID, 36)};
- fetch(URLs.pushshiftIDs)
- .then(Fetch2.json)
- .then(_.property("data"))
- .catch(function(error) {
- return Promise.reject("Could not get removed comment IDs");
- }),
- ])
- })
- .then(function(results) {
- var thread = results[0];
- Comments.allIDs = results[1];
-
- Status.loading("Loading comments from reddit...");
- HandleIDs.normal(thread);
- return HandleIDs.morechildren()
- .catch(function(error){
- return Promise.reject("Could not get comments from Reddit (moreChildren)");
- });
- })
- .then(function(){
- return Promise.all(_.map(_.uniq(Comments.countinuethread), function(id) {
- return fetch(URLs.thread+"/_/"+id.split("_")[1], Reddit.init)
- .then(Fetch2.json)
- .catch(function(error){ return Promise.reject("Could not get comments from Reddit (continueThisThread)") })
- }))
- .catch(function(error){
- return Promise.reject("Could not get comments from Reddit (continueThisThread)");
- });
- })
- .then(function(smallerThreads){
- _.forEach(smallerThreads, function(thread){
- HandleIDs.normal(thread);
+ Promise.all([
+ Fetch2.get(ElasticSearch.threadURL+_.templates.elasticThread(urlData), "Could not get thread")
+ .then(Fetch2.json)
+ .then(function(json){
+ HTML.main.innerHTML += _.templates.thread({thread: json.hits.hits[0]._source});
+ return json;
})
- Status.loading("Getting removed comments...");
- HandleIDs.removed();
- ThreadHTML.createCommentInfo(Comments.removed.length);
- return Fetch2.multiple(URLs.format(URLs.pushshiftComments, Comments.removed), null, "data")
- .catch(function(error){
- return Promise.reject("Could not get removed comments");
- });
+ .catch(Fetch2.handleError),
+
+ Fetch2.get(ElasticSearch.commentURL+_.templates.elasticComments(urlData), "Could not get removed comments")
+ .then(Fetch2.json)
+ .catch(Fetch2.handleError)
+ ])
+ .then(function(promises){
+ var commentData = {
+ removedComments: promises[1].hits.total,
+ totalComments: promises[0].hits.hits[0]._source.num_comments
+ };
+
+ HTML.main.innerHTML += _.templates.threadInfo(commentData);
+ Comments.addComments(promises[1]);
+ Status.loading("Getting remaining comments...");
})
- .then(function(removedComments){
- Status.loading("Generating comments...");
- return Comments.generate(removedComments);
+ .then(function getRemainingComments() {
+ return Fetch2.get(ElasticSearch.commentURL+_.templates.elasticCommentIDs({ids:Comments.missing}), "Could not get remaining comments")
+ .then(Fetch2.json)
+ .then(function(json){
+ Comments.addComments(json);
+
+ if(Comments.missing.length !== 0) {
+ getRemainingComments();
+ }
+ });
+ })
+ .then(function(){
+ // Make sure to get the permalink comment (even if it's not related to removed/deleted stuff)
+ if(Comments.isPermalink && !_.includes(Comments.IDs, Comments.getRoot())) {
+ var urlData = {ids: [Comments.to10(Comments.getRoot())]};
+ return Fetch2.get(ElasticSearch.commentURL+_.templates.elasticCommentIDs(urlData), "Could not find the specific comment asked for")
+ .then(Fetch2.json)
+ .then(function(json){
+ console.log(json.hits.hits)
+ Comments.addComments(json);
+ });
+ }
})
.then(function(){
+ HTML.main.innerHTML += '
';
+ Status.loading("Generating comments...");
+ _.forEach(Comments.IDs, function(id){
+ HTML.main.innerHTML += _.templates.comment({id:id, comment:Comments.lookup[id]});
+ });
+ // generate comments
Status.success();
})
- .catch(function(error) {
- if(_.includes(_.toLower(error), "error")) {
- Status.error(error);
- } else {
- Status.error("Error: "+error);
- }
- });
+ .catch(Fetch2.handleError);
}
}})();
-// ------------------------------------------------------------------------------
-// ----------------------- Store and genrates comments --------------------------
-// ------------------------------------------------------------------------------
+
var Comments = (function() {
- var totalComments;
- var lookup = {};
- var toBeCreated = [];
-
- var getParentComments = function(toLookup){
- var newCommentsToLookup = [];
- var commentsToFetch = [];
-
- _.forEach(toLookup, function(id){
- var parentID = lookup[id].parent_id.split("_")[1];
-
- if(parentID === Reddit.threadID) {} // Has no parent (is parent of thread)
- else if(_.includes(Comments.toBeCreated, parentID)) {} // Parent already exists, do nothing
- else if(_.includes(newCommentsToLookup, parentID)) {} // Parent already exists (this iteration)
- else if(_.has(lookup, parentID)) {
- newCommentsToLookup.push(parentID);
- } else{
- commentsToFetch.push(parentID);
- }
-
- Comments.toBeCreated.push(id);
- });
-
- return new Promise(function(resolve, reject){
- if(_.uniq(commentsToFetch).length !== 0) {
- fetch(URLs.singleComments + _.join(_.map(_.uniq(commentsToFetch),function(comments){
- return "t1_" + comments;
- })), Reddit.init)
- .then(Fetch2.json)
- .then(function(json){
- _.forEach(json.data.children, function(comment) {
- lookup[comment.data.id] = comment.data;
- newCommentsToLookup.push(comment.data.id);
- });
- })
- .then(function(){
- resolve();
- });
-
- } else {
- resolve();
- }
- })
- .then(function(){
- if(newCommentsToLookup.length !== 0) {
- return getParentComments(newCommentsToLookup)
- }
- });
-
- };
-
return {
- ids: [], // The comments we found
- morechildren: [],
- countinuethread: [],
-
- allIDs: [], // All the comments that we were suppose to find
- removed: [],
- deleted: [],
- toBeCreated: toBeCreated,
- lookup: lookup,
+ IDs: [], // The comments we found
+ lookup: {},
+ missing: [],
- getTotalComments: function() { return totalComments; },
- setTotalComments: function(total) { totalComments = total; },
-
- getRoot: function() {
- if(Reddit.permalink !== undefined && Reddit.permalink === "") {
- return Reddit.threadID;
- }
-
- if(Reddit.permalink === undefined) {
- return Reddit.threadID;
- }
-
- if(_.has(Comments.lookup, Reddit.permalink)) {
- return Comments.lookup[Reddit.permalink].parent_id.split("_")[1];
- }
- return "";
+ to36: function(id){
+ return parseInt(id).toString(36);
},
- generate: function(removedComments) {
- removedComments.forEach(function(comment){
- if(_.includes(Comments.deleted, comment.id)) {
- comment["deleted"] = true;
- } else {
- comment["removed"] = true;
- }
-
- Comments.lookup[comment.id] = comment;
+
+ to10: function(id){
+ return parseInt(id, 36);
+ },
+
+ addComments: function(json){
+ Comments.IDs = _.union(Comments.IDs, _.map(json.hits.hits, function(comment){
+ return Comments.to36(comment._id);
+ }));
+
+ _.forEach(json.hits.hits, function(comment){
+ comment._source.parent_id = _.isNil(comment._source.parent_id) ? Reddit.threadID : Comments.to36(comment._source.parent_id);
+ Comments.lookup[Comments.to36(comment._id)] = comment._source;
});
+
+ Comments.missing = _.reduce(json.hits.hits, function(array, comment){
+ if(comment._source.parent_id !== Reddit.threadID && !_.includes(Comments.IDs, comment._source.parent_id)) {
+ array.push(Comments.to10(comment._source.parent_id));
+ }
+ return array;
+ }, []);
+ },
- Comments.removed = _.map(removedComments, function(comment){
- return comment.id;
- });
-
- return getParentComments(Comments.removed)
- .then(function(){
- ThreadHTML.createCommentSection();
- ThreadHTML.createComments();
- })
- }
-}})();
-
-
-
-// ------------------------------------------------------------------------------
-// ----------------- Handle comments from different requests --------------------
-// ------------------------------------------------------------------------------
-var HandleIDs = (function(){
- var normal = function(thread){
- return _.flatten(_.map(thread[1].data.children, Extract.normal))
- };
-
- var morechildren = function(){
- return Promise.all(_.map(_.uniq(Comments.morechildren), function(idArray){
- return Fetch2.multiple(URLs.format(URLs.moreChildren, idArray), Reddit.init);
- }))
- .then(function(responseArrays){
- Comments.morechildren.length = 0;
- _.forEach(responseArrays, function(responseArray){
- _.forEach(responseArray, function(response){
- _.forEach(response.jquery[10][3][0], function(comment){
- Extract.normal(comment);
- })
- });
- });
- }).then(function(){
- if(Comments.morechildren.length !== 0) {
- return morechildren();
- }
- });
- };
-
- var removed = function(){
- Comments.removed = _.difference(Comments.allIDs, Comments.ids);
-
- Comments.ids.forEach(function(id){
- if(! _.has(Comments.lookup, id)) {
- return;
- }
-
- if(Comments.lookup[id].body === "[removed]") {
- Comments.removed.push(id);
- } else if (Comments.lookup[id].body === "[deleted]"){
- Comments.removed.push(id);
- Comments.deleted.push(id);
- }
- });
-
- Comments.removed = _.uniq(Comments.removed);
- };
-
- return {
- normal: normal,
- morechildren: morechildren,
- removed: removed
- };
-})();
-
-
-// ------------------------------------------------------------------------------
-// ----------------------- Extract ID from comments -----------------------------
-// ------------------------------------------------------------------------------
-var Extract = (function(){
- var normal = function(comment){
- var data = comment.data;
-
- if(comment.kind == "more") { // "Show more"-comment
- if(data.id === "_") { // = "continue this thread" comment
- Comments.countinuethread.push(data.parent_id);
- } else if(data.children.length < data.count){ // "Load more"-comment (that is missing some of its children)
- Comments.morechildren.push(data.children);
- }
- Comments.ids.push.apply(Comments.ids, data.children);
- } else { // Normal comment
- if(data.replies) {
- data.replies.data.children.forEach(function(child){
- normal(child);
- });
- delete data.replies;
- }
-
- Comments.ids.push(data.id);
- Comments.lookup[data.id] = data;
+ getRoot: function() {
+ if(Reddit.permalink !== undefined && Reddit.permalink !== "") {
+ return Reddit.permalink;
}
- };
- return {
- normal: normal
- };
+ return Reddit.threadID;
+ },
+
+ isPermalink: (Reddit.permalink !== undefined && Reddit.permalink !== "")
+};
})();
-
-// ------------------------------------------------------------------------------
-// ---------------------------- Generating HTML ---------------------------------
-// ------------------------------------------------------------------------------
+/*
var ThreadHTML = (function(){
- var mainDiv = document.getElementById("main");
// I actually haven't found a better way of doing this...
// Imgur has image-links with no indication that they are actually images
var imageHosts = ["i.redd.it", "flickr.com", "i.imgur.com", "imgur.com", "m.imgur.com"];
@@ -330,24 +169,6 @@ var ThreadHTML = (function(){
return data;
};
- var createCommentInfo = function(totalRemovedComments){
- var div = document.createElement("div");
- div.innerHTML = ' \
- \
- \
- ';
-
- mainDiv.appendChild(div);
- };
-
- var createCommentSection = function(){
- var div = document.createElement("div");
- div.id = Comments.getRoot();
- mainDiv.appendChild(div);
- };
-
var createComments = function(){
var commentsToCreate = _.sortBy(_.uniq(Comments.toBeCreated), function(id) {
return Comments.lookup[id].score;
@@ -379,39 +200,7 @@ var ThreadHTML = (function(){
}
};
- var createComment = function(comment){
- var isRemoved = _.has(comment,"removed");
- var isDeleted = _.has(comment,"deleted");
-
- // Sorry
- var commentCss = "comment-" + (isRemoved ? "removed" : (isDeleted ? "deleted" : (comment.depth % 2 == 0 ? "even" : "odd")));
-
- var commentDiv = document.createElement("div");
- commentDiv.id = comment.id;
- commentDiv.className = "comment " + commentCss;
- commentDiv.innerHTML = ' \
- \
-
'+(comment.body === "[removed]" && isRemoved ? "
[likely removed by automoderator]
" : Format.parse(comment.body))+'
\
- ';
-
- return commentDiv;
- };
-
- return {
- createThread: createThread,
- createCommentInfo: createCommentInfo,
- createCommentSection: createCommentSection,
- createComments: createComments
- }
-})();
+})();*/
if(isSupported) {
app.loadPage();
diff --git a/subreddit.html b/subreddit.html
index 3c48eda..a8c6d14 100644
--- a/subreddit.html
+++ b/subreddit.html
@@ -26,7 +26,6 @@
-
[likely removed by automoderator]
" : Format.parse(comment.body)) %> +