Greasy Fork is available in English.

Scribd Book Downloader

Scribd Book and Document Downloader

< Feedback on Scribd Book Downloader

Review: Good - script works

§
Posted: 28-07-2023

function createBook() { const bookw = document.querySelector('#columncontainer .readercolumn.leftcolumn > div').style.width; const bookh = document.querySelector('#columncontainer .readercolumn.leftcolumn > div').style.height;

// const book_w = 585;
// const book_h = 765;

let css = "<head><style>" +
    `#book .reader_column.left_column, #book .reader_column.right_column {position: relative; width: ${book_w}; height: auto; overflow: hidden } ` +
    "#book * {position: static !important; transform: none !important; padding-left: 0 !important; padding-right: 0 !important } " +
    "#book .reader_column > div {height: auto !important} " +
    "#book .text_line > span { margin-right: 4px; }" +
    "style {color: #fff; display: none; opacity: 0;}" +
    "@media print { style {color: #fff; display: none; opacity: 0;} #book .text_line > span { margin-right: 4px; } }" +
    "#book *:not(table):not(tbody):not(tr):not(td):not(table span):not(tr span):not(td span) { display: inline-block !important; }" +
    "#book table * { display: block !important; }" +
    "</style></head>";

book.style.cssText = `width: ${book_w}px; height: auto;`;
book.innerHTML = css;
}

Post reply

Sign in to post a reply.