Similar to codeshelper entering a question from the notification, the comment is automatically located to the location where it was replied and the highlight is set.

clipboard.png

Click a link from here, and the
page will automatically jump to the replied comment and set the highlight
excuse me, how can this function be realized?
look at the url suffix more than the usual url from my question? _ ea=3777951 this suffix,

Aug.19,2021

View the page

clipboard.png

highlight
question.min.js

clipboard.png

ctrl+f highlight

clipboard.png

id SFEventObject :

clipboard.png

combined with the code in the screenshot section of question.min.js, we can see:

var i = JSON.parse($("-sharpSFEventObject").attr("value")) // {"current":["comment",["1050000016688191"]],"root":["answer","1020000016687212"]}
var x = I.current[1] // ["1050000016688191"]

Loop X->

$("html, body").scrollTop($("-sharp" + "1050000016688191").offset().top)

the element whose id is SFEventObject is that when rendering the html page in the background, the response that should be highlighted is queried according to? _ ea=xxx. Id is written directly in meta

.

is it easy to play


each reply corresponds to an id,? _ ea=3777951. I guess this is the reply id, with an id match and highlight it to him. If you scroll to the corresponding position, ScrollIntoView should be able to

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4097a-448e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4097a-448e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?