mirror of
https://github.com/NotoChen/Jetbrains-Help.git
synced 2025-05-24 23:16:44 +08:00
parent
308520eb93
commit
5830681e23
|
@ -55,8 +55,8 @@ $(document).ready(function() {
|
||||||
$.post('/generateLicense', JSON.stringify(data))
|
$.post('/generateLicense', JSON.stringify(data))
|
||||||
.then(response => {
|
.then(response => {
|
||||||
copyText(response)
|
copyText(response)
|
||||||
.then(() => {
|
.then((result) => {
|
||||||
alert("The activation code has been copied");
|
alert(result);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -65,6 +65,10 @@ $(document).ready(function() {
|
||||||
const copyText = async (val) => {
|
const copyText = async (val) => {
|
||||||
if (navigator.clipboard && navigator.permissions) {
|
if (navigator.clipboard && navigator.permissions) {
|
||||||
await navigator.clipboard.writeText(val);
|
await navigator.clipboard.writeText(val);
|
||||||
|
return "The activation code has been copied";
|
||||||
|
} else {
|
||||||
|
console.log(val);
|
||||||
|
return "The system does not support it, please go to the console to copy it manually";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user