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 9 rss_retriever_fetch_feed(feed_settings) 10 .then(data => { 11 rss_feed.innerHTML = data; 12 }) 13 .catch(error => { 14 console.log(error); 15 }); 16 }); 17 18 function rss_retriever_fetch_feed(feed_settings) { 19 return new Promise((resolve, reject) => { 20 jQuery.ajax({ 21 type: "post", 22 dataType: "json", 23 url: rss_retriever.ajax_url, 24 data: {'action':'rss_retriever_ajax_request', 'settings' : feed_settings}, 25 success: function(data) { 26 resolve(data); 27 }, 28 error: function(error) { 29 reject(error); 30 }, 31 }) 32 }) 33 }; 34});
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.