📜 ⬆️ ⬇️

Means of Small Mechanization for Karmagraf

I think that many people know the Karmagraf and use it. At the same time, for me personally, the most frequent usage scenario is, oddly enough, not to admire the growth of my karma, but to see the recent changes in the karma of another user (a typical example is written in some post PS “stop screaming my karma, and so already a minus! ", I go to check into the habcenter of this user - and there are +50 karmas. think about it, this is how he’s thrown in a couple of hours, or is he just a liar-beggar). And everything would be fine, but to drive in each time manually (or copy-paste) the name of this user in Karmagraf is somehow annoying. Remembering that there is such a thing as a bookmark and having spent 20 minutes refreshing the memory of how to work with strings in Javascript, gave birth to this:

javascript:l=window.location.href;i=l.indexOf('.habrahabr.ru');if(i!=-1){window.open('http://karma.goodrone.org.ru/manage/add/'+l.substring(7,i).replace(/-/g,'_'));}void(0);

Since javascript in links to Habré is rezhesya, then instead of just dragging the link to the bookmarks panel, you need to create a bookmark manually, by registering the javascript given by me as a link.

How to use
Having got the desire to see the karma history of some habrauser, we go to its habracenter and open the bookmark, made with our own hands in the previous paragraph. A page with a karmagraf will open and you will be able to expose a karmoproshchika with good reason.
')
Features
  1. It is possible to cause the karmagraf from any page of habracenter - if only the name of the user went before habrahabr.ru.
  2. Karmagraf opens in a new window or tab (I don’t like it when the curtains spoil the page that I’m currently open).
  3. If the user has not been previously monitored, then Karmagraf will ask whether to start following him.
  4. If you try to open this bookmark not from other sites, but from some other place, nothing will happen.
  5. If the user name has an underscore (converted to a minus in the address of the habracenter), then it will be correctly processed. If there are many underscores, then everything will be correct too (thanks to monsterzz ).

Known bugs
Not yet.

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


All Articles