ed
This commit is contained in:
parent
c6be40ffbd
commit
702bab121c
37 changed files with 2299 additions and 0 deletions
24
resources/[jobs]/[crime]/r_bridge-1.2.3/ui/script.js
Normal file
24
resources/[jobs]/[crime]/r_bridge-1.2.3/ui/script.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
window.addEventListener('message', function (event) {
|
||||
if (event.data.type === "help-text") {
|
||||
let helpText = document.querySelector('.help-text');
|
||||
if (event.data.display) {
|
||||
helpText.style.opacity = 1;
|
||||
helpText.textContent = event.data.text;
|
||||
} else {
|
||||
helpText.style.opacity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.data.type === "text-ui") {
|
||||
let textUI = document.querySelector('.text-ui');
|
||||
let key = document.querySelector('.text-ui button');
|
||||
let text = document.querySelector('.text-ui p');
|
||||
if (event.data.display) {
|
||||
key.textContent = event.data.key;
|
||||
text.textContent = event.data.text;
|
||||
textUI.style.opacity = 1;
|
||||
} else {
|
||||
textUI.style.opacity = 0;
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue