Scribd Print and Download

Changes "Upload" link to open a printable viewer (print to PDF)

目前为 2015-12-08 提交的版本。查看 最新版本

// ==UserScript==
// @name        Scribd Print and Download
// @description	Changes "Upload" link to open a printable viewer (print to PDF)
// @author      Inserio
// @include     http://*.scribd.com/doc/*
// @include     https://*.scribd.com/doc/*
// @version     1.4
// @grant       none
// @require     https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @namespace https://gf.qytechs.cn/users/11878
// ==/UserScript==

$('*').html(function (i, text) {
	var idRegex = /"id":(\d{6,})/i;
	var keyRegex = /"access_key":"(key[-\w\d]*)"/i;
	var id = idRegex.exec(text);
	var key = keyRegex.exec(text);
	if (id !== null && key !== null && id !== undefined && key !== undefined)
		var new_link = "http://d1.scribdassets.com/ScribdViewer.swf?document_id=" + id[1] + "&access_key=" + key[1];
	if (new_link !== undefined)
		return text.replace(/https?:\/\/www\.scribd\.com\/upload-document/gi, new_link);
		// Matches the "Upload" link on the page.
		// Click it to open the new page in a viewer that will allow printing to PDF
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址