Last active
March 5, 2020 12:12
-
-
Save mtrunkat/63f19449e78875f474ca0e28fbdb658c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pageFunction(context) { | |
var $ = context.jQuery; | |
// All h4 headings containing date - <h4>2016-11-24</h4> | |
var headings = $('.page-content h4'); | |
// All descriptions - <ul><li>General: ...</li>...</ul> | |
var lists = $('.page-content ul'); | |
// Iterate thru all release notes | |
var result = []; | |
for (var i = 0; i < headings.length; i ++) { | |
var date = headings[i].innerText; | |
var description = lists[i].outerHTML; | |
result.push({ | |
title : date + ' Release notes', | |
description : description, | |
link : 'http://apifier.com/release-notes#' + date, | |
guid : date, | |
pubDate : (new Date(date)).toUTCString() | |
}); | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment