🔧 Global formatting and update formatting
This commit is contained in:
11
src-tauri/src/inject/component.js
vendored
11
src-tauri/src/inject/component.js
vendored
@@ -1,15 +1,16 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// Toast
|
||||
function pakeToast(msg) {
|
||||
const m = document.createElement('div');
|
||||
const m = document.createElement("div");
|
||||
m.innerHTML = msg;
|
||||
m.style.cssText =
|
||||
'max-width:60%;min-width: 80px;padding:0 12px;height: 32px;color: rgb(255, 255, 255);line-height: 32px;text-align: center;border-radius: 8px;position: fixed; bottom:24px;right: 28px;z-index: 999999;background: rgba(0, 0, 0,.8);font-size: 13px;';
|
||||
"max-width:60%;min-width: 80px;padding:0 12px;height: 32px;color: rgb(255, 255, 255);line-height: 32px;text-align: center;border-radius: 8px;position: fixed; bottom:24px;right: 28px;z-index: 999999;background: rgba(0, 0, 0,.8);font-size: 13px;";
|
||||
document.body.appendChild(m);
|
||||
setTimeout(function () {
|
||||
const d = 0.5;
|
||||
m.style.transition = 'transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
|
||||
m.style.opacity = '0';
|
||||
m.style.transition =
|
||||
"transform " + d + "s ease-in, opacity " + d + "s ease-in";
|
||||
m.style.opacity = "0";
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(m);
|
||||
}, d * 1000);
|
||||
|
||||
Reference in New Issue
Block a user