Scribd bypass

Script disables blur on text & add full document

当前为 2023-02-26 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name               Scribd bypass
// @description        Script disables blur on text & add full document
// @author             BAlexGG
// @version            1.0
// @license            MIT
// @namespace          https://greasyfork.org/ru/users/938036-bull-yt
// @match              *://*.scribd.com/*
// @icon               https://s-f.scribdassets.com/favicon.ico
// @require            https://code.jquery.com/jquery-3.6.3.min.js
// ==/UserScript==
/* eslint-env jquery */
$(document).ready(function(){
    'use strict';
    if (window.location.href.match(/document\/(\d+)\//) == null) return;
    //Remove blocks between pages
    $('div.between_page_module').remove();

    //Remove banners on pages
    $('div.auto__doc_page_webpack_doc_page_blur_promo').remove();

    // Remove blur
    $('div.newpage div.text_layer').css('text-shadow', 'black 0px 0px 0px');

    // Remove unselectable attribute
    $('[unselectable]').removeAttr('unselectable');

    // Remove blurred_page class
    $('.blurred_page').removeClass('blurred_page');

    // Add button to view fill document
    var id = window.location.href.match(/document\/(\d+)\//)[1];
    var key, maxpages;
    fetch('https://ru.scribd.com/doc-page/embed-modal-props/' + id)
        .then(response => response.json())
        .then(data => {
            key = data.access_key;
            maxpages = data.page_count;
        })
        .catch(error => console.error(error));

	// Create a new <style> element and append it to the <head> of the document
	const styleElement = document.createElement('style');
	styleElement.innerHTML = `.red-button {
	    background-color: red;
	    color: white;
	    border: none;
	    padding: 10px 20px;
	    font-size: 16px;
	    cursor: pointer;
        border-radius: 10px;
        margin-top: 0;
	}`;
	document.head.appendChild(styleElement);
	// Create a button element
	var button = $("<button/>")
	    .text("~ View Full Document ~")
	    .addClass("red-button")
	    .click(function() {
	        window.location.href = window.location.origin + "/embeds/" + id + "/content?start_page=1&view_mode=scroll&access_key=" + key;
	    });
	$(".doc_actions").append(button);
})();