Guide to Functions - danberkeland/personalReddit GitHub Wiki

Guide to Functions

  • On Load
    • Fetches my subreddit subscriptions and builds nav, then builds post feed based on my home feed.
  • Search
    • Searches titles for input and then filters list by those titles.
  • Karma and arrows
    • Sends upvotes or downvotes to Reddit. Number indicates current karma points pulled from Reddit.
  • Time Posted
    • Grabs post time from Reddit and then calculates, based on current time, how old the post is.
  • Comment Count
    • Displays number of comments on post pulled from Reddit.
    • onClick - expands and displays comments.
    • On expansion grabs comment time from Reddit and then calculates, based on current time, how old the post is.
  • Title of Reddit Post
    • onClick expands post to include full body.
    • Back to List Button returns to previous listed view
  • Subreddit and Icon
    • onClick creates to post feed based on chosen subreddit