Scribd Bypass

Skip Scribd for its free counterpart.

20.10.2024 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name       Scribd Bypass
// @description Skip Scribd for its free counterpart.
// @author     573dave
// @version    2.0
// @license    MIT
// @match      *://*.scribd.com/*
// @match      *://ilide.info/doc-viewer-v2*
// @grant      GM_addStyle
// @grant      GM_setValue
// @namespace https://greasyfork.org/users/1241821
// ==/UserScript==

(function() {
  'use strict';

  GM_addStyle(`
    .sb-m{position:fixed;top:0;left:50%;transform:translateX(-50%);display:flex;gap:5px;z-index:10001;background:rgba(255,255,255,.85);padding:5px 10px;border-radius:0 0 5px 5px;box-shadow:0 2px 5px rgba(0,0,0,.2)}
    .sb-b{font:12px/1 sans-serif;padding:5px 10px;background:#FFC017;color:#000;border:none;border-radius:5px;cursor:pointer;transition:.3s}
    .sb-b:hover{background:#E6AC15}
    .sb-e{left:0;width:100%;height:0;position:relative;padding:45px 0 77.2727%}
    .sb-i{position:absolute;inset:0;width:100%;height:100%;border:0}
  `);

  const createButton = (text, onClick) => {
    const btn = document.createElement('button');
    btn.textContent = text;
    btn.className = 'sb-b';
    btn.onclick = onClick;
    return btn;
  };

  const createMenu = () => {
    const menu = document.createElement('div');
    menu.className = 'sb-m';
    document.body.prepend(menu);
    return menu;
  };

  const handleScribd = () => {
    const match = location.href.match(/\/(doc|document|presentation)\/(\d+)\/(.*)/);
    if (match) {
      const [, , id, title] = match;
      GM_setValue('origUrl', location.href);
      document.body.innerHTML = `<div class="sb-e"><iframe class="sb-i" src="https://www.scribd.com/embeds/${id}/content"></iframe></div>`;
      createMenu().appendChild(
        createButton("Download", () => {
          const downloadUrl = `https://ilide.info/docgeneratev2?fileurl=${encodeURIComponent(`https://scribd.vdownloaders.com/pdownload/${id}/${title}`)}&title=${encodeURIComponent(title)}&utm_source=scrfree&utm_medium=queue&utm_campaign=dl`;
          location.href = downloadUrl;
        })
      );
    }
  };

  const handleIlide = () => {
    const match = document.body.innerHTML.match(/https:\/\/ilide\.info\/docdownloadv2[^" ]+/);
    if (match) {
      location.href = `https://ilide.info/viewer/web/viewer.html?file=${encodeURIComponent(match[0])}#page=1`;
    }
  };

  const { hostname } = location;
  if (hostname.includes("scribd.com")) {
    handleScribd();
  } else if (hostname === "ilide.info" && location.pathname.startsWith("/doc-viewer-v2")) {
    handleIlide();
  }
})();