1'use strict'; 2 3document.addEventListener('DOMContentLoaded', function() { 4 const rss_feeds = document.querySelectorAll('.wprss_ajax'); 5 6 rss_feeds.forEach(function(rss_feed) { 7 const feed_settings = window[rss_feed.dataset.id]; 8 // console.log(feed_settings); 9 10 rss_retriever_fetch_feed(feed_settings) 11 .then(data => { 12 // display the feed results on the page 13 rss_feed.innerHTML = data; 14 }) 15 .catch(error => { 16 console.log(error); 17 }); 18 }); 19 20 21 function rss_retriever_fetch_feed(feed_settings) { 22 return new Promise((resolve, reject) => { 23 jQuery.ajax({ 24 type: "post", 25 dataType: "json", 26 url: feed_settings.ajax_url, 27 data: { 28 'action':'rss_retriever_ajax_request', 29 'settings' : feed_settings, 30 '_ajax_nonce' : feed_settings.nonce 31 }, 32 success: function(data) { 33 // console.log(data); 34 resolve(data); 35 }, 36 error: function(error) { 37 // console.log(error.responseText); 38 reject(error); 39 }, 40 }) 41 }) 42 }; 43});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.