您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
鼠标触发预览
// ==UserScript== // @name linuxdo鼠标预览 // @namespace http://tampermonkey.net/ // @version 2024-06-06 // @description 鼠标触发预览 // @author Alex // @match https://linux.do/latest* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; console.log("脚本初始化..."); // 添加样式到页面头部 const style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = ` .modal { position: fixed; top: 0; right: 0; width: 83%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; display: none; } iframe { width: 100%; height: 100%; } `; document.head.appendChild(style); // 创建模态窗口和iframe容器 const modal = document.createElement('div'); modal.className = 'modal'; const iframe = document.createElement('iframe'); document.body.appendChild(modal); modal.appendChild(iframe); // 打开模态窗口的函数 function openModal(url) { iframe.src = url; modal.style.display = 'flex'; } // 点击模态窗口以外的区域关闭模态窗口 modal.addEventListener('mouseleave', function(event) { if (event.target === modal) { modal.style.display = 'none'; iframe.src = ''; // 清除iframe内容 } }); // 监听点击事件 document.addEventListener('mouseenter', function(e) { if (e.target.matches('.raw-link')) { e.preventDefault(); // 阻止链接默认行为 openModal(e.target.href); // 打开模态窗口并加载链接 } }, true); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址