Skip to content

Commit c40cf07

Browse files
committed
smaller fixes
1 parent 7e7cb4b commit c40cf07

File tree

6 files changed

+118
-116
lines changed

6 files changed

+118
-116
lines changed

www/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
<!-- FOR MORE STYLESHEETS SEE END-OF-BODY -->
6969
<script src="scripts/sepiaFW.app.config.js"></script>
7070
<script src="scripts/sepiaFW.app.js"></script>
71+
<!-- IE11 Polyfills -->
72+
<script>if (SepiaFW.config.uiIsIE11){ document.write('<script src="scripts/ie11.polyfills.js"><\/script>'); }</script>
7173
<script src="scripts/sepiaFW.local.js"></script>
7274
<script src="settings.js"></script>
7375
<!-- FOR MORE JS SEE END-OF-BODY -->
@@ -408,10 +410,6 @@ <h2><i class="material-icons md-txt">people</i>&nbsp;<script>SepiaFW.local.w('ac
408410
SepiaFW.debug.info("Config - Loaded skin: " + askin + " - Loaded avatar: " + aav);
409411
})();
410412
</script>
411-
<!-- IE11 Polyfills -->
412-
<script>if (SepiaFW.config.uiIsIE11){
413-
document.write('<script src="scripts/ie11.polyfills.js"><\/script>');
414-
}</script>
415413
<!-- START JS -->
416414
<script src="scripts/jquery-3.4.1.min.js"></script>
417415
<!--<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>-->

www/launcher.html

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -32,107 +32,107 @@
3232
<meta property="og:locale" content="en_GB"/>
3333
<meta property="og:locale:alternate" content="en_US"/>
3434
<meta property="og:locale:alternate" content="de_DE"/>
35+
<style>
36+
* {
37+
box-sizing: border-box;
38+
-webkit-tap-highlight-color: transparent;
39+
}
40+
input:focus,
41+
select:focus,
42+
textarea:focus,
43+
button:focus {
44+
outline: none;
45+
}
46+
::-moz-focus-inner {
47+
border:0;
48+
}
49+
html {
50+
font-family: sans-serif;
51+
width: 100%;
52+
height: 100%;
53+
margin: 0;
54+
padding: 0;
55+
background-color: #000;
56+
color: #fff;
57+
}
58+
body {
59+
width: 100%;
60+
height: 100%;
61+
margin: 0;
62+
padding: 0;
63+
position: relative;
64+
text-align: center;
65+
}
66+
section {
67+
width: 100%;
68+
max-width: 360px;
69+
text-align: center;
70+
padding: 16px;
71+
margin: auto;
72+
}
73+
input[type="text"] {
74+
-moz-appearance: none;
75+
-webkit-appearance: none;
76+
appearance: none;
77+
background: transparent;
78+
color: inherit;
79+
border: 0;
80+
border-bottom: 1px solid;
81+
text-align: center;
82+
padding: 5px;
83+
margin-bottom: 5px;
84+
font-size: 14px;
85+
width: 100%;
86+
max-width: 100%;
87+
}
88+
.buttonBlock {
89+
display: flex;
90+
flex-direction: column;
91+
justify-content: center;
92+
align-items: stretch;
93+
}
94+
.buttonBlock button {
95+
border: 0;
96+
border-radius: 3px;
97+
background: #beff1a;
98+
color: #222;
99+
font-size: 16px;
100+
padding: 5px 12px;
101+
margin: 4px 2px;
102+
}
103+
.buttonBlock button:hover {
104+
color: #000;
105+
background: #fff;
106+
}
107+
.buttonBlock select,
108+
.buttonBlock span {
109+
padding: 4px 8px;
110+
}
111+
.buttonBlock label {
112+
padding: 8px 8px;
113+
}
114+
.buttonBlock em {
115+
color: #bef11a;
116+
}
117+
#sepia-load-overlay {
118+
display: flex;
119+
justify-content: center;
120+
align-items: center;
121+
width: 100%;
122+
height: 100%;
123+
min-height: 180px;
124+
position: absolute;
125+
top: 0;
126+
left: 0;
127+
z-index: 100;
128+
background: #000;
129+
}
130+
#sepia-load-overlay.faded {
131+
transition: opacity 1.0s;
132+
opacity: 0;
133+
}
134+
</style>
35135
</head>
36-
<style>
37-
* {
38-
box-sizing: border-box;
39-
-webkit-tap-highlight-color: transparent;
40-
}
41-
input:focus,
42-
select:focus,
43-
textarea:focus,
44-
button:focus {
45-
outline: none;
46-
}
47-
::-moz-focus-inner {
48-
border:0;
49-
}
50-
html {
51-
font-family: sans-serif;
52-
width: 100%;
53-
height: 100%;
54-
margin: 0;
55-
padding: 0;
56-
background-color: #000;
57-
color: #fff;
58-
}
59-
body {
60-
width: 100%;
61-
height: 100%;
62-
margin: 0;
63-
padding: 0;
64-
position: relative;
65-
text-align: center;
66-
}
67-
section {
68-
width: 100%;
69-
max-width: 360px;
70-
text-align: center;
71-
padding: 16px;
72-
margin: auto;
73-
}
74-
input[type="text"] {
75-
-moz-appearance: none;
76-
-webkit-appearance: none;
77-
appearance: none;
78-
background: transparent;
79-
color: inherit;
80-
border: 0;
81-
border-bottom: 1px solid;
82-
text-align: center;
83-
padding: 5px;
84-
margin-bottom: 5px;
85-
font-size: 14px;
86-
width: 100%;
87-
max-width: 100%;
88-
}
89-
.buttonBlock {
90-
display: flex;
91-
flex-direction: column;
92-
justify-content: center;
93-
align-items: stretch;
94-
}
95-
.buttonBlock button {
96-
border: 0;
97-
border-radius: 3px;
98-
background: #beff1a;
99-
color: #222;
100-
font-size: 16px;
101-
padding: 5px 12px;
102-
margin: 4px 2px;
103-
}
104-
.buttonBlock button:hover {
105-
color: #000;
106-
background: #fff;
107-
}
108-
.buttonBlock select,
109-
.buttonBlock span {
110-
padding: 4px 8px;
111-
}
112-
.buttonBlock label {
113-
padding: 8px 8px;
114-
}
115-
.buttonBlock em {
116-
color: #bef11a;
117-
}
118-
#sepia-load-overlay {
119-
display: flex;
120-
justify-content: center;
121-
align-items: center;
122-
width: 100%;
123-
height: 100%;
124-
min-height: 180px;
125-
position: absolute;
126-
top: 0;
127-
left: 0;
128-
z-index: 100;
129-
background: #000;
130-
}
131-
#sepia-load-overlay.faded {
132-
transition: opacity 1.0s;
133-
opacity: 0;
134-
}
135-
</style>
136136
<body >
137137
<!-- Main -->
138138
<div id="sepia-load-overlay">

