Skip to content

Commit

Permalink
proxy safari and msie 7/8/9; remove trailing commas form language files
Browse files Browse the repository at this point in the history
  • Loading branch information
jywsn committed Jun 24, 2014
1 parent 7949b13 commit c7d5a40
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 18 deletions.
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
"src": "source",
"dst": "build",
"regex": "(css/.*|img/.*|.*\\.(ico|html)|gfx/.*\\.(png|jpg|gif))$"
},
{
"src": "libs/json2.min.js",
"dst": "build/js/json2.min.js"
}
],
// compile less files
Expand Down
21 changes: 21 additions & 0 deletions libs/json2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions source/embed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<!-- build:js ../js/storymap-min.js -->
<script type="text/javascript" src="/build/js/storymap.js"></script>
<!-- endbuild -->
<!-- build:js ../js/json2.min.js -->
<script type="text/javascript" src="/build/js/json2.min.js"></script>
<!-- endbuild -->
<style>
html, body {
width: 100%;
Expand Down Expand Up @@ -93,12 +96,19 @@
var params = parseQuerystring();
var storymap_url = decodeURIComponent(params['url']);

// proxy?
/*
if(storymap_url.match(/www\.googledrive\.com\/host\//)) {
storymap_url = 'http://proxy.knightlab.com/'+storymap_url.split('://')[1];
// proxy safari and IE9
trace(navigator.userAgent);
trace(!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/));
trace(!!navigator.userAgent.toLowerCase().match(/msie [789]/));

if(!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)
|| !!navigator.userAgent.toLowerCase().match(/msie [789]/)) {
if(storymap_url.match(/^https?:\/\/www\.googledrive\.com\/host\//)) {
storymap_url = location.protocol+'//proxy.knightlab.com/'+storymap_url.split('://')[1];
trace('proxy, '+storymap_url);
}
}
*/

var options = {
script_path: getScriptPath(/storymap(-min)?\.js/),
start_at_slide: 0,
Expand Down Expand Up @@ -163,7 +173,9 @@
xdr.onload = function() {
storymap_onload(JSON.parse(xdr.responseText));
};
xdr.onerror = function() { /* doit */ };
xdr.onerror = function() {
trace('embed: error loading data via XDomainRequest');
};
xdr.onprogress = function() {};
xdr.open("get", storymap_url);
xdr.send();
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/VCO.Language.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "en",
messages: {
loading: "Loading",
wikipedia: "From Wikipedia, the free encyclopedia",
wikipedia: "From Wikipedia, the free encyclopedia"
},
buttons: {
map_overview: "Map Overview",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "de",
messages: {
loading: "Daten werden geladen",
wikipedia: "von Wikipedia, der freien Enzyklopädie",
wikipedia: "von Wikipedia, der freien Enzyklopädie"
},
buttons: {
map_overview: "Kartenübersicht",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "es",
messages: {
loading: "cargando",
wikipedia: "de Wikipedia, la enciclopedia libre",
wikipedia: "de Wikipedia, la enciclopedia libre"
},
buttons: {
map_overview: "vista general del mapa",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "fr",
messages: {
loading: "Chargement",
wikipedia: "Extrait de Wikipédia, l'encyclopédie libre",
wikipedia: "Extrait de Wikipédia, l'encyclopédie libre"
},
buttons: {
map_overview: "Vue d'ensemble de la carte",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "it",
messages: {
loading: "caricare",
wikipedia: "da Wikipedia, la enciclopedia libera",
wikipedia: "da Wikipedia, la enciclopedia libera"
},
buttons: {
map_overview: "vista generale della mappa",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/jp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "jp",
messages: {
loading: "ローディング",
wikipedia: "フリー百科事典ウィキペディア(Wikipedia)から",
wikipedia: "フリー百科事典ウィキペディア(Wikipedia)から"
},
buttons: {
map_overview: "概観地図",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/no.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "no",
messages: {
loading: "Laster inn",
wikipedia: "fra Wikipedia, den frie encyklopedi",
wikipedia: "fra Wikipedia, den frie encyklopedi"
},
buttons: {
map_overview: "Se oversiktskart",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "pl",
messages: {
loading: "Wczytuję",
wikipedia: "z Wikipedii, wolnej encyklopedii",
wikipedia: "z Wikipedii, wolnej encyklopedii"
},
buttons: {
map_overview: "Przeglądaj mapę",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/sr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lang: "sr",
messages: {
loading: "Učitavanje",
wikipedia: "Wikipedia",
wikipedia: "Wikipedia"
},
buttons: {
map_overview: "Pregled mapę",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "sv",
messages: {
loading: "Laddar",
wikipedia: "Från Wikipedia, den fria encyklopedin",
wikipedia: "Från Wikipedia, den fria encyklopedin"
},
buttons: {
map_overview: "Översiktskarta",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/zh-cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "zh-cn",
messages: {
loading: "加载中",
wikipedia: "来自维基百科,自由的百科全书",
wikipedia: "来自维基百科,自由的百科全书"
},
buttons: {
map_overview: "地图总览",
Expand Down
2 changes: 1 addition & 1 deletion source/js/language/locale/zh-tw.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VCO.Language = {
lang: "zh-tw",
messages: {
loading: "載入中",
wikipedia: "來自維基百科,自由的百科全書",
wikipedia: "來自維基百科,自由的百科全書"
},
buttons: {
map_overview: "地圖總覽",
Expand Down

0 comments on commit c7d5a40

Please sign in to comment.