<commit_before>GetOption( [ 'button-gamehub' ], function( items )
{
	if( items[ 'button-gamehub' ] === true )
	{
		return;
	}
	
	var element, container = document.querySelector( '.apphub_OtherSiteInfo' );
	
	if( container )
	{
		// Are we in a hacky game group with a custom url?
		if( GetCurrentAppID() === -1 )
		{
			element = document.querySelector( '.apphub_sectionTab' );
			
			CurrentAppID = element.href.match( /\/([0-9]{1,6})\/?/ );
			CurrentAppID = CurrentAppID ? CurrentAppID[ 1 ] : -1;
		}
		
		if( GetCurrentAppID() > -1 )
		{
			var text = document.createElement( 'span' );
			text.appendChild( document.createTextNode( 'Steam Database' ) );
			
			element = document.createElement( 'a' );
			element.className = 'btn_darkblue_white_innerfade btn_medium';
			element.target = '_blank';
			element.href = GetHomepage() + 'app/' + GetCurrentAppID() + '/';
			element.appendChild( text );
			
			container.insertBefore( element, container.firstChild );
		}
	}
	else
	{
		container = document.getElementById( 'rightActionBlock' );
		
		// Are we in an official game group?
		if( container )
		{
			// Are we in a hacky game group with a custom url?
			if( GetCurrentAppID() === -1 )
			{
				// Try to find game hub link, what possibly could go wrong?
				element = document.querySelector( 'a[href*="http://steamcommunity.com/app/"]' );
				
				// Let's just hope this doesn't break
				CurrentAppID = element.href.match( /\/([0-9]{1,6})\/?/ )[ 1 ];
			}<commit_msg>Fix v6 button on community hubs<commit_after>GetOption( [ 'button-gamehub' ], function( items )
{
	if( items[ 'button-gamehub' ] === true )
	{
		return;
	}
	
	var element, container = document.querySelector( '.apphub_OtherSiteInfo' );
	
	if( container )
	{
		// Are we in a hacky game group with a custom url?
		if( GetCurrentAppID() === -1 )
		{
			element = document.querySelector( '.apphub_sectionTab' );
			
			CurrentAppID = element.href.match( /\/([0-9]{1,6})\/?/ );
			CurrentAppID = CurrentAppID ? CurrentAppID[ 1 ] : -1;
		}
		
		if( GetCurrentAppID() > -1 )
		{
			var text = document.createElement( 'span' );
			text.appendChild( document.createTextNode( 'Steam Database' ) );
			
			element = document.createElement( 'a' );
			element.className = 'btnv6_blue_hoverfade btn_medium';
			element.target = '_blank';
			element.href = GetHomepage() + 'app/' + GetCurrentAppID() + '/';
			element.appendChild( text );
			
			container.insertBefore( element, container.firstChild );
		}
	}
	else
	{
		container = document.getElementById( 'rightActionBlock' );
		
		// Are we in an official game group?
		if( container )
		{
			// Are we in a hacky game group with a custom url?
			if( GetCurrentAppID() === -1 )
			{
				// Try to find game hub link, what possibly could go wrong?
				element = document.querySelector( 'a[href*="http://steamcommunity.com/app/"]' );
				
				// Let's just hope this doesn't break
				CurrentAppID = element.href.match( /\/([0-9]{1,6})\/?/ )[ 1 ];
			}
{'fraction_non_alphanumeric': 0.15633423180592992, 'fraction_numerical': 0.010107816711590296, 'mean_word_length': 3.0782967032967035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1681331', 'n_tokens_mistral': 1139, 'n_tokens_neox': 969, 'n_words': 245}