⬆️ ⬇️

Hidden features supergabra

Today, something climbed into the code of the habr and found there a commented block, which in essence is a panel with buttons for navigating through the messages. The commented code looks like this:

<ul class = "comments_bar">

<li class = "cb_reload"> <span class = "corner"> </ span> <a href = "#" onclick = "return commentForm.reloadComments ('38271', 'post', '1219860285');" title = "Update comments without reloading the page"> </a> </ li>

<li class = "cb_prev"> <a href = "#" onclick = "return commentForm.goPrevNewComment (event);" title = "Next New"> </a> </ li>

<li class = "cb_next"> <a href = "#" onclick = "return commentForm.goNextNewComment (event);" title = "Previous New"> </a> </ li>

<li class = "cb_my"> <span class = "corner"> </ span> <a href = "#" onclick = "return commentForm.goMyComment (event);" title = "Go to your comment"> </a> </ li>

</ ul>


As you can see, this block provides the following functionality:

  1. Reloading the message tree without reloading the page
  2. Go to the next or previous unread message (this removes the message that the message was not read)
  3. Go to your posts
What is most interesting, it already works, you only need to turn it on. You can enable, for example, by typing the following in the address bar:

javascript: mc = document.getElementById ('main-content'); mc.innerHTML + = mc.childNodes [5] .data; void 0;


It is interesting that habrarazrabotchiki will tell? ;)



UPD: The greasemonkey rozboris script arrived



UPD2: Another script , while it works only in Opera. The author is GMM


')

Source: https://habr.com/ru/post/38288/



All Articles