1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Added clipboard_paste.js

This commit is contained in:
FatCatX 2021-05-06 15:09:09 -07:00
parent 74b6fde198
commit fb84d17b2a
2 changed files with 8 additions and 10 deletions

View File

@ -0,0 +1,7 @@
/**
* @returns {Promise<string>}
*/
export async function paste() {
/* TODO: Add fallback method */
return navigator.clipboard.readText();
}

View File

@ -13,6 +13,7 @@ import { BaseHUDPart } from "../base_hud_part";
import { Entity } from "../../entity";
import { DynamicDomAttach } from "../dynamic_dom_attach";
import { globalConfig } from "../../../core/config";
import { paste } from "../../../core/clipboard_paste";
const copy = require("clipboard-copy");
@ -246,13 +247,3 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
return Blueprint.deserialize(this.root, json);
}
}
/* TODO: Move this to a module */
/**
* @returns {Promise<string>}
*/
async function paste() {
/* TODO: Add fallback method */
return navigator.clipboard.readText();
}