Browse Source

code cleanup

pull/1/head
wes 8 years ago
parent
commit
1b5220ad21
  1. 4
      src/scripts/app.tag
  2. 1
      src/website.py

4
src/scripts/app.tag

@ -129,18 +129,18 @@ document.addEventListener("click", function(event) {
} }
}); });
/* Mostly contains stuff that is preloaded depending on the page accessed initially */
/* Not meant as the ultimate source of truth for everything */
self.state = { self.state = {
"pagenum" : 0, /* the current page of posts in the browse tab */ "pagenum" : 0, /* the current page of posts in the browse tab */
"browsed" : false, /* was a link clicked to a post yet? */ "browsed" : false, /* was a link clicked to a post yet? */
"page" : self.opts.page, "page" : self.opts.page,
"results" : self.decode(self.opts.results), "results" : self.decode(self.opts.results),
"start" : self.opts.start,
"category_filter" : self.decode(self.opts.category_filter), "category_filter" : self.decode(self.opts.category_filter),
"category_tag" : false, /* used if browse page accessed by a category tag */ "category_tag" : false, /* used if browse page accessed by a category tag */
"_id" : self.opts.postid.slice(-hashLength), "_id" : self.opts.postid.slice(-hashLength),
"author" : self.opts.author, "author" : self.opts.author,
"title" : self.opts.title, "title" : self.opts.title,
"loaded" : false,
"initial" : document.getElementsByTagName("noscript")[0].textContent, "initial" : document.getElementsByTagName("noscript")[0].textContent,
"links" : self.decode(self.opts.links), "links" : self.decode(self.opts.links),
"categories" : self.decode(self.opts.categories), "categories" : self.decode(self.opts.categories),

1
src/website.py

@ -69,7 +69,6 @@ def NeverWhere(configfile=None):
return { return {
"quote" : quote, "quote" : quote,
"dumps" : dumps, "dumps" : dumps,
"start" : 0,
"results" : dumps([]), "results" : dumps([]),
"postid" : initial_post["_id"], "postid" : initial_post["_id"],
"postcontent" : postcontent, "postcontent" : postcontent,

Loading…
Cancel
Save