版本比较
哥们我觉得你的电脑还是太好用了
正文
增加 354 行删除 78 行
123345678891011122 行未改动1516171819192021212223242526272829303132332834353036373839405 行未改动46474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616749168169170171535417217317417517617710 行未改动188189190191731921931941951961971981992002012022032042052062072082092102112122132142152162172182192202218 行未改动2302312322332342352362372387 行未改动2462472482492502512522532546 行未改动2612622632642652662672682695 行未改动2752762772782792802812822837 行未改动29129229329429529629729829930030130230330448 行未改动35335435535635735835936036136236336436536636736836918 行未改动38838939039124539239339439539625025125225339739839940085 行未改动48648748848934749049149249349426 行未改动52152252352438252552652752852911 行未改动54154254354440254554654754854947 行未改动59759859960045860160260360460512 行未改动6186196206214796226236246256262 行未改动62963063163249063363463563663717 行未改动65565665765851665966066166266352 行未改动71671771871957772072172272372415 行未改动7407417427436017447457467477487497507512 行未改动75475575675775875976076176276376476576676776876977077177277377477577677762177877978078178252 行未改动83583683783868268368468583984084184284311 行未改动85585685785870585986086186286310 行未改动87487587687772487887988088188273 行未改动95695795895980696096196296396453 行未改动10181019102010218681022102310241025102654 行未改动10811082108310849311085108610871088108936 行未改动11261127112811299761130113111321133113411351136983984985986987988989990991992993113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117010021171117211731005117411751176117711781179101111801181118210141183118411851186118711881189119010221023102410251026102710281029103010311032119111921193119411951196119711981199120012011202120312041205120612072 行未改动121012111212121310431044104512141215121612171218121912201221122212231224105310541055105612251226122712281229123012311232123312341235123612371238123912401061124112421243106412441245124610671247124812491070125012511252107312531254125512561077125712581259126012611262126312641265126612671268126912701271127212731274127510851086127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136310931364136513661367136860 行未改动14291430143114321162143314341435143614371438143914401441144214431444144514461447思路是我想的,代码是 AI 的。
写了 3 小时,求关注。弄了 10 小时,求关注。
# 内容
1. 使文字错位并抖动。2. 使图片有大量噪点、更糊。2. 使图片有大量噪点、更糊(你可以打开一个图片试试)。3. 整个网页有扫描线、雪花屏、色彩偏移效果。
交互操作:点击被红框框起的元素效果会增强。
2 行未改动初始界面:

页面效果:页面效果(缩小处理):


