* Add additional content boxes under posts * Fix issue with classic article for under content
19 lines
No EOL
581 B
JavaScript
19 lines
No EOL
581 B
JavaScript
function initializeAdditionalContentBoxes() {
|
|
var el = document.getElementById("additional-content-area");
|
|
if (el) {
|
|
window.fetch('/additional_content_boxes?article_id='+el.dataset.articleId, {
|
|
method: 'GET',
|
|
credentials: 'same-origin'
|
|
}).then(function (response) {
|
|
if (response.status === 200) {
|
|
response.text().then(function(html){
|
|
el.innerHTML = html;
|
|
initializeReadingListIcons();
|
|
initializeAllFollowButts();
|
|
})
|
|
} else {
|
|
// there's currently no errorCb.
|
|
}
|
|
});
|
|
}
|
|
} |