MCPcopy
hub / github.com/xcanwin/KeepChatGPT / purifyPage

Function purifyPage

KeepChatGPT.user.js:2721–2740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2719 净化页面
2720 */
2721 const purifyPage = function () {
2722 if (
2723 location.href.match(
2724 /https:\/\/(chatgpt\.com|chat\.openai\.com)\/\??/,
2725 )
2726 ) {
2727 //添加专属logo
2728 if (
2729 $("main h1") &&
2730 $("main h1").innerText.match(/^ChatGPT(\nPLUS)?$/)
2731 ) {
2732 $("main h1").classList.add("text-gray-200");
2733 const nSpan = document.createElement("span");
2734 nSpan.className =
2735 "bg-yellow-200 text-yellow-900 py-0.5 px-1.5 text-xs md:text-sm rounded-md uppercase";
2736 nSpan.textContent = `KEEP`;
2737 $("main h1").appendChild(nSpan);
2738 }
2739 }
2740 };
2741
2742 /*
2743 言无不尽

Callers 2

loadMenuFunction · 0.85
setUserOptionsFunction · 0.85

Calls 2

$Function · 0.85
addMethod · 0.80

Tested by

no test coverage detected