mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 07:37:10 +00:00
Merge pull request #7 from SPGoding/feature/base64
Add base64 encoding for share link
This commit is contained in:
4
model.js
4
model.js
@@ -15,7 +15,7 @@ addEntry($('#structure .pool').get());
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
if (params.has('q')) {
|
||||
$('#source').val(params.get('q'));
|
||||
$('#source').val(atob(params.get('q')));
|
||||
updateSouce();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ function showSource() {
|
||||
}
|
||||
|
||||
function linkSource() {
|
||||
let link = window.location.origin + window.location.pathname + '?q=' + JSON.stringify(table);
|
||||
let link = window.location.origin + window.location.pathname + '?q=' + btoa(JSON.stringify(table));
|
||||
$('#copyTextarea').removeClass('d-none').val(link);
|
||||
$('#copyTextarea').get()[0].select();
|
||||
document.execCommand('copy');
|
||||
|
||||
Reference in New Issue
Block a user