MCPcopy Index your code
hub / github.com/XIU2/UserScript / normalizeBlockKeywordText

Function normalizeBlockKeywordText

Zhihu-Enhanced.user.js:850–852  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

848var selectedTextForBlockKeywords = '';
849// 规范化屏蔽词文本:压缩多余空白并去掉首尾空格
850function normalizeBlockKeywordText(text) {
851 return (text || '').replace(/\s+/g, ' ').trim();
852}
853
854// 读取当前选中的文字,兼容输入框和普通页面选区
855function getSelectedBlockKeywordText() {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected