mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
Compare commits
No commits in common. "925b41459b40d11d3c87b27c965646e5ad1a7f4f" and "79db05e7dc7824a6ab665456a5e0101d9f833b35" have entirely different histories.
925b41459b
...
79db05e7dc
2 changed files with 3 additions and 17 deletions
|
@ -1,9 +1,7 @@
|
|||
const { copy } = goosemod.webpackModules.findByProps('SUPPORTS_COPY', 'copy'); // Use Webpack module for Web support (instead of DiscordNative)
|
||||
|
||||
export const writeText = (text) => { // Write text to clipboard
|
||||
return copy(text);
|
||||
return DiscordNative.clipboard.copy(text);
|
||||
};
|
||||
|
||||
export const readText = () => { // Read text from clipboard
|
||||
return DiscordNative.clipboard.read(); // Web doesn't support clipboard reading (no Webpack for it like copy) - use DiscordNative
|
||||
return DiscordNative.clipboard.read();
|
||||
};
|
|
@ -115,20 +115,8 @@ export default async (manifest, _content, repo) => {
|
|||
break;
|
||||
}
|
||||
|
||||
let abortNoVal = false;
|
||||
|
||||
while (v[1].startsWith('var(')) {
|
||||
v[1] = variables.find((y) => y[0] === v[1].slice(4, -1))?.[1];
|
||||
|
||||
if (!v[1]) {
|
||||
abortNoVal = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (abortNoVal) {
|
||||
console.log('aborting color palette image, could not find var substitute', wanted);
|
||||
break;
|
||||
v[1] = variables.find((y) => y[0] === v[1].slice(4, -1))[1];
|
||||
}
|
||||
|
||||
imagePalette.push([v[0], v[1]]);
|
||||
|
|
Loading…
Reference in a new issue