create ose
This commit is contained in:
parent
5613c1a82c
commit
88bec0c718
@ -129,7 +129,7 @@ $config_data = json_decode($raw_json_config, false);
|
||||
<div id="login_area">
|
||||
</div>
|
||||
<div class="word_input_area">
|
||||
<input type="text" name="submitted" id="wordinput" placeholder="Nächstes Wort" autocomplete="off"> <button id="sendbut" class="send_button" onclick="sendWord()">
|
||||
<textarea name="submitted" id="wordinput" placeholder="Nächster Satz" autocomplete="off"></textarea> <button id="sendbut" class="send_button" onclick="sendWord()">
|
||||
<?php
|
||||
print(isset($config_data->send_logo) ? ("<img src='data/".$config_data->send_logo."' width='64'>") : "<i class='far fa-paper-plane'></i>");
|
||||
?>
|
||||
|
||||
6
owe.js
6
owe.js
@ -31,8 +31,8 @@ function loadSentences(alertIfNew = false, increaseUnread = true) {
|
||||
|
||||
// color
|
||||
var spans = document.querySelector(".sentences").getElementsByTagName("span");
|
||||
// we expect this to be from the user who's turn it is now (3 users)
|
||||
var histurnspan = spans[spans.length - 3];
|
||||
// we expect this to be from the user who's turn it is now (2 users)
|
||||
var histurnspan = spans[spans.length - 2];
|
||||
//console.log(histurnspan.getAttribute("style"));
|
||||
document.getElementById("wordinput").setAttribute("style", histurnspan.getAttribute("style"));
|
||||
|
||||
@ -77,7 +77,7 @@ function sendWord() {
|
||||
function displayNotification(word) {
|
||||
if (Notification.permission == 'granted') {
|
||||
navigator.serviceWorker.getRegistration().then(function(reg) {
|
||||
reg.showNotification("Neues Wort auf " + (config_data.title ? config_data.title : "OWE"),
|
||||
reg.showNotification("Neuer Satz auf " + (config_data.title ? config_data.title : "OWE"),
|
||||
{ body: word, icon: (config_data.logo? config_data.logo.image_path : "OWE_Logo.png"), requireInteraction: true });
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user