q4.mashfeed
Grab a number of content feeds and mix them together into a single chronological list.- Script link
- q4.mashfeed.1.6.2.min.js
- Source file
- q4.mashfeed.js, line 2
- Requires
Options
- limit number
-
The global maximum number of items, or zero for unlimited.
- Default value
0
- dateFormat string
-
A Moment.js format for dates.
- Default value
MMM D, YYYY h:mm A
- sortAscending boolean
-
Whether to sort items in ascending chronological order.
- Default value
false
- extendTweets boolean
-
Whether to extend the character limit of 140 characters. Note that images may start to appear as well when this is used.
- Default value
false
- parseLinks boolean
-
Whether to parse the title and display links found in it.
For twitter items it will also parse links for tags and usernames.
- Default value
false
- titleLength number
-
The maximum character length of a title, or zero for unlimited.
- Default value
80
- summaryLength number
-
The maximum character length of a summary, or zero for unlimited.
- Default value
500
- feeds Array.<Object>
-
An array of feeds to fetch. Each feed is an object of options
for that feed. Some feed options override global options.
Valid options for all feed types are:
- `name` The name of the feed.
- `type` The type, as listed in `feedTypes` (e.g. `rss`, `youtube`).
- `template` A Mustache template for a single feed item
(overrides the default template).
- `limit` The maximum number of items from this feed.
- `titleLength` The maximum character length of a title.
- `summaryLength` The maximum character length of a summary.
- `fetch` A function overriding the feed type's `fetch` method.
- `getItems` A function overriding the feed type's `getItems` method.
- `parseItem` A function overriding the feed type's `parseItem` method.
See `feedTypes` for type-specific options.
- filter Array.<string>
-
A list of feed names. If this list is not empty,
only the feeds named in the list will be parsed.
- template string
-
A default Mustache template for a single feed item.
Can be overridden for individual feed types.
- Example
'<li>' + '<h2><a href="{{url}}">{{title}}</a></h2>' + '<p>{{date}}</p>' + '{{summary}}' + '</li>'
- loadingClass string
-
A CSS class to add to the widget while data is loading.
This can be used to show and hide elements within the widget.
- loadingMessage string
-
A message or HTML string to display while first loading the widget.
- Default value
Loading...
- notFoundMessage string
-
A message or HTML string to display if no items are found.
- Default value
No items found.
- beforeRenderFeeds function
-
A callback that fires immediately before rendering the feeds.
- Parameters
- event Object
- The event object.
- data Object
- A data object with these properties: - `items` The formatted items to be rendered.
- feedsComplete function
-
A callback that fires after rendering the feeds.
- Parameters
- event Object
- The event object.
- complete function
-
A callback that fires after initializing the widget.
- Parameters
- event Object
- The event object.
Methods
- updateFilter
-
Update the `filter` option and re-render.
- Parameters
- filter Array.<string>
- An array of feed names to display, or an empty array to display all feeds.