mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-28 18:50:08 +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>
|
||||
<head>
|
||||
<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-themes.css">
|
||||
@ -758,6 +759,9 @@ $(document).ready(function(){
|
||||
NOTE: this is not an actual configuration page, just a live demo
|
||||
of some of the available configuration option effects.
|
||||
</p>
|
||||
<p>
|
||||
<a id="downloader" download="magazine.json">download magazine...</a>
|
||||
</p>
|
||||
|
||||
<hr noshade color="silver">
|
||||
|
||||
@ -905,13 +909,6 @@ $(document).ready(function(){
|
||||
<td id="FingersSupported">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Browser info:
|
||||
</td>
|
||||
<td id="BrowserInfo">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
User Agent:
|
||||
@ -975,6 +972,7 @@ $(document).ready(function(){
|
||||
USE_REAL_PAGE_SIZES = $('#USE_REAL_PAGE_SIZES').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
|
||||
|
||||
}
|
||||
function loadSettings(){
|
||||
$('#transition_duration').attr('value', TRANSITION_DURATION)
|
||||
@ -992,6 +990,7 @@ $(document).ready(function(){
|
||||
var b = $('#BrowserInfo')
|
||||
$.each($.browser, function(i, e){$('<div>'+i+': '+e+'</div>').appendTo(b)})
|
||||
$('#UserAgent').text(navigator.userAgent)
|
||||
|
||||
}
|
||||
function toggleSetting(obj){
|
||||
obj = $(obj)
|
||||
@ -1003,6 +1002,14 @@ $(document).ready(function(){
|
||||
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user