mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-09 09:35:02 +09:00
fix challenge
This commit is contained in:
parent
6e7e600c2a
commit
986ee5e0e7
1 changed files with 30 additions and 1 deletions
31
dist/challenge/index.html
vendored
31
dist/challenge/index.html
vendored
|
@ -26,7 +26,6 @@
|
|||
.buttons button:hover { background: #f09c0e; }
|
||||
</style>
|
||||
<script src="../js/jquery.js" type="text/javascript"></script>
|
||||
<script src="./main.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
|
@ -40,5 +39,35 @@
|
|||
<button id="close"></button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(() => {
|
||||
const win = $(window);
|
||||
const closeButton = $('#close');
|
||||
const challengeEl = $('#challenge');
|
||||
|
||||
document.title = 'Anytype';
|
||||
|
||||
closeButton.off('click').on('click', e => {
|
||||
e.preventDefault();
|
||||
window.close();
|
||||
});
|
||||
|
||||
win.off('message').on('message', e => {
|
||||
const { challenge, theme, lang } = e.originalEvent.data;
|
||||
|
||||
challengeEl.text(challenge);
|
||||
$('html').attr({ class: theme });
|
||||
|
||||
$.ajax({
|
||||
url: `../lib/json/lang/${lang}.json`,
|
||||
method: 'GET',
|
||||
contentType: 'application/json',
|
||||
success: data => {
|
||||
closeButton.text(data.commonClose);
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue