User:Joeytje50/GEVolumes.js

//script for updating GE volumes on /Data pages

function yqlUrl(u) { return 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20%3D%20"'+encodeURIComponent(u)+'"%20and%20xpath%3D"*"&format=xml&callback=?' }

window._vol = {};

$.ajax({	url: yqlUrl('http://services.runescape.com/m=itemdb_rs/top100.ws'),	success: function(result) {		_vol.HTML = result.results[0];		_vol.tablestr = _vol.HTML.substring(_vol.HTML.match(//).index);		_vol.table = $(_vol.tablestr).children('tbody');		console.log(_vol);	},	dataType: 'json', })