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

Function updateSelectedBlockKeyword

Zhihu-Enhanced.user.js:869–871  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

867// 记录最近一次选中的文字,供右键脚本菜单 [添加选中文字到屏蔽词] 使用
868function rememberSelectedBlockKeyword() {
869 const updateSelectedBlockKeyword = function() {
870 selectedTextForBlockKeywords = getSelectedBlockKeywordText();
871 }
872 document.addEventListener('selectionchange', updateSelectedBlockKeyword);
873 document.addEventListener('contextmenu', updateSelectedBlockKeyword, true);
874 window.addEventListener('urlchange', function(){selectedTextForBlockKeywords = '';});

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected