您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allow direct linking to images from Startpage, without a proxy
- // ==UserScript==
- // @name Startpage Direct Image URL
- // @namespace http://tampermonkey.net/
- // @version 3.1
- // @description Allow direct linking to images from Startpage, without a proxy
- // @author YXXXXNN
- // @license GPL
- // @match https://startpage.com/sp/search*
- // @match https://startpage.com/do/dsearch*
- // @match https://www.startpage.com/sp/search*
- // @match https://www.startpage.com/do/dsearch*
- // @match https://eu.startpage.com/sp/search*
- // @match https://eu.startpage.com/do/dsearch*
- // @match https://us.startpage.com/sp/search*
- // @match https://us.startpage.com/do/dsearch*
- // @match https://*.startpage.com/sp/search*
- // @match https://*.startpage.com/do/dsearch*
- // @icon https://www.google.com/s2/favicons?domain=startpage.com
- // @grant none
- // ==/UserScript==
- const dirImgClassName = "css-dirimg451";
- window.addEventListener('load', () => {
- // Link element
- var a = document.createElement("a");
- a.rel = "noopener nofollow noreferrer";
- a.target = "_blank";
- a.ariaLabel = "link";
- a.className = dirImgClassName;
- a.innerHTML = "View direct image";
- a.style = "color: #7f869f; font-size: 13px; text-decoration: none; margin-top: 15px;"
- document.getElementsByClassName("expanded-details-link")[0].append(a);
- // Add functionality
- var imgbtn = document.getElementsByClassName('image-links')[0].children[0];
- var observer = new MutationObserver((mutations) => {
- let url = imgbtn.href;
- url = url.substring(52);
- url = url.substring(0, url.indexOf('&'));
- url = decodeURIComponent(url);
- document.getElementsByClassName(dirImgClassName)[0].href = url;
- });
- observer.observe(imgbtn, {
- attributes: true,
- attributeFilter: ['href'] });
- imgbtn.dataset.selectContentVal = 1;
- }, false);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址