async function fetchAndDisplayBooks() { try { let books = [{"title":"Old Man's War","shorttitle":"Old Man's War","authorstring":"John Scalzi","description":"John Perry did two things on his 75th birthday. First he visited his wife's grave. Then he joined the army. \n\nThe good news is that humanity finally made it into interstellar space. The bad news is that planets fit to live on are scarce-and aliens willing to fight for them are common. The universe, it turns out, is a hostile place. \n\nSo: we fight. To defend Earth (a target for our new enemies, should we let them get close enough) and to stake our own claim to planetary real estate. Far from Earth, the war has gone on for decades: brutal, bloody, unyielding. \n\nEarth itself is a backwater. The bulk of humanity's resources are in the hands of the Colonial Defense Force, which shields the home planet from too much knowledge of the situation. What's known to everybody is that when you reach retirement age, you can join the CDF. They don't want young people; they want people who carry the knowledge and skills of decades of living. You'll be taken off Earth and never allowed to return. You'll serve your time at the front. And if you survive, you'll be given a generous homestead stake of your own, on one of our hard-won colony planets. \n\nJohn Perry is taking that deal. He has only the vaguest idea what to expect. Because the actual fight, light-years from home, is far, far harder than he can imagine-and what he will become is far stranger. \n\nOld Man's War Series\n#1 Old Man’s War\n#2 The Ghost Brigades\n#3 The Last Colony\n#4 Zoe’s Tale\n#5 The Human Division\n#6 The End of All Things \nShort fiction: “After the Coup” \n\nOther Tor Books\nThe Android’s Dream\nAgent to the Stars\nYour Hate Mail Will Be Graded\nFuzzy Nation\nRedshirts\nLock In\nThe Collapsing Empire (forthcoming) \n\nAt the Publisher's request, this title is being sold without Digital Rights Management Software (DRM) applied.","descriptionHtml":"

John Perry did two things on his 75th birthday. First he visited his wife's grave. Then he joined the army.

The good news is that humanity finally made it into interstellar space. The bad news is that planets fit to live on are scarce-and aliens willing to fight for them are common. The universe, it turns out, is a hostile place.

So: we fight. To defend Earth (a target for our new enemies, should we let them get close enough) and to stake our own claim to planetary real estate. Far from Earth, the war has gone on for decades: brutal, bloody, unyielding.

Earth itself is a backwater. The bulk of humanity's resources are in the hands of the Colonial Defense Force, which shields the home planet from too much knowledge of the situation. What's known to everybody is that when you reach retirement age, you can join the CDF. They don't want young people; they want people who carry the knowledge and skills of decades of living. You'll be taken off Earth and never allowed to return. You'll serve your time at the front. And if you survive, you'll be given a generous homestead stake of your own, on one of our hard-won colony planets.

John Perry is taking that deal. He has only the vaguest idea what to expect. Because the actual fight, light-years from home, is far, far harder than he can imagine-and what he will become is far stranger.

Old Man's War Series
#1 Old Man’s War
#2 The Ghost Brigades
#3 The Last Colony
#4 Zoe’s Tale
#5 The Human Division
#6 The End of All Things
Short fiction: “After the Coup”

Other Tor Books
The Android’s Dream
Agent to the Stars
Your Hate Mail Will Be Graded
Fuzzy Nation
Redshirts
Lock In
The Collapsing Empire (forthcoming)

At the Publisher's request, this title is being sold without Digital Rights Management Software (DRM) applied.

","isbn":"B000SEIK2S","amazonurl":"http://www.amazon.com/Old-Mans-War-John-Scalzi-ebook/dp/B000SEIK2S?linkCode=ll1&tag=codexmap-20&linkId=8d37aaf25f3947e1637a2ada957a9c8f&ref_=as_li_ss_tl","HawaiiProject":"https://www.thehawaiiproject.com/book/Old-Mans-War--by--John-Scalzi--30531","tbr":"https://tbrapp.co/book/30531","AppleBooks":"https://books.apple.com/us/book/old-mans-war/id378318873?itscg=30200&at=1000l3dBv&ct=30531","BarnesNoble":"https://www.barnesandnoble.com/s/B000SEIK2S","Bookshop":"https://bookshop.org/a/19558/9780765348272","coverarturl":"https://images-na.ssl-images-amazon.com/images/I/51rNR7rNkKL.jpg","bookid":"30531","publicationdate":"2007-04-01 00:00:00"},{"title":"The Life and Times of Cotton Mather","shorttitle":"The Life and Times of Cotton Mather","authorstring":"Kenneth Silverman","description":"Presents a comprehensive look at the quintessential Puritan, from his private home life to his involvement in the Salem witch trials, and offers a realistic portrait of seventeenth-and eighteenth-century Boston","descriptionHtml":"Presents a comprehensive look at the quintessential Puritan, from his private home life to his involvement in the Salem witch trials, and offers a realistic portrait of seventeenth-and eighteenth-century Boston","isbn":"9781566492065","amazonurl":"http://www.amazon.com/The-Life-Times-Cotton-Mather/dp/1566492068?linkCode=ll1&tag=codexmap-20&linkId=8d37aaf25f3947e1637a2ada957a9c8f&ref_=as_li_ss_tl","HawaiiProject":"https://www.thehawaiiproject.com/book/The-Life-and-Times-of-Cotton-Mather--by--Kenneth-Silverman--87371","tbr":"https://tbrapp.co/book/87371","AppleBooks":"https://goto.applebooks.apple/9781566492065?itscg=30200&at=1000l3dBv&ct=9781566492065","BarnesNoble":"https://www.barnesandnoble.com/s/9781566492065","Bookshop":"https://bookshop.org/a/19558/9781566492065","coverarturl":"https://images-na.ssl-images-amazon.com/images/I/51D54JMR58L.jpg","bookid":"87371","publicationdate":"1985-01-01 00:00:00"},{"title":"Written on the Dark","shorttitle":"Written on the Dark","authorstring":"Guy Gavriel Kay","description":"'Kay is a genius. I've read him all my life and am always inspired by his work' BRANDON SANDERSON A sweeping new novel of love and war that brilliantly evokes the drama and turbulence of medieval France from the internationally bestselling author of Tigana, All the Seas of the World, and A Brightness Long Ago. Thierry Villar is a well-known - even notorious - tavern poet, intimately familiar with the rogues and shadows of that world, but not at all with courts and power. He is an unlikely person, despite his quickness, to be swept into the deadly contests of ambitious royals, assassins, and invading armies. But he is indeed drawn into all these things on a savagely cold night in his beloved city of Orane. And so Thierry must use all the intelligence and charm he can muster as power struggles merge with a decades-long war to bring his country to the brink of destruction. As he does, he meets his poetic equal in an aristocratic woman and is drawn to more than one unsettling person with a connection to the world beyond this one. He also crosses paths with an extraordinary young woman driven by voices within to try to heal the ailing king - and help his forces in war. A wide and varied set of people from all walks of life take their places in the rich tapestry of this story. Both sweeping and intimate, Written on the Dark is an elegant tour de force about power and ambition playing out amid the equally intense human need for art and beauty, and memories to be left behind. ⭐PRAISE FOR GUY GAVRIEL KAY'S NOVELS⭐ 'Tragic, stirring, romantic, meticulous, comic, rueful, worldly-wise, and written in the intimate, deceptively nonchalant voice of a storyteller offering up his great gift' MICHAEL CHABON 'Kay is a genius. I've read him all my life and am always inspired by his work' BRANDON SANDERSON 'A wonderful talent. He tells stories in an invented world that is so rich in historical echoes that I found myself smiling with pleasure as I heard the echoes, while engrossed in the story. Warmly recommended' EDWARD RUTHERFORD 'History and fantasy rarely come together as gracefully or readably as they do in the novels of Guy Gavriel Kay' THE WASHINGTON POST BOOK WORLD 'By making the familiar ever so slightly strange, Guy Gavriel Kay breathes new life into historical fantasy. Beautifully faceted, jewel-like scenes carry us beyond the doublets and daggers to create an emotionally charged, high-stakes world of love and hate, threat and reward' DAILY MAIL 'An immersive reading experience; readers will taste the dust in their mouths, see the high seas from the deck of a merchant ship, feel the bustle of the city market. What results is necessary sustenance for the starving reader. A masterpiece from a master of the craft' BOOKLIST 'Gorgeous, generous, humane and deeply aware of the intricacies of human desire and attachment, All the Seas of the World is another masterpiece from Kay' JAMES BRADLEY 'I came away from it with spirits lifted and a smile on my face, whilst feeling a wistful sense of regret that the reading experience was over. You can't ask more from a book than that' PARSEC","descriptionHtml":"'Kay is a genius. I've read him all my life and am always inspired by his work' BRANDON SANDERSON A sweeping new novel of love and war that brilliantly evokes the drama and turbulence of medieval France from the internationally bestselling author of Tigana, All the Seas of the World, and A Brightness Long Ago. Thierry Villar is a well-known - even notorious - tavern poet, intimately familiar with the rogues and shadows of that world, but not at all with courts and power. He is an unlikely person, despite his quickness, to be swept into the deadly contests of ambitious royals, assassins, and invading armies. But he is indeed drawn into all these things on a savagely cold night in his beloved city of Orane. And so Thierry must use all the intelligence and charm he can muster as power struggles merge with a decades-long war to bring his country to the brink of destruction. As he does, he meets his poetic equal in an aristocratic woman and is drawn to more than one unsettling person with a connection to the world beyond this one. He also crosses paths with an extraordinary young woman driven by voices within to try to heal the ailing king - and help his forces in war. A wide and varied set of people from all walks of life take their places in the rich tapestry of this story. Both sweeping and intimate, Written on the Dark is an elegant tour de force about power and ambition playing out amid the equally intense human need for art and beauty, and memories to be left behind. ⭐PRAISE FOR GUY GAVRIEL KAY'S NOVELS⭐ 'Tragic, stirring, romantic, meticulous, comic, rueful, worldly-wise, and written in the intimate, deceptively nonchalant voice of a storyteller offering up his great gift' MICHAEL CHABON 'Kay is a genius. I've read him all my life and am always inspired by his work' BRANDON SANDERSON 'A wonderful talent. He tells stories in an invented world that is so rich in historical echoes that I found myself smiling with pleasure as I heard the echoes, while engrossed in the story. Warmly recommended' EDWARD RUTHERFORD 'History and fantasy rarely come together as gracefully or readably as they do in the novels of Guy Gavriel Kay' THE WASHINGTON POST BOOK WORLD 'By making the familiar ever so slightly strange, Guy Gavriel Kay breathes new life into historical fantasy. Beautifully faceted, jewel-like scenes carry us beyond the doublets and daggers to create an emotionally charged, high-stakes world of love and hate, threat and reward' DAILY MAIL 'An immersive reading experience; readers will taste the dust in their mouths, see the high seas from the deck of a merchant ship, feel the bustle of the city market. What results is necessary sustenance for the starving reader. A masterpiece from a master of the craft' BOOKLIST 'Gorgeous, generous, humane and deeply aware of the intricacies of human desire and attachment, All the Seas of the World is another masterpiece from Kay' JAMES BRADLEY 'I came away from it with spirits lifted and a smile on my face, whilst feeling a wistful sense of regret that the reading experience was over. You can't ask more from a book than that' PARSEC","isbn":"0593953983","amazonurl":"https://www.amazon.com/dp/0593953983?linkCode=ll1&tag=codexmap-20&linkId=8d37aaf25f3947e1637a2ada957a9c8f&ref_=as_li_ss_tl","HawaiiProject":"https://www.thehawaiiproject.com/book/Written-on-the-Dark--by--Guy-Gavriel-Kay--694084","tbr":"https://tbrapp.co/book/694084","AppleBooks":"https://books.apple.com/us/book/written-on-the-dark/id6670186970?itscg=30200&at=1000l3dBv&ct=694084","BarnesNoble":"https://www.barnesandnoble.com/s/0593953983","Bookshop":"https://bookshop.org/a/19558/9781399747035","coverarturl":"https://m.media-amazon.com/images/I/81-EJ1bDuQL.jpg","bookid":"694084","publicationdate":"2025-05-27 00:00:00"}]; // Create a container for the book list const bookList = document.createElement('div'); bookList.className = 'book-list'; // Add some basic styling const style = document.createElement('style'); style.textContent = ` body { --cover-width: 70px; --cover-height: calc(var(--cover-width) * 1.55); --cover-radius: 8px; --cover-bordercolor: white; --widget-background: black; --widget-textcolor: white; } .book-list { display: flex; flex-direction: column; gap: 10px; padding: 4px; max-widthX: 250px; background: var(--widget-background); } .book-card { display: flex; flex-direction: row; align-items: center; overflow: hidden; } @media (max-width:1080px) { .book-card { flex-direction: column; } } .book-cover-container { flexX: 0 0 var(--cover-width); width: var(--cover-width); height: var(--cover-height); border-radius: var(--cover-radius); background: var(--cover-bordercolor); displayX: flex; padding: 2px; } .book-cover-link { display: block; height: 100% } .book-cover { display: block; widthX: var(--cover-width); heightX: var(--cover-height); border-radius: var(--cover-radius); object-fit: cover; height: 100%; width: 100%; marginX: 1px; box-shadow: 0 0 1px 0px white inset, 0 0 1px 0px white; } .book-info { flex: 1; padding: 8px; display: flex; flex-direction: column; justify-content: center; background: var(--widget-background); color: var(--widget-textcolor); } .book-title { margin: 0 0 0px 0 !important; font-size: 1rem; font-weight: bold; color: var(--widget-textcolor); } .book-author { color: var(--widget-textcolor); margin-bottom: 0px !important; font-size: 0.75rem; } `; document.head.appendChild(style); // Create and append book cards books.forEach(book => { const bookCard = document.createElement('div'); bookCard.className = 'book-card'; // h2: margin-top: 0px; bookCard.innerHTML = `
Cover of ${book.shorttitle}
${book.shorttitle}

by ${book.authorstring}

`; bookList.appendChild(bookCard); }); // Add the book list to the document const booksContainer = document.getElementById('4a62b298c678055518cec753d2d19442'); if (booksContainer) { booksContainer.appendChild(bookList); } else { console.error('Element with id "books" not found'); } // var poweredDiv = document.createElement("div"); poweredDiv.setAttribute('style', 'padding-top: 4px; display: flex; justify-content: center; align-items: center;' ); var poweredImage = document.createElement("img"); var poweredLink = document.createElement("a"); var poweredImgLink = document.createElement("a"); poweredDiv.className ='LT_powered'; poweredImage.className ="favicon"; poweredImage.setAttribute('src', "https://bookshipapp.com/assets/icon/favicon.ico"); poweredImage.setAttribute('width', '16px'); poweredImage.setAttribute('height', '16px'); poweredImage.setAttribute('alt', 'Powered by Bookship'); poweredLink.setAttribute('href', 'https://www.bookshipapp.com') poweredLink.setAttribute('target', '_top'); poweredLink.setAttribute('style', 'display: flex;'); poweredLink.innerHTML='Powered by Bookship'; poweredImgLink.setAttribute('href', 'https://www.bookshipapp.com') poweredImgLink.setAttribute('target', '_top'); poweredImgLink.setAttribute('style', 'display: flex;padding-right: 4px;'); poweredImgLink.appendChild(poweredImage); poweredDiv.appendChild(poweredImgLink); poweredDiv.appendChild(poweredLink); booksContainer.appendChild(poweredDiv); } catch (error) { console.error('Error fetching or displaying books:', error); const errorMessage = document.createElement('div'); errorMessage.style.color = 'red'; errorMessage.style.padding = '20px'; errorMessage.textContent = 'Sorry, there was an error loading the books.'; document.body.appendChild(errorMessage); } } fetchAndDisplayBooks(); // Call the function when the document is loaded // document.addEventListener('DOMContentLoaded', fetchAndDisplayBooks);