:::warning[警告]{open}部分文本很多很复杂的网站(如deepseek等)使用后可能会出现页面卡死、浏览器卡死、电脑卡死等情况:::
---
:::info[源代码]```// ==UserScript==// @name 你的网页被入侵啦!!!!// @name 你的网页被入侵了!!!!!!!!// @namespace http://tampermonkey.net/// @version 2.4// @version 2.5// @description 为网页添加入侵界面和错误化效果// @author AI Assistant// @match *://*/*// @grant none5 行未改动 // 全局变量 let isEnhanced = false; const enhancedElements = new Set(); let clickCount = 0; let isHackScreenActive = true;
// 存储进度条引用 let currentProgress = 0; let progressInterval;
// 存储原始滚动状态和样式 let originalBodyStyle = {}; let originalScrollBehavior = ''; let isScrollLocked = false;
// 1. 锁定滚动和交互 function lockScrollAndInteraction() { console.log("锁定滚动和交互...");
// 保存原始样式 originalBodyStyle = { overflow: document.body.style.overflow, position: document.body.style.position, height: document.body.style.height, width: document.body.style.width, touchAction: document.body.style.touchAction, overscrollBehavior: document.body.style.overscrollBehavior };
originalScrollBehavior = document.documentElement.style.scrollBehavior;
// 锁定body滚动 document.body.style.overflow = 'hidden'; document.body.style.position = 'fixed'; document.body.style.height = '100vh'; document.body.style.width = '100vw'; document.body.style.touchAction = 'none'; document.body.style.overscrollBehavior = 'none';
// 锁定html滚动 document.documentElement.style.overflow = 'hidden'; document.documentElement.style.scrollBehavior = 'auto';
// 添加事件监听器阻止滚动 document.addEventListener('wheel', preventScroll, { passive: false }); document.addEventListener('touchmove', preventScroll, { passive: false }); document.addEventListener('keydown', preventKeyScroll, { passive: false }); document.addEventListener('DOMMouseScroll', preventScroll, { passive: false }); document.addEventListener('mousewheel', preventScroll, { passive: false });
// 防止通过拖拽滚动 document.addEventListener('scroll', preventScrollEvent, { passive: false });
// 防止通过鼠标中键滚动 document.addEventListener('mousedown', preventMiddleClickScroll, { passive: false });
isScrollLocked = true;
console.log("滚动和交互已锁定"); }
// 2. 阻止滚动 function preventScroll(e) { if (isHackScreenActive || isScrollLocked) { e.preventDefault(); e.stopPropagation(); return false; } }
// 3. 阻止键盘滚动 function preventKeyScroll(e) { const scrollKeys = ['Space', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'PageUp', 'PageDown', 'Home', 'End']; if ((isHackScreenActive || isScrollLocked) && scrollKeys.includes(e.code)) { e.preventDefault(); e.stopPropagation(); return false; } }
// 4. 阻止滚动事件 function preventScrollEvent(e) { if (isHackScreenActive || isScrollLocked) { e.preventDefault(); e.stopPropagation(); window.scrollTo(0, 0); return false; } }
// 5. 阻止鼠标中键滚动 function preventMiddleClickScroll(e) { if (e.button === 1) { // 中键 e.preventDefault(); e.stopPropagation(); return false; } }
// 6. 解锁滚动和交互 function unlockScrollAndInteraction() { console.log("解锁滚动和交互...");
// 恢复原始样式 Object.assign(document.body.style, originalBodyStyle); document.documentElement.style.overflow = ''; document.documentElement.style.scrollBehavior = originalScrollBehavior;
// 移除事件监听器 document.removeEventListener('wheel', preventScroll); document.removeEventListener('touchmove', preventScroll); document.removeEventListener('keydown', preventKeyScroll); document.removeEventListener('DOMMouseScroll', preventScroll); document.removeEventListener('mousewheel', preventScroll); document.removeEventListener('scroll', preventScrollEvent); document.removeEventListener('mousedown', preventMiddleClickScroll);
isScrollLocked = false;
console.log("滚动和交互已解锁"); }
// 1. 显示入侵界面 // 7. 显示入侵界面 function showHackScreen() { console.log("显示入侵界面...");
// 保存原始网页内容 const originalBody = document.body.innerHTML; // 先锁定滚动和交互 lockScrollAndInteraction();
// 创建入侵界面 const hackScreen = document.createElement('div'); hackScreen.id = 'hack-screen';10 行未改动 display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; overflow: hidden !important; padding: 20px; box-sizing: border-box; pointer-events: auto !important; touch-action: none !important; -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important; `;
// 阻止入侵界面内的所有交互(除了必要的) hackScreen.addEventListener('wheel', preventScroll, { passive: false }); hackScreen.addEventListener('touchmove', preventScroll, { passive: false }); hackScreen.addEventListener('contextmenu', e => e.preventDefault()); hackScreen.addEventListener('dragstart', e => e.preventDefault()); hackScreen.addEventListener('selectstart', e => e.preventDefault());
// 创建入侵文本容器 const textContainer = document.createElement('div'); textContainer.style.cssText = ` position: relative; text-align: center; font-size: 24px; margin-bottom: 50px; min-height: 100px; pointer-events: none; `;
// 第一行文本 const text1 = document.createElement('div');8 行未改动 color: #0f0; text-shadow: 0 0 10px #0f0; white-space: nowrap; animation: text-appear 0.5s forwards; pointer-events: none; `;
// 第二行文本 const text2 = document.createElement('div');7 行未改动 opacity: 0; color: #0f0; text-shadow: 0 0 10px #0f0; white-space: nowrap; pointer-events: none; `;
// 进度条容器 const progressContainer = document.createElement('div');6 行未改动 border-radius: 20px; overflow: hidden; position: relative; margin-top: 30px; pointer-events: none; `;
// 进度条 const progressBar = document.createElement('div');5 行未改动 width: 0%; height: 100%; background: linear-gradient(90deg, #0f0, #0a0); transition: width 0.1s linear; pointer-events: none; `;
// 进度文本 const progressText = document.createElement('div');7 行未改动 font-size: 14px; font-weight: bold; text-shadow: 0 0 5px #0f0; z-index: 2; pointer-events: none; `;
// 添加样式 const style = document.createElement('style'); style.id = 'hack-screen-style'; style.textContent = ` @keyframes text-appear { 0% { opacity: 0; transform: translateX(-50%) scale(0.8); } 100% { opacity: 1; transform: translateX(-50%) scale(1); }48 行未改动 20% { opacity: 0.7; transform: translateY(-10px); } 80% { opacity: 0.7; transform: translateY(-10px); } 100% { opacity: 0; transform: translateY(-20px); } }
/* 锁定所有滚动 */ html, body { overflow: hidden !important; position: fixed !important; width: 100vw !important; height: 100vh !important; overscroll-behavior: none !important; } `;
// 构建DOM结构 textContainer.appendChild(text1);18 行未改动
}, 500); }
// 2. 开始加载进度条(逐步应用错误化效果) // 8. 开始加载进度条(逐步应用错误化效果) function startProgressBar(progressBar, progressText, text2, hackScreen) { let progress = 0; let effectStage = 0;
// 存储原始网页内容以便恢复 const originalBodyHTML = document.body.innerHTML; const originalBodyChildren = document.body.children;
// 记录已处理的元素 const processedElements = new Set();
// 逐步应用错误化效果85 行未改动 } }, 50); // 每50ms更新一次 }
// 3. 逐步对网页元素应用错误化 // 9. 逐步对网页元素应用错误化 function applyProgressiveElementEffects(progress) { // 获取所有元素 const elements = document.querySelectorAll('body *:not(#hack-screen) *:not(#hack-screen)');
26 行未改动 } } }
// 4. 轻微位置错位(阶段1) // 10. 轻微位置错位(阶段1) function applyMildRandomOffset() { const elements = document.querySelectorAll('body *:not(#hack-screen) *:not(#hack-screen)');
elements.forEach(el => {11 行未改动 el.dataset.mildOffsetApplied = 'true'; }); }
// 5. 部分元素抖动(阶段2) // 11. 部分元素抖动(阶段2) function applyPartialGlitchEffect() { const style = document.createElement('style'); style.textContent = ` @keyframes glitch-shake {47 行未改动 } }); }
// 6. 图片初步噪点(阶段3) // 12. 图片初步噪点(阶段3) function applyInitialImageNoise() { const images = document.querySelectorAll('img:not([data-noise-processed])');
images.forEach((img, index) => {12 行未改动 } }); }
// 7. 增强效果和视频滤镜(阶段4) // 13. 增强效果和视频滤镜(阶段4) function applyEnhancedAndVideoEffects() { // 应用视频错误滤镜 applyVideoGlitchFilter();
2 行未改动 applyEnhancedEffects(); }, 500); }
// 8. 完成所有效果(阶段5) // 14. 完成所有效果(阶段5) function completeAllEffects() { // 应用完整的位置偏移 applyRandomOffset();
17 行未改动 } }); }
// 9. 增强入侵界面效果 // 15. 增强入侵界面效果 function enhanceHackScreenEffects(progress, hackScreen, text2) { // 第一行文字效果增强 const text1 = document.getElementById('hack-text-1'); if (text1) {52 行未改动 } } }
// 10. 添加随机错误文本 // 16. 添加随机错误文本 function addRandomErrorText(container) { const errorTexts = [ 'ERROR', 'SYSTEM_FAIL', 'DATA_CORRUPT', '0xDEADBEEF', 'NULL_PTR', 'SEGFAULT', 'BUFFER_OVERFLOW', 'ACCESS_VIOLATION',15 行未改动 } }, 2000); }
// 11. 移除入侵界面并完成错误化效果 // 17. 移除入侵界面并完成错误化效果 function removeHackScreen() { isHackScreenActive = false;
const hackScreen = document.getElementById('hack-screen'); if (hackScreen) { // 淡出效果 hackScreen.style.transition = 'opacity 0.5s ease-out';2 行未改动 setTimeout(() => { if (hackScreen.parentNode) { hackScreen.parentNode.removeChild(hackScreen); }
// 移除入侵界面样式 const hackStyle = document.getElementById('hack-screen-style'); if (hackStyle && hackStyle.parentNode) { hackStyle.parentNode.removeChild(hackStyle); }
// 解锁滚动和交互 unlockScrollAndInteraction();
// 最终完成所有错误化效果 finalizeEffects(); }, 500); } else { // 解锁滚动和交互 unlockScrollAndInteraction(); finalizeEffects(); } }
// 12. 最终完成所有错误化效果 // 18. 最终完成所有错误化效果 function finalizeEffects() { console.log('最终完成所有错误化效果...');
// 确保所有图片都处理完成52 行未改动
console.log('网页错误化效果应用完成'); }
// 以下是从原脚本中复制的其他函数... // 由于篇幅限制,这里只复制关键函数,其余保持原样
// 13. 完整位置错位 // 19. 完整位置错位 function applyRandomOffset() { const elements = document.querySelectorAll('body *');
elements.forEach(el => {11 行未改动 el.dataset.offsetApplied = 'true'; }); }
// 14. 完整图片噪点效果 // 20. 完整图片噪点效果 function applyImageNoiseEffect() { console.log("应用完整图片噪点效果...");
const images = document.querySelectorAll('img:not([data-noise-processed="true"])');10 行未改动 } }); }
// 15. 单个图片噪点处理 // 21. 单个图片噪点处理 function applyImageNoiseToSingle(img) { if (img.dataset.noiseProcessed === 'true') return;
img.dataset.noiseProcessed = 'true';73 行未改动 img.dataset.noiseProcessed = 'true'; } }
// 16. 选择5%的元素应用增强效果(同原脚本) // 22. 选择5%的元素应用增强效果 function applyEnhancedEffects() { console.log("选择5%的元素应用增强效果...");
const allElements = document.querySelectorAll('body *:not(script):not(style):not(iframe)');53 行未改动 } } }
// 17. 雪花屏效果(同原脚本) // 23. 雪花屏效果 function triggerSnowScreen(event) { console.log("触发雪花屏效果");
// 创建雪花屏覆盖层54 行未改动 } }, 1000); }
// 18. 增强所有效果(同原脚本) // 24. 增强所有效果 function enhanceAllEffects() { if (isEnhanced) { // 每次点击增强元素都会进一步增强效果 clickCount++;36 行未改动 // 增强视频错误滤镜 enhanceVideoGlitchFilter(clickCount); }
// 19. 视频错误滤镜(同原脚本) // 25. 视频错误滤镜 - 修复版(完全固定,适配屏幕) function applyVideoGlitchFilter() { console.log("应用视频错误滤镜...");
const style = document.createElement('style'); style.id = 'video-glitch-style'; style.textContent = ` body::before { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99999; mix-blend-mode: overlay; opacity: 0.2; /* 主错误滤镜容器 - 完全固定 */ .glitch-overlay-container { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; pointer-events: none !important; z-index: 99999 !important; overflow: hidden !important; contain: strict !important; }
/* 扫描线效果 - 使用translateZ确保固定 */ .scanlines-overlay { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; pointer-events: none !important; z-index: 1 !important; mix-blend-mode: overlay !important; opacity: 0.2 !important; transform: translateZ(0) !important; will-change: transform !important;
/* 增强扫描线效果 */ background-image: repeating-linear-gradient( 0deg, transparent, transparent 1px, rgba(0, 255, 255, 0.4) 1px, rgba(0, 255, 255, 0.4) 2px ); ) !important;
/* 增加扫描线密度 */ background-size: 100% 3px; background-size: 100% 3px !important;
/* 增强色彩偏移效果 */ box-shadow: inset 0 0 400px rgba(255, 0, 0, 0.3), inset 0 0 200px rgba(0, 255, 0, 0.2), inset 0 0 100px rgba(0, 0, 255, 0.15); inset 0 0 100px rgba(0, 0, 255, 0.15) !important;
/* 加快扫描速度 */ animation: glitch-scan 5s linear infinite; animation: glitch-scan 5s linear infinite !important; }
@keyframes glitch-scan { 0% { background-position: 0 0; } 100% { background-position: 0 100vh; } }
/* 增强雪花像素点 */ body::after { content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99998; opacity: 0.1; /* 雪花像素点 - 使用translateZ确保固定 */ .snow-overlay { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; pointer-events: none !important; z-index: 0 !important; opacity: 0.1 !important; transform: translateZ(0) !important; will-change: transform !important;
background-image: radial-gradient(circle at 10% 20%, white 1px, transparent 1px), radial-gradient(circle at 30% 40%, white 1px, transparent 1px), radial-gradient(circle at 50% 60%, white 1px, transparent 1px),2 行未改动 radial-gradient(circle at 20% 90%, white 1px, transparent 1px), radial-gradient(circle at 40% 30%, white 1px, transparent 1px), radial-gradient(circle at 60% 70%, white 1px, transparent 1px), radial-gradient(circle at 80% 50%, white 1px, transparent 1px), radial-gradient(circle at 95% 85%, white 1px, transparent 1px); background-size: 100px 100px; animation: snow-drift 30s linear infinite; radial-gradient(circle at 95% 85%, white 1px, transparent 1px) !important;
background-size: 100px 100px !important; animation: snow-drift 30s linear infinite !important; }
@keyframes snow-drift { 0% { background-position: 0 0; } 100% { background-position: 100px 100px; } }
/* 增强色彩偏移效果 */ body { animation: color-shift 15s infinite alternate; filter: hue-rotate(0deg) brightness(105%) contrast(110%); /* 色彩偏移效果 - 应用到整个容器 */ .color-shift-overlay { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; pointer-events: none !important; z-index: 2 !important; mix-blend-mode: color !important; animation: color-shift 15s infinite alternate !important; filter: hue-rotate(0deg) brightness(105%) contrast(110%) !important; }
@keyframes color-shift { 0% { filter: hue-rotate(0deg) brightness(105%) contrast(110%); filter: hue-rotate(0deg) brightness(105%) contrast(110%) !important; } 25% { filter: hue-rotate(15deg) brightness(110%) contrast(120%); filter: hue-rotate(15deg) brightness(110%) contrast(120%) !important; } 50% { filter: hue-rotate(-10deg) brightness(108%) contrast(118%); filter: hue-rotate(-10deg) brightness(108%) contrast(118%) !important; } 75% { filter: hue-rotate(8deg) brightness(112%) contrast(115%); filter: hue-rotate(8deg) brightness(112%) contrast(115%) !important; } 100% { filter: hue-rotate(0deg) brightness(105%) contrast(110%); filter: hue-rotate(0deg) brightness(105%) contrast(110%) !important; } }
/* 添加额外的随机水平偏移效果 */ /* 水平偏移效果 - 应用到整个容器 */ .horizontal-glitch-overlay { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; pointer-events: none !important; z-index: 3 !important; animation: horizontal-glitch 8s infinite !important; }
@keyframes horizontal-glitch { 0% { transform: translateX(0); } 98% { transform: translateX(0); } 99% { transform: translateX(-5px); } 100% { transform: translateX(5px); } }
body { animation: color-shift 15s infinite alternate, horizontal-glitch 8s infinite; /* 确保滤镜层在视口内固定,不随滚动移动 */ .glitch-overlay-container, .scanlines-overlay, .snow-overlay, .color-shift-overlay, .horizontal-glitch-overlay { position: fixed !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; margin: 0 !important; padding: 0 !important; transform: translateZ(0) !important; backface-visibility: hidden !important; -webkit-backface-visibility: hidden !important; perspective: 1000 !important; -webkit-perspective: 1000 !important; transform-style: flat !important; }
/* 防止任何滚动影响 */ .glitch-overlay-container { overflow: hidden !important; overscroll-behavior: none !important; -webkit-overflow-scrolling: auto !important; } `;
document.head.appendChild(style);
// 创建滤镜容器 const glitchContainer = document.createElement('div'); glitchContainer.className = 'glitch-overlay-container'; glitchContainer.id = 'glitch-overlay-container';
// 创建扫描线层 const scanlines = document.createElement('div'); scanlines.className = 'scanlines-overlay';
// 创建雪花层 const snow = document.createElement('div'); snow.className = 'snow-overlay';
// 创建色彩偏移层 const colorShift = document.createElement('div'); colorShift.className = 'color-shift-overlay';
// 创建水平偏移层 const horizontalGlitch = document.createElement('div'); horizontalGlitch.className = 'horizontal-glitch-overlay';
// 添加到容器 glitchContainer.appendChild(scanlines); glitchContainer.appendChild(snow); glitchContainer.appendChild(colorShift); glitchContainer.appendChild(horizontalGlitch);
// 添加到body document.body.appendChild(glitchContainer);
// 添加窗口大小变化监听器,确保滤镜层始终适配屏幕 function updateGlitchOverlaySize() { const container = document.getElementById('glitch-overlay-container'); if (container) { // 强制重新计算尺寸 container.style.width = '100vw'; container.style.height = '100vh';
// 确保所有子元素也重新计算 const overlays = container.querySelectorAll('*'); overlays.forEach(overlay => { overlay.style.width = '100vw'; overlay.style.height = '100vh'; }); } }
// 初始设置 updateGlitchOverlaySize();
// 监听窗口大小变化 window.addEventListener('resize', updateGlitchOverlaySize); window.addEventListener('orientationchange', updateGlitchOverlaySize); }
// 20. 增强视频错误滤镜(根据点击次数增强)(同原脚本) // 26. 增强视频错误滤镜(根据点击次数增强) function enhanceVideoGlitchFilter(clickCount) { const existingStyle = document.getElementById('video-glitch-style'); if (existingStyle) { // 根据点击次数计算增强程度60 行未改动 `; } }
// 21. 页面加载完成后开始显示入侵界面 // 27. 页面加载完成后开始显示入侵界面 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', showHackScreen); } else { showHackScreen(); }
})();
```:::
求点赞,求关注,求收藏,求评论(?)
~~我敢说,没有人能在使用该脚本下在洛谷做上一天题。~~