Books

Thursday’s Kindle Sales plus the First Three are Free

ul.body {
margin: 0;
text-align: center;
}
ul.body li {
list-style: none !important;
display: inline-block;
}
@media screen and (min-width:768px) {
ul.body img {
width: 15%;
margin: 0 2.5% 35px;
}
}
@media screen and (max-width:767px) {
ul.body img {
width: 45%;
margin: 0 2.5% 25px;
}
}

//If it’s code-free, leave true — if not, set false
var codeFree = false;

var serial = [];

serial.push(“B07K4X1BLG”); //1
serial.push(“B00LGCM1DK”);
serial.push(“B0758D2RSH”);
serial.push(“B07MFG7V97”); //8
serial.push(“B00AKZO1HI”);
serial.push(“B00B85M0GS”);
serial.push(“B005BOXJUI”);
serial.push(“B078T55QPK”);
serial.push(“B002LUYTWC”);
serial.push(“B00XPV61RM”);
serial.push(“B07H7XJDR9”);

var imageLinkPart1 = “https://images.weserv.nl/?url=images.amazon.com/images/P/”;
var imageLinkPart2 = “.02._SCLZZZZZZZ_jpg”;
var buttonLinkPart1 = “https://www.amazon.com/gp/product/”;
var linkPart2 = “/ref=as_li_ss_il?ie=UTF8&linkCode=as2&camp=1789&creative=390957&creativeASIN=”;
var linkPart3 = “&tag=tholstwa-20”;

//This is finding the right blog posts ‘body’ tag. It just looks for one that hasn’t been populated yet.
//This is because there will be multiple blog posts on the page
var parents = document.getElementsByClassName(“body”);

var parent = null;

for (p = 0; p < parents.length; p++) { console.log(parents[p].childNodes.length); if (parents[p].childNodes.length < 2) { parent = parents[p]; break; } } //Creates a li for each book, and adds it to the found tag for (i = 0; i < serial.length; i++) { var li = document.createElement("li"); parent.appendChild(li); var imgHref = document.createElement("a"); imgHref.setAttribute("target", "_blank"); if (codeFree) { imgHref.setAttribute("href", buttonLinkPart1 + serial[i] + linkPart2 + serial[i]); } else { imgHref.setAttribute("href", buttonLinkPart1 + serial[i] + linkPart2 + serial[i] + linkPart3); } var imgA = document.createElement("img"); imgA.setAttribute("src", imageLinkPart1 + serial[i] + imageLinkPart2); imgA.setAttribute("height", "200"); imgA.setAttribute("width", "133"); imgHref.appendChild(imgA); parent.appendChild(imgHref); } The first three books are free, plus sales in Amish, a NonFiction Devotional, Romance, Sci-Fi and Others.