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.

To są wersje tego skryptu, gdzie kod został zaktualizowany. Pokaż wszystkie wersje.

  • v14 18-01-2023

    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 15-03-2020 Removing @run-at as it's not guaranteed to work, and @locale because Greasemonkey's editor thinks it's erroneous.
  • v12 04-09-2019 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 21-08-2019 Changing @match to a single pattern.
  • v10 21-08-2019 Adding an explicit @run-at document-idle, and fixing some code formatting.
  • v9 12-08-2019
  • v8 12-08-2019
  • v7 12-08-2019
  • v6 09-08-2019
  • v5 09-08-2019
  • v4 09-08-2019
  • v3 09-08-2019
  • v2 09-08-2019
  • v1 09-08-2019