Spotify web client minimized mode bookmarklet

I was playing around with casting spotify from Chrome to Chromecast, and disliked the cluttered interface here’s a bookmarklet that can be dragged to the bookmarks bar.  When clicked, it toggles the interface to show a more minimal look.  

SpotMini

spotSm

Here’s the code:
if (typeof spotTgShown == 'undefined') {
var spotTgShown = true;
};

function spotTg() {
if (spotTgShown){
spotTgShown = false;
spotSm();
} else {
spotTgShown = true;
spotLg();
}
};

function spotSm() {
$('now-playing').setStyle('right', 'auto').setStyle('left', '0');
$('main-nav').setStyle('visibility', 'hidden');
$('main').setStyle('visibility', 'hidden');
$('suggest-area').setStyle('visibility', 'hidden');
$('now-playing-widgets').setStyle('visibility', 'hidden');
$('now-playing').setStyle('width', '100%');
$$('body').setStyle('overflow', 'hidden');
$('wrapper').setStyle('min-width', '0px');
};

function spotLg() {
$('now-playing').setStyle('left', 'auto').setStyle('right', '0');
$('main-nav').setStyle('visibility', 'visible');
$('main').setStyle('visibility', 'visible');
$('suggest-area').setStyle('visibility', 'visible');
$('now-playing-widgets').setStyle('visibility', 'visible');
$('now-playing').setStyle('width', '');
$$('body').setStyle('overflow', '')
$('wrapper').setStyle('min-width', '');
};
spotTg();


Cast audio only from Google Chrome to Chromecast

This is a not particularly satisfying work around, but it seems to work.

My issue was that the Google Cast extension and GPU processing in Chrome were hammering my CPU and the audio from Spotify was choppy.  If only there was a way to have audio only.  Well there is, kind of.  Take your tab into a new window and reduce the window size to nothing.  This caused my CPU usage to drop dramatically, and the audio streams nicely now.  My TV just displays a thin grey line accross the center of the screen, which I assume is the single pixel of my window or something.  I’m pretty happy with that.  

tinyChrome
Changing tracks is a pain in the ass…

Samsung TV average selling prices by day on eBay

I always assumed that everyone bought everything on eBay on a Sunday, as they had nothing better to do. Realising this was utterly unfounded, I decided to do a little (not hugely scientific) research. I gathered the average selling price for the last 200 Samsung TVs to sell on eBay for various sizes. Here’s a chart of the results.

tvSellingPricesByDay

A
s  you can see, it doesn’t seem to make any difference what day the item finishes.  More expensive items seem to have more volatility though.  Also, larger TVs are more expensive.  

The reason I chose only Samsung was to limit the number of results, in an attempt to gather data over a longer time period (without expending to much effort).  I used this bookmarklet to gather the data.  

Average selling price for completed eBay items on each day of the week

Here’s a bookmarklet to let you know what the average price of items shown in eBay was on each day of the week.

  1. Drag eBayDayAvg to your address bar.
  2. Navigate to a completed and sold page on eBay.
  3. Click on the bookmarklet.

It’s probably best to run it on a page with the max results as high as possible, and try it on a few pages.  Also limit the page to display the most relevant items.

eBayDayAvg

Here’s the code:

msg = '';
days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
items = {0:[],1:[],2:[],3:[],4:[],5:[],6:[]};
$('.sresult ').each(function() {
 title = $(this).find('.lvtitle').text();
 if (!(title.includes('fault') || title.includes('spare') || title.includes('issue') || title.includes('damage'))){
 price = parseFloat($(this).find('.lvprice').text().replace('£', ''));
 date = new Date(Date.parse($(this).find('.timeleft').text() + ' ' + new Date().getFullYear()));
 items[date.getDay()].push(price);
 }
});
for(item in items) {
 if (items[item].length > 0) {
 msg += days[item] + ': ' + items[item].reduce(function(a, b){return a+b;}) / items[item].length + '\r\n'
 }
};
alert(msg)