mirror of https://github.com/huashengdun/webssh
Merge e9fdc632f0
into 1cf19c7186
commit
65f1ad4dba
|
@ -34,6 +34,17 @@ var wssh = {};
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
const findFont = (src_list, familyName) => {
|
||||||
|
if (src_list === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
for (font of src_list) {
|
||||||
|
if (font.family === familyName) {
|
||||||
|
return font;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
var status = $('#status'),
|
var status = $('#status'),
|
||||||
|
@ -46,7 +57,9 @@ jQuery(function($){
|
||||||
title_element = document.querySelector('title'),
|
title_element = document.querySelector('title'),
|
||||||
form_id = '#connect',
|
form_id = '#connect',
|
||||||
debug = document.querySelector(form_id).noValidate,
|
debug = document.querySelector(form_id).noValidate,
|
||||||
custom_font = document.fonts ? document.fonts.values().next().value : undefined,
|
fonts = document.fonts,
|
||||||
|
custom_font_family_name = $("body").attr("data-wssh-custom-font-family-name") || "",
|
||||||
|
custom_font = findFont(fonts, custom_font_family_name),
|
||||||
default_fonts,
|
default_fonts,
|
||||||
DISCONNECTED = 0,
|
DISCONNECTED = 0,
|
||||||
CONNECTING = 1,
|
CONNECTING = 1,
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
{% end %}
|
{% end %}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body {% if font.family %}data-wssh-custom-font-family-name="{{ font.family }}"{% end %}>
|
||||||
<div id="waiter" style="display: none"> Connecting ... </div>
|
<div id="waiter" style="display: none"> Connecting ... </div>
|
||||||
|
|
||||||
<div class="container form-container" style="display: none">
|
<div class="container form-container" style="display: none">
|
||||||
|
|
Loading…
Reference in New Issue