您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
跳过微博图床外链限制,加载“owendswang.com”网站上的微博外链图片。
当前为
// ==UserScript== // @name Load pictures on ODSW // @name:zh-CN 加载ODSW网站上的图片 // @namespace https://www.owendswang.com/ // @version 0.2 // @description Load pictures from weibo.com without limitation on 'owendswang.com'. // @description:zh-CN 跳过微博图床外链限制,加载“owendswang.com”网站上的微博外链图片。 // @icon https://avatars.githubusercontent.com/u/9076865?s=40&v=4 // @author OWENDSWANG // @license MIT // @match https://www.owendswang.com // @match https://www.owendswang.com/?page=* // @match https://www.owendswang.com/weibo/* // @run-at document-end // @grant GM_xmlhttpRequest // @grant GM_notification // @connect sinaimg.cn // @connect owendswang.com // ==/UserScript== (function() { 'use strict'; const getImage = (el) => { const url = el.getAttribute('data-src'); if(url.startsWith('http')) { GM_xmlhttpRequest({ method: 'get', url, responseType: 'blob', withCredentials: false, headers: { 'Referer': 'https://weibo.com/', 'Origin': 'https://weibo.com/' }, onload: function ({ status, response }) { if(status === 200) { if(el.tagName === "IMG") { el.src = URL.createObjectURL(response); } else if (el.tagName === "DIV") { el.style.backgroundImage = 'url(\'' + URL.createObjectURL(response) + '\')'; } } } }) } } document.querySelectorAll('.lozad').forEach((el) => { // console.log(el) getImage(el) }); const weiboNotice1 = bootstrap.Alert.getOrCreateInstance('#weibo-notice-1') weiboNotice1.close() })();