您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
On the search results page, clicking on the PDF icon will jump you straight to PDF view.
当前为
// ==UserScript== // @name Alldatasheet.com: Single-click PDF access // @description On the search results page, clicking on the PDF icon will jump you straight to PDF view. // @namespace giferrari.net // @include http://www.alldatasheet.com/view.jsp* // @version 1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js // ==/UserScript== // Grab all links that appear to redirect to a PDF page. // There isn't a class that we can key off of, so we look for all // anchors that have a PDF icon in them. var datasheetPdfLinks = $('img[src="http://other.alldatasheet.com/etc/electronic_parts_datasheet.gif"]').closest('a'); // Open in same window instead of a new one. datasheetPdfLinks.attr('target', null) // Go to the PDF page directly. datasheetPdfLinks.attr('href', function(i, oldHref) { // From: // http://www.alldatasheet.com/datasheet-pdf/pdf/317775/COMSET/2N2222.html // To: //http://pdf1.alldatasheet.com/datasheet-pdf/view/317775/COMSET/2N2222.html return oldHref .replace(/^http:\/\/www.alldatasheet.com/, 'http://pdf1.alldatasheet.com') .replace(/\/pdf\//, '/view/'); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址