您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect Google AMP links to the original page
// ==UserScript== // @name Avoid AMP Pages from Google Search // @version 1.0 // @description Redirect Google AMP links to the original page // @author DoctorEye // @namespace DoctorEye // @match *://*.google.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // Ελέγχει εάν η σελίδα περιέχει AMP element const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { if (node.nodeType === Node.ELEMENT_NODE) { const ampLink = node.querySelector('a[href*="/amp/"]'); if (ampLink) { const originalLink = ampLink.href.replace('/amp/', '/'); window.location.href = originalLink; } } }); }); }); // Στόχευση στο κύριο στοιχείο της σελίδας για παρακολούθηση των αλλαγών const targetNode = document.querySelector('body'); const config = { childList: true, subtree: true }; // Εκκίνηση του observer observer.observe(targetNode, config); // Πρόσθετη ασφάλεια - ανακατεύθυνση αν η σελίδα είναι ήδη AMP if (window.location.pathname.includes('/amp/')) { const originalLink = window.location.href.replace('/amp/', '/'); window.location.href = originalLink; } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址