Medium underline style

Interesting approach to draw underline from medium by Martin Wichary
text-decoration: none;
background-repeat: repeat-x;
background-image: linear-gradient(to right,rgba(0,0,0,.84) 100%,rgba(0,0,0,0) 0);
background-image: linear-gradient(to right,currentColor 100%,currentColor 0);
background-image: url(data:image/svg+xml;utf8,);
background-size: 1px 1px;
background-position: 0 1.05em;
background-position: 0 calc(1em + 1px);

Javascript Singleton

Ссылки на хорошие материалы по реализации данного паттерна.

singletone

var Singletone = (function () {
	var instance;

	return function Construct_singletone () {
		if (instance) {
			return instance;
		}
		if (this && this.constructor === Construct_singletone) {
			instance = this;
		} else {
			return new Construct_singletone();
		}
	}
}());

И еще:
medium

SCRoulette BUG fixing

Hello everybody!

It’s great to see how you use SCRoulette! More than 60 users.  Great! I see a lot of music. But… there is no limit to perfection. And today I found a bug.

Everybody can add in roulette non-private songs. Also it is possible to delete song from SCRoulette. But when somebody adds song in roulette and delete this song from SoundCloud profile I can not manage this. Also the owner of the deleted song may forget about his/her music in SCRoulette. So, I decided that it is right to delete song if it doesn’t exist. Thankfully to SoundCloud API I can find not existing tracks.

When somebody will start session and if he/she will find not existing track, this track will be deleted, and after a second another track will be available for listening.

 

New statistical parameter in SCRoulette

I’ve just added a new statisitcal parameter in SCRoulette rating.

At this moment this parameter doesn’t affect on anything. It just shows the ratio of number of plays (registered plays when you earn one playpoint) to number of attempts to play. It’s very simple. But I think that this rating parameter will help you to understand what people like or not.

Possible errors with SCRoulette

Few days ago I noticed in statistics of SCRoulette strange URLs, like http://blabla/?err=_err … stuff like that. Obviously, it means that somebody faced with some errors on website. Yes, errors, but why did they appear?

I think, that the only cause of error like that, is the SoundCloud mobile application. And it may appear, when somebody tries to log in using the mobile application. Concrete moment – when browser asks what application do you want to choose to log in:

Choose the application. Android

So, if you whant to log in with mobile app, it seems to me that you’ll not succeed, unfortunatly. Use browser.

P.S. I don’t know how it works with iPhone.

P.P.S. If you found some errors, or you have some ideas about scrouleete, feel free to comment here, on YouTube, Twitter (use #scroulette tag)