1. Nebula Nebula
  2. /
  3. JavaScript
  4.  (Page 10)

facebookConnect()

This is automatically initialized on window load when the Facebook App ID Nebula Option is used. After the asynchronous initialization, fbinit is triggered. Documentation Login Button Graph API User Fields Reference Read More »

visibilityChangeActions()

This function essentially does the following: If a prerender was detected, send an event to Google Analytics and prevent videos from playing. If the page was hidden, trigger nebula_page_hidden, add a class to the body, and pause all videos. Otherwise, if the page has become visible, trigger nebula_page_visible and remove the from the body. Note: This does Read More »

timeAgo()

For reference, if you need this functionality in PHP, use the WordPress function which accepts a timestamp like and returns a string such as "5 hours". https://developer.wordpress.org/reference/functions/human_time_diff/ Read More »