Manage sharing and likes on Habryaks

    In connection with the site’s additions related to the Google Plus button, by which the reader can publish the link and comment on the article from Habr on his Google account, it was necessary to supplement the logic for displaying buttons in user script. He, as you know , still showed a like button (Google-plus-one).

    At the same time, these Google buttons - like and share - are a little redundant, although they perform different functions. Using the new site button, the reader can quickly write a review (the input field is no more than 7 lines high, designed for small comments), to which a link and 2 lines of the beginning of the article are attached.


    Then, if the format of the review does not suit, the reader can edit the message at home. After all, the first 2 lines of the article’s quote are not enough to reflect its meaning, and a tattered comment looks ineffective in the eyes of blog readers:


    Indeed, is the citation button really necessary if you can get to the exact same button for creating a review with 2 clicks: first on the profile icon:


    Then on the upper right - on the “Share” button:


    Then click on adding a link and entering a link if you need the same format with quoting the first 2 lines. There are more actions, it seems, but often it turns out that 2 lines are not enough, you have to insert a quote in your text. And then the close field of the short review still becomes insufficient, and you need to go to the main page (link at the top left, with the “+” symbol), where the input field can expand many lines down.

    Therefore, to satisfy the tastes and needs of any reader, the user’s script settings have the 4th setting for hiding any sharing buttons and their combinations:


    When you select all 4 checkboxes, sharing buttons disappear:


    If desired, the fifth checkbox also hides Google’s information like button. Like buttons strain the Internet channel with requests (20 KB per button), but a little information about the number of likes gives some new statistics about interest in the article.

    Innovations will work in the next version of the HabrAjax script (0.84 onwards). Quite small changes were made to the styles of ZenComment .

    More about Google on Habré and Habré on Google


    Today, Google’s topic (for information on Habr in general) was reflected in another innovation - the ability to connect yourself as the author of an article to Google ’s search results along with his article on Habré.

    Recently, Google-plus changed the design of both the plus buttons (which everyone noticed, they turned red), and its user pages, which is described in the article " Updated google plus interface ". Among the sections you can see the new section “Pages” (under the “More” button) and the new section “Hangouts” - a place for “fables” on the topic of published news.
    UPD 04/21/2012, 5:00 PM: another feature of the site on Google Plus: registered authors have a link to the page in G + next to their signature:

    Also popular now: