<commit_before>//quick & dirty theme switcher, written to potentially work as a bookmarklet
(function($){
	$.themeswitcher = function(){
		var themesDir = 'http://jquerymobile.com/test/themes/',
			themes = ['default','dobson'],
			currentPage = $('.ui-page-active'),
			menuPage = $( '<div data-role=\'dialog\' data-theme=\'a\'>' +
						'<div data-role=\'header\' data-theme=\'b\'>' +
							'<a href=\'#\' class=\'ui-btn-left\' data-icon=\'delete\'>Cancel</a>'+
							'<div class=\'ui-title\'>Choose a theme:</div>'+
						'</div>'+
						'<div data-role=\'content\' data-theme=\'c\'><ul data-role=\'listview\' data-inset=\'true\'></ul></div>'+
					'</div>' )
					.appendTo( 'body' ),
			menu = menuPage.find('ul');	
		
		//menu items	
		$.each(themes, function( i ){
			$('<li><a href=\'#\'>' + themes[ i ] + '</a></li>')
				.click(function(){
					addTheme( themes[i] );
					done();
					return false;
				})
				.appendTo(menu);
		});	
		
		//remover, adder
		function addTheme(theme){
			/*
			//way too greedy theme remover
			$.each(themes,function( i ){
				$('head link[href*='+themes[ i ]+']').remove();
			});
			*/
			$('head').append( '<link rel=\'stylesheet\' href=\''+ themesDir + theme +'/\' />' );
		}
		
		//finished with this
		function done(){
			$.changePage(menuPage, currentPage, 'slideup', true);
			menuPage.bind('pagehide',function(){
				$(this).remove();
			});
			return false;
		}
		
		//create page, listview
		menuPage.page();
		
		//change page now	
		$.changePage(currentPage, menuPage, 'slideup', false);
		
		//destroy
		menuPage.find('.ui-btn-left').click(done);
	};	
})(jQuery);<commit_msg>edits to themeswitcher<commit_after>//quick & dirty theme switcher, written to potentially work as a bookmarklet
(function($){
	$.themeswitcher = function(){
		var themesDir = 'http://jquerymobile.com/test/themes/',
			themes = ['default','dobson'],
			currentPage = $('.ui-page-active'),
			menuPage = $( '<div data-role=\'dialog\' data-theme=\'a\'>' +
						'<div data-role=\'header\' data-theme=\'b\'>' +
							'<a href=\'#\' class=\'ui-btn-left\' data-icon=\'delete\' data-iconpos=\'notext\'>Cancel</a>'+
							'<div class=\'ui-title\'>Switch Theme:</div>'+
						'</div>'+
						'<div data-role=\'content\' data-theme=\'c\'><ul data-role=\'listview\' data-inset=\'true\'></ul></div>'+
					'</div>' )
					.appendTo( 'body' ),
			menu = menuPage.find('ul');	
		
		//menu items	
		$.each(themes, function( i ){
			$('<li><a href=\'#\'>' + themes[ i ] + '</a></li>')
				.click(function(){
					addTheme( themes[i] );
					done();
					return false;
				})
				.appendTo(menu);
		});	
		
		//remover, adder
		function addTheme(theme){
			$('head').append( '<link rel=\'stylesheet\' href=\''+ themesDir + theme +'/\' />' );
		}
		
		//finished with this
		function done(){
			$.changePage(menuPage, currentPage, 'pop', true);
			menuPage.bind('pagehide',function(){
				menuPage.remove();
			});
			return false;
		}
				
		//destroy
		menuPage.find('.ui-btn-left').click(done);
		
		//create page, listview
		menuPage.page();
		
		//change page now	
		$.changePage(currentPage, menuPage, 'pop', false);
	};	
})(jQuery);
{'fraction_non_alphanumeric': 0.23994935106046217, 'fraction_numerical': 0.0, 'mean_word_length': 2.9205955334987594, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '2138824', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1098, 'n_words': 214}