Commit 150cf17a authored by derchris's avatar derchris

remove google resources

parent 001bf956
......@@ -3,7 +3,7 @@
* Copyright 2013-2020, Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-landing-page/blob/master/LICENSE)
*/
@import "https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic";
@import "/assets/fonts/Lato.css";
/*!
* Bootstrap v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
......
......@@ -2,35 +2,35 @@
font-family: 'Lato';
font-style: italic;
font-weight: 300;
src: url(https://fonts.gstatic.com/s/lato/v17/S6u_w4BMUTPHjxsI9w2_Gwfo.ttf) format('truetype');
src: url(/assets/fonts/S6u_w4BMUTPHjxsI9w2_Gwfo.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/lato/v17/S6u8w4BMUTPHjxsAXC-v.ttf) format('truetype');
src: url(/assets/fonts/S6u8w4BMUTPHjxsAXC-v.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 700;
src: url(https://fonts.gstatic.com/s/lato/v17/S6u_w4BMUTPHjxsI5wq_Gwfo.ttf) format('truetype');
src: url(/assets/fonts/S6u_w4BMUTPHjxsI5wq_Gwfo.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 300;
src: url(https://fonts.gstatic.com/s/lato/v17/S6u9w4BMUTPHh7USSwiPHA.ttf) format('truetype');
src: url(/assets/fonts/S6u9w4BMUTPHh7USSwiPHA.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/lato/v17/S6uyw4BMUTPHjx4wWw.ttf) format('truetype');
src: url(/assets/fonts/S6uyw4BMUTPHjx4wWw.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src: url(https://fonts.gstatic.com/s/lato/v17/S6u9w4BMUTPHh6UVSwiPHA.ttf) format('truetype');
src: url(h/assets/fonts/S6u9w4BMUTPHh6UVSwiPHA.ttf) format('truetype');
}
......@@ -3967,85 +3967,7 @@ var RTCMultiConnection = function(roomid, forceOptions) {
handle: handle
};
})();
// TranslationHandler.js
var TranslationHandler = (function() {
function handle(connection) {
connection.autoTranslateText = false;
connection.language = 'en';
connection.googKey = 'AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE';
// www.RTCMultiConnection.org/docs/Translator/
connection.Translator = {
TranslateText: function(text, callback) {
// if(location.protocol === 'https:') return callback(text);
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
var sourceText = encodeURIComponent(text); // escape
var randomNumber = 'method' + connection.token();
window[randomNumber] = function(response) {
if (response.data && response.data.translations[0] && callback) {
callback(response.data.translations[0].translatedText);
return;
}
if (response.error && response.error.message === 'Daily Limit Exceeded') {
console.error('Text translation failed. Error message: "Daily Limit Exceeded."');
return;
}
if (response.error) {
console.error(response.error.message);
return;
}
console.error(response);
};
var source = 'https://www.googleapis.com/language/translate/v2?key=' + connection.googKey + '&target=' + (connection.language || 'en-US') + '&callback=window.' + randomNumber + '&q=' + sourceText;
newScript.src = source;
document.getElementsByTagName('head')[0].appendChild(newScript);
},
getListOfLanguages: function(callback) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
var response = JSON.parse(xhr.responseText);
if (response && response.data && response.data.languages) {
callback(response.data.languages);
return;
}
if (response.error && response.error.message === 'Daily Limit Exceeded') {
console.error('Text translation failed. Error message: "Daily Limit Exceeded."');
return;
}
if (response.error) {
console.error(response.error.message);
return;
}
console.error(response);
}
}
var url = 'https://www.googleapis.com/language/translate/v2/languages?key=' + connection.googKey + '&target=en';
xhr.open('GET', url, true);
xhr.send(null);
}
};
}
return {
handle: handle
};
})();
// _____________________
// RTCMultiConnection.js
......
......@@ -10,7 +10,7 @@
<link rel="stylesheet" href="/assets/fonts/font-awesome.min.css?h=9db842b3dc3336737559eb4abc0f1b3d">
<link rel="stylesheet" href="/assets/fonts/material-icons.min.css?h=9db842b3dc3336737559eb4abc0f1b3d">
<link rel="stylesheet" href="/assets/fonts/simple-line-icons.min.css?h=9db842b3dc3336737559eb4abc0f1b3d">
<link rel="stylesheet" href="/assets/css/animate.min.css">
<link rel="stylesheet" href="/assets/css/animate.css">
</head>
<body>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment