📜 ⬆️ ⬇️

Habrometer Widget for Dashboard

All good habradnya!

Based on my recent post about creating widgets for dashboards, I decided to create another simple widget. He can only display the selected habrometer in the user settings.


')
Download the archive with the widget
Github sources

He is very simple! Just one picture downloaded from the network, and a username input field. But during the creation, I still had to face the problem - the url of the image is always the same, and the caches dashboard it (setting <meta http-equiv="Cache-Control" content="no-cache"> for some reason did not help). But it costs quite simply: a random parameter is added to the url of the picture, for example http://habrometr.ru/habrometr_425x120_alizar.png?rand=1986522 . Thanks to the creator of the feedbee habrometer for ignoring the request parameters (and for the habrometer itself)! =)

I wondered for a long time whether such a “hand-made article” deserved a separate article, but I decided that if it would hang, it could be useful to someone. By the way, it looks good next to the widget from my previous article.

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


All Articles