dont write localStorage without a catch, fix embeds without third party cookies

This commit is contained in:
j 2013-03-22 10:02:22 +00:00
parent 4c8b628584
commit 7e593ad221
3 changed files with 15 additions and 6 deletions

View file

@ -9,8 +9,11 @@
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" /> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" /> <link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" />
<script> <script>
if (localStorage && !localStorage['Ox.theme']) try {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"'; if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script> </script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script> <script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}" /> <meta name="title" content="{{title}}" />

View file

@ -9,8 +9,11 @@
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" /> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" /> <link rel="alternate" type="application/atom+xml" title="{{settings.SITENAME}}" href="/atom.xml" />
<script> <script>
if (localStorage && !localStorage['Ox.theme']) try {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"'; if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script> </script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script> <script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}" /> <meta name="title" content="{{title}}" />

View file

@ -9,8 +9,11 @@
<link rel="alternate" type="application/json+oembed" href="{{base_url}}oembed?url={{current_url|urlencode}}" title="oEmbed Profile" /> <link rel="alternate" type="application/json+oembed" href="{{base_url}}oembed?url={{current_url|urlencode}}" title="oEmbed Profile" />
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" /> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="{{settings.SITENAME}}" />
<script> <script>
if (localStorage && !localStorage['Ox.theme']) try {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"'; if (localStorage && !localStorage['Ox.theme']) {
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
}
} catch(e) {}
</script> </script>
<script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script> <script type="text/javascript" src="/static/js/pandora.js?{{settings.CONFIG.site.version}}"></script>
<meta name="title" content="{{title}}" /> <meta name="title" content="{{title}}" />