User:DannyS712 test/permalink.js

$(document).ready( function {   	$('#t-permalink > a').each( function { this.href = 'javascript:window.permalink("' + this.href + '")'; }  	); } ); window.permalink = function( href ){ var section = window.location.href.match(/#.*$/); if ( section && section[0] ) { href = href + section[0]; }   location.href = href; };