diff --git a/backend.js b/backend.js index f9e33d5..63434b7 100644 --- a/backend.js +++ b/backend.js @@ -75,7 +75,8 @@ io.on('connection', (socket)=>{ socket.on('message',(message)=>{ let timeoutId; clearTimeout(bPlayers[socket.id].timeoutId); - bPlayers[socket.id].message = filter.clean(message) + // bPlayers[socket.id].message = filter.clean(message) + bPlayers[socket.id].message = message function startTimer() { timeoutId = setTimeout(() => { diff --git a/public/ghost2.png b/public/ghost2.png index f020105..e80c1cf 100644 Binary files a/public/ghost2.png and b/public/ghost2.png differ diff --git a/public/index.html b/public/index.html index 0fa158a..e9d5d9b 100644 --- a/public/index.html +++ b/public/index.html @@ -30,8 +30,12 @@ +
+ @@ -56,16 +60,21 @@
+
+
- +
+ +
+
@@ -109,5 +118,8 @@ + + + \ No newline at end of file diff --git a/public/index.js b/public/index.js index 2f23fa7..0b9e212 100644 --- a/public/index.js +++ b/public/index.js @@ -18,7 +18,7 @@ let pageVisible = true; let debugMode = false; let timeoutHandle; - +//emoji picker code // let atPosition = true; // img.src = 'demaSprite.png'; diff --git a/public/popup.js b/public/popup.js new file mode 100644 index 0000000..720a8f7 --- /dev/null +++ b/public/popup.js @@ -0,0 +1,28 @@ +import * as Popper from 'https://cdn.jsdelivr.net/npm/@popperjs/core@^2/dist/esm/index.js' +import insertText from 'https://cdn.jsdelivr.net/npm/insert-text-at-cursor@0.3.0/index.js' +// import tr from 'emoji-picker-element/i18n/tr'; + + +const emojiButton = document.querySelector('#emojiButton') +const tooltip = document.querySelector('.tooltip') +Popper.createPopper(emojiButton, tooltip,{ + placement: 'top', +}) + +document.querySelector('#emojiButton').onclick = () => { + tooltip.classList.toggle('shown') +// window.addEventListener('click', function(e){ +// if (document.querySelector('emoji-picker').contains(e.target)){ +// // Clicked in box +// } else{ +// tooltip.classList.toggle('shown') +// } +// }); +} + +document.querySelector('emoji-picker').addEventListener('emoji-click', e => { + insertText(document.querySelector('input'), e.detail.unicode) + tooltip.classList.toggle('shown') + + }) + diff --git a/public/style.css b/public/style.css index 38c6021..76538ba 100644 --- a/public/style.css +++ b/public/style.css @@ -1,4 +1,8 @@ +html { + overflow: -moz-scrollbars-vertical; + overflow-y: scroll; +} :root { --header-image: url('./bgHOME4.png'); @@ -107,27 +111,68 @@ and change the media query according to the comment! */ } #input { + border:2px solid grey; + border-right: none; + /* box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; */ margin: 0px; - width: 83%; - margin-right: 5px; + width: 530px; + margin-right:0px; font-size: 18px; - height: 100%; - margin-top: 10px; + height: 34px; + /* margin-top: 10px; */ padding: 5px 5px; - margin-bottom: 10px; + /* margin-bottom: 10px; */ + /* vertical-align: middle; */ + vertical-align: middle; } #textInput > button{ font-size: 18px; width: 16%; padding: 5px 5px; - margin-top: 10px; - margin-right: 0px; + /* margin-top: 10px; */ + vertical-align: middle; + /* margin-right: 5px; */ height: 34px; /* padding: 1px 2px; */ /* all:initial; */ } + #textInput{ + margin-top: 10px; + margin-bottom: 10px; + /* vertical-align: middle; */ + } + + .tooltip:not(.shown) { + display: none; + } + + #emojiButton{ + border:2px solid grey; + /* border-left: none; */ + vertical-align: middle; + font-family: Arial, Helvetica, sans-serif; + font-size: 1.5em !important; + background-color: white; + /* border: none; */ + margin-right: 5px; + min-width: 20px !important; + width: 40px !important; + height: 34px !important; + box-shadow: none; + color: black !important; + padding:0px !important; + border-width: 2px; + + /* padding: 0px !important; */ + } + + .tooltip{ + z-index:999; + position: absolute; + data-popper-placement:top; + } /* the area below is for all links on your page EXCEPT for the navigation */ #container a {