您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在百度、搜狗、必应的搜索结果页面加载完后,在右侧添加秘塔搜索,只支持pc端。
// ==UserScript== // @name 百度搜狗必应添加秘塔搜索面板 // @namespace meta_right_span // @version 1.0 // @description 在百度、搜狗、必应的搜索结果页面加载完后,在右侧添加秘塔搜索,只支持pc端。 // @author Your Name // @match *://www.baidu.com/* // @match *://www.sogou.com/* // @match *://*.bing.com/* // @match *://metaso.cn/* // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; function addIframe() { const url = location.href; const urlObj = new URL(url); const params = new URLSearchParams(urlObj.search); let targetDiv = document.getElementById('content_right'); let wdValue = params.get('wd'); if(location.href.indexOf("bing.com")>-1){ targetDiv = document.getElementById('b_context'); wdValue = params.get('q'); }else if(location.href.indexOf("sogou.com")>-1){ targetDiv = document.getElementById('right'); wdValue = params.get('query'); } if (targetDiv) { const iframe = document.createElement('iframe'); iframe.src = 'https://icon2.yjllq.com/meta.php?q='+wdValue; iframe.style.width = '100%'; iframe.style.height = '500px'; iframe.style.border = 'none'; iframe.style.boxShadow = '0px -1px 5px #e8e8e8'; targetDiv.insertBefore(iframe, targetDiv.firstChild); } } if(location.href.indexOf('metaso.cn')>-1){ debugger; if(window.top!=window){ setInterval(()=>{ document.querySelector(".left-menu").style.display="none";},500) } }else{ // Wait for the DOM to fully load addIframe(); } })();