21 August 2014

Shakes & Fidget jQuery script for AlbumHelper

Since I currently "play" game 'Shakes & Fidget' with some friends I wrote (hopefully) useful script for AlbumHelper (sftools.net). Script helps to find players who have most items for your album.



  • Evaluate your album (tutorial for that is there - sftools.net)
  • Open all "tabs" with items (except monsters)
  • Open browser's Developer Tools ( Ctrl+Shift+I for Windows or Cmd+Opt+I for Mac and bring focus to the Console tab
  • Copy & Paste script below to the console and press enter
  • You can change 'min_amount' variable to players with more than 1 items for your album

Script writes list of players to the console with corresponding amounts of items for your album.

var min_amount = 1;
var final = {};
$("a.albItmHasN").each( function() {
	var tmp = $(this).attr("onclick").split(',')[1];
	var splitted = tmp.split('<br>');
	$.each( splitted, function(ind, val) {
		var player = val.split(' [')[0];
		player = player.replace("'","");
		if ( player in final ) {
			final[player] += 1;
		} else {
			final[player] = 1;
		}
	} );	
} );
delete final["')"];
delete final[")"];
$.each( final, function(k, v) { 
		if ( v >= min_amount )
			console.log( k + " => " + v );
	}
);