mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 03:50:16 +00:00 
			
		
		
		
	moved to native base64 support and added json download...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									c8179cbd93
								
							
						
					
					
						commit
						5edcebce62
					
				
							
								
								
									
										21
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								index.html
									
									
									
									
									
								
							| @ -3,6 +3,7 @@ | |||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title>PortableMag</title> | <title>PortableMag</title> | ||||||
|  | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" href="magazine.css"> | <link rel="stylesheet" href="magazine.css"> | ||||||
| <link rel="stylesheet" href="magazine-themes.css"> | <link rel="stylesheet" href="magazine-themes.css"> | ||||||
| @ -758,6 +759,9 @@ $(document).ready(function(){ | |||||||
| 					NOTE: this is not an actual configuration page, just a live demo  | 					NOTE: this is not an actual configuration page, just a live demo  | ||||||
| 					of some of the available configuration option effects. | 					of some of the available configuration option effects. | ||||||
| 					</p> | 					</p> | ||||||
|  | 					<p> | ||||||
|  | 						<a id="downloader" download="magazine.json">download magazine...</a> | ||||||
|  | 					</p> | ||||||
| 
 | 
 | ||||||
| 					<hr noshade color="silver"> | 					<hr noshade color="silver"> | ||||||
| 
 | 
 | ||||||
| @ -905,13 +909,6 @@ $(document).ready(function(){ | |||||||
| 							<td id="FingersSupported"> | 							<td id="FingersSupported"> | ||||||
| 							</td> | 							</td> | ||||||
| 						</tr> | 						</tr> | ||||||
| 						<tr> |  | ||||||
| 							<td> |  | ||||||
| 								Browser info:  |  | ||||||
| 							</td> |  | ||||||
| 							<td id="BrowserInfo"> |  | ||||||
| 							</td> |  | ||||||
| 						</tr> |  | ||||||
| 						<tr> | 						<tr> | ||||||
| 							<td> | 							<td> | ||||||
| 								User Agent:  | 								User Agent:  | ||||||
| @ -975,6 +972,7 @@ $(document).ready(function(){ | |||||||
| 						USE_REAL_PAGE_SIZES = $('#USE_REAL_PAGE_SIZES').text() == 'true' ? true : false | 						USE_REAL_PAGE_SIZES = $('#USE_REAL_PAGE_SIZES').text() == 'true' ? true : false | ||||||
| 						UPDATE_HASH_URL_POSITION = $('#UPDATE_HASH_URL_POSITION').text() == 'true' ? true : false | 						UPDATE_HASH_URL_POSITION = $('#UPDATE_HASH_URL_POSITION').text() == 'true' ? true : false | ||||||
| 						FULL_HISTORY_ENABLED = $('#FULL_HISTORY_ENABLED').text() == 'true' ? true : false | 						FULL_HISTORY_ENABLED = $('#FULL_HISTORY_ENABLED').text() == 'true' ? true : false | ||||||
|  | 
 | ||||||
| 					} | 					} | ||||||
| 					function loadSettings(){ | 					function loadSettings(){ | ||||||
| 						$('#transition_duration').attr('value', TRANSITION_DURATION) | 						$('#transition_duration').attr('value', TRANSITION_DURATION) | ||||||
| @ -992,6 +990,7 @@ $(document).ready(function(){ | |||||||
| 						var b = $('#BrowserInfo') | 						var b = $('#BrowserInfo') | ||||||
| 						$.each($.browser, function(i, e){$('<div>'+i+': '+e+'</div>').appendTo(b)}) | 						$.each($.browser, function(i, e){$('<div>'+i+': '+e+'</div>').appendTo(b)}) | ||||||
| 						$('#UserAgent').text(navigator.userAgent) | 						$('#UserAgent').text(navigator.userAgent) | ||||||
|  | 
 | ||||||
| 					} | 					} | ||||||
| 					function toggleSetting(obj){ | 					function toggleSetting(obj){ | ||||||
| 						obj = $(obj) | 						obj = $(obj) | ||||||
| @ -1003,6 +1002,14 @@ $(document).ready(function(){ | |||||||
| 
 | 
 | ||||||
| 					loadSettings() | 					loadSettings() | ||||||
| 
 | 
 | ||||||
|  | 					// setup the link... | ||||||
|  | 					$('#downloader') | ||||||
|  | 					.attr('href','data:text/octet-stream;base64,'+btoa( | ||||||
|  | 							JSON.stringify(buildJSON(true, true)) | ||||||
|  | 								// this is a really odd one, Chrome seems to replace some  | ||||||
|  | 								// entities with actual chars... | ||||||
|  | 								.replace(/–/g, '–'))) | ||||||
|  | 
 | ||||||
| 					</script> | 					</script> | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user