www/scripts/ie11.polyfills.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(function(){
2-
if (typeof window.CustomEvent === "function") return false;
3-
function CustomEvent (event, params){
4-
params = params || { bubbles: false, cancelable: false, detail: null };
5-
var evt = document.createEvent('CustomEvent');
6-
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
7-
return evt;
8-
}
9-
window.CustomEvent = CustomEvent;
10-
2+
//CustomEvent
3+
if("function"!=typeof window.CustomEvent){window.CustomEvent=function(a,b){b=b||{bubbles:!1,cancelable:!1,detail:null};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}}
4+
//Number.parseInt
115
if (Number.parseInt === undefined) Number.parseInt = window.parseInt;
12-
})();
6+
//Object.values
7+
if (!Object.values) Object.values = function(o){ return Object.keys(o).map(function(k){ return o[k]; }); }
8+
//Array.find
9+
Array.prototype.find||(Array.prototype.find=function(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var b,c=Object(this),d=c.length>>>0,e=arguments[1],f=0;f<d;f++)if(b=c[f],a.call(e,b,f,c))return b});
10+
})();

www/scripts/sepiaFW.app.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function sepiaFW_build_config(){
7575
return path;
7676
}
7777

78-
//language
78+
//language (Note: account settings will overwrite URL param)
7979
var lang = SepiaFW.tools.getURLParameter("lang") || SepiaFW.data.get('app-language') || navigator.language || navigator.userLanguage || "en";
8080
lang = lang.toLowerCase().replace(/-.*/, "");
8181
Config.appLanguage = lang;
@@ -201,6 +201,11 @@ function sepiaFW_build_config(){
201201
if (SepiaFW.geocoder) SepiaFW.geocoder.setLanguage(language);
202202
//menue
203203
$('#sepiaFW-menu-account-language-li').find('select').val(language);
204+
//URL
205+
if (window.history && window.history.replaceState && SepiaFW.tools.getURLParameter("lang")){
206+
var url = SepiaFW.tools.setParameterInURL(window.location.href, "lang", language);
207+
window.history.replaceState(history.state, document.title, url);
208+
}
204209
//log and save
205210
SepiaFW.data.updateAccount('language', language);
206211
SepiaFW.data.set('app-language', language);

www/scripts/sepiaFW.assistant.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ function sepiaFW_build_assistant(sepiaSessionId){
130130
prefSearchEngine: (SepiaFW.config.getPreferredSearchEngine() || "google"),
131131
deviceLocalSite: SepiaFW.config.getDeviceLocalSiteData()
132132
//TODO: add 'SepiaFW.config.isUiHeadless' info ? Or rely on 'env' parameter?
133+
//TODO: add region parameter for language
133134
};
134135
State.custom_data = JSON.stringify(cd);
135136

www/scripts/sepiaFW.audio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ function sepiaFW_build_audio(){
591591
SepiaFW.speech.getTtsStreamURL(message, function(audioUrl){
592592
SepiaFW.debug.info("TTS audio url: " + audioUrl);
593593
AudioPlayer.playURL(audioUrl, speaker, onStartCallback, onEndCallback, onErrorCallback);
594-
}, onErrorCallback);
594+
}, onErrorCallback, options);
595595
}
596596
TTS.stop = function(){
597597
AudioPlayer.stop(speaker);

0 commit comments

Comments
 (0)