add Firefox support
This commit is contained in:
parent
d07179342c
commit
3817e6e43d
22
css/firefox.css
Normal file
22
css/firefox.css
Normal file
@ -0,0 +1,22 @@
|
||||
#section {
|
||||
background-image: url(../img/background.jpg) !important;
|
||||
}
|
||||
|
||||
.message,
|
||||
.time,
|
||||
.hitokoto,
|
||||
.music,
|
||||
.link-card,
|
||||
.more,
|
||||
.box-wrapper,
|
||||
footer {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.link-card:hover {
|
||||
background: rgb(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.progress {
|
||||
background: rgba(0, 0, 0, 0.5) !important;
|
||||
}
|
@ -308,6 +308,7 @@ i#next {
|
||||
}
|
||||
|
||||
.music-text {
|
||||
margin-top: 6px;
|
||||
font-size: 1.10rem;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 220px;
|
||||
|
16
js/main.js
16
js/main.js
@ -34,6 +34,22 @@ iziToast.settings({
|
||||
iconColor: '#efefef',
|
||||
});
|
||||
|
||||
//火狐浏览器独立样式
|
||||
if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var link = document.createElement('link');
|
||||
link.href = './css/firefox.css';
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
head.appendChild(link);
|
||||
iziToast.info({
|
||||
timeout: 8000,
|
||||
iconUrl: './img/warn.png',
|
||||
title: '兼容提醒',
|
||||
message: '您正在使用火狐浏览器,部分功能可能不支持'
|
||||
});
|
||||
}
|
||||
|
||||
//获取一言
|
||||
fetch('https://v1.hitokoto.cn?max_length=24')
|
||||
.then(response => response.json())
|
||||
|
Loading…
Reference in New Issue
Block a user