MetaFilter highlight selected comment

On MetaFilter.com, adds a border to the selected comment to make it stand out visually, and adds "selected comment" to the small text to make it easy to search if you lose your place.

目前为 2019-08-09 提交的版本。查看 最新版本

这些是代码更新过的版本。 显示所有版本

  • v14 2023-01-18

    Updated to work with a change to MetaFilter's HTML. Used to use

    divToHighlight.lastChild.innerHTML += '<span class=\'tehhundUserScriptCommentCount\'>Comment ' + (i+1) + ' of ' + allCommentDivs.length + '. </span>';

    now uses

    divToHighlight.querySelector('.smallcopy').innerHTML += '<span class=\'tehhundUserScriptCommentCount\'>Comment ' + (i+1) + ' of ' + allCommentDivs.length + '. </span>';

  • v13 2020-03-15 Removing @run-at as it's not guaranteed to work, and @locale because Greasemonkey's editor thinks it's erroneous.
  • v12 2019-09-04 Making the script more efficient by using the HashChangeEvent API to target only the comment divs that are affected by the URL hash change instead of iterating over all the comment Divs.
  • v11 2019-08-21 Changing @match to a single pattern.
  • v10 2019-08-21 Adding an explicit @run-at document-idle, and fixing some code formatting.
  • v9 2019-08-12
  • v8 2019-08-12
  • v7 2019-08-12
  • v6 2019-08-09
  • v5 2019-08-09
  • v4 2019-08-09
  • v3 2019-08-09
  • v2 2019-08-09
  • v1 2019-08-09

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址