包名所在处用黄色显眼显示
当前为
// ==UserScript==
// @name 包名所在处显眼显示
// @namespace https://greasyfork.org/users/1284284
// @version 0.2
// @description 包名所在处用黄色显眼显示
// @match https://iopen-gamecenter.heytapmobi.com/tribe/v1/share/*
// @match https://game.vivo.com.cn/api/game/*
// @match https://api.3839app.com/cdn/android/*
// @match https://dl.yxhapi.com/android/box/game/v6.2/*
// @match https://huodong.4399.cn/game///api/huodong/daily/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const keywords = ['pkgName','pkg','packageName','packag', 'package']; const elements = document.querySelectorAll('*'); for (let element of elements) { if (element.textContent) { for (let keyword of keywords) { if (element.textContent.includes(keyword)) { const regex = new RegExp(`\\b${keyword}\\b`, 'gi'); element.innerHTML = element.innerHTML.replace(regex, `<span style="background-color: yellow;">${keyword}</span>`); } } } }})();