A few days ago I read the article “How Much Is Rebecca Black Making From Friday?” on Mashable. It included an interesting information:

According to Forbes columnist Chris Barth, YouTube makes about $1 per thousand page views, of which content creators like Black (and Ark Music Factory, the Los Angeles-based producer that wrote the tune) get 68% of the profit.

Based on that the formula to calculate the profit a content creator makes is: Profit = Views / 1000 * 0.68

Now let’s put that in in a small UserScript which inserts this number to YouTube. It will work on channel pages and normal video pages. However you need to have Greasemonkey installed to make it work.

Click here to install it.

// ==UserScript==
// @name           YTProfit
// @namespace      bananenpelle.de
// @include        http://www.youtube.com/watch?*
// @include        http://www.youtube.com/user/*
// @require        http://code.jquery.com/jquery-1.5.min.js
// ==/UserScript==
(function($) {
	$(document).ready(function(){
		var reference = '<a href="http://mashable.com/2011/03/26/rebecca-black-friday/" target="_blank">*</a>';
		// http://www.youtube.com/watch?*
		var elem1 = $('#watch-description-extras');
		if (elem1 != null) {
			elem1.append($('
<h4>Profit:</h4>
~'+calcProfit($('.watch-view-count strong').html())+'$'+reference+'

'));
		}
		// http://www.youtube.com/user/*
		var elem2 = $('.profile_info');
		if (elem2 != null) {
			elem2.append($('
<div class="show_info outer-box-bg-as-border">
<div class="profile-info-label">Profit:</div>
<div id="profile_show_total_video_views" class="profile-info-value">~'+
				calcProfit($('#profile_show_total_video_views').html())+'$'+reference+'</div>
'));
		}
	});
	function calcProfit(views_str) {
		if (views_str != null && views_str != '') {
			// parse & calculate & round
			views_str = views_str.replace(/[,. ]/g, '');
			views_str = new Number(parseInt(views_str) / 1000 * 0.68).toFixed(2);
			// add commas
			var p = views_str.split('.'),
				ip = p[0],
				rgip = /(\d+)(\d{3})/;
			while (rgip.test(ip)) {
				ip = ip.replace(rgip, '$1'+','+'$2');
			}
			return ip + (p.length > 1 ? '.' + p[1] : '');
		}
		return '-/-'
	}
	function log(obj) { unsafeWindow.console.log(obj); }
})(jQuery);