TootActionGroup: added share button (closes #18)

This commit is contained in:
thislight 2024-09-28 17:51:37 +08:00
parent 6506a60022
commit 161c72fea5
3 changed files with 129 additions and 6 deletions

View file

@ -1,13 +1,15 @@
//! This module has side effect.
//! It recommended to include the module by <script> tag.
if (!document.body.animate) {
if (typeof document.body.animate === "undefined") {
// @ts-ignore: this file is polyfill, no exposed decls
import("web-animations-js").then(() => { // all target platforms supported, prepared to remove
import("web-animations-js").then(() => {
// all target platforms supported, prepared to remove
console.warn("web animation polyfill is included");
});
}
if (!window.crypto.randomUUID) { // Chrome/Edge 92+
if (typeof window.crypto.randomUUID === "undefined") {
// Chrome/Edge 92+
// https://stackoverflow.com/a/2117523/2800218
// LICENSE: https://creativecommons.org/licenses/by-sa/4.0/legalcode
window.crypto.randomUUID =