Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
casualsoty committed Sep 22, 2023
1 parent 47d49f4 commit 57bece8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions module.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ Hooks.on('changeSidebarTab', _ => {
/* 1
*/

const FLEX = window.getComputedStyle(document.getElementsByClassName('control-buttons')[0]).flex.split(' ')[2];

document.getElementsByClassName('control-buttons')[0].style.flex = '0 0 ' + (parseInt(FLEX.substring(0, FLEX.length - 2)) + 24) + 'px';
document.getElementsByClassName('control-buttons')[0].innerHTML +=
'<style>.close-maemotes-button { display: none; }</style>' +
document.getElementById('chat-controls').innerHTML +=
'<a ' +
'id="open-maemotes-button"' +
'class="chat-control-icon" ' +
'id="open-maemotes-button" ' +
'title="' + game.i18n.localize('MAEMOTES.OpenMaemotesButtonTitle') + '">' +
'<svg ' +
'class="bi bi-emoji-smile-fill" ' +
Expand All @@ -40,6 +37,7 @@ Hooks.on('changeSidebarTab', _ => {
'xmlns="http://www.w3.org/2000/svg">' +
'<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zM7 6.5C7 7.328 6.552 8 6 8s-1-.672-1-1.5S5.448 5 6 5s1 .672 1 1.5zM4.285 9.567a.5.5 0 0 1 .683.183A3.498 3.498 0 0 0 8 11.5a3.498 3.498 0 0 0 3.032-1.75.5.5 0 1 1 .866.5A4.498 4.498 0 0 1 8 12.5a4.498 4.498 0 0 1-3.898-2.25.5.5 0 0 1 .183-.683zM10 8c-.552 0-1-.672-1-1.5S9.448 5 10 5s1 .672 1 1.5S10.552 8 10 8z"/>'
'</svg>' +
'<style>.close-maemotes-button { display: none; }</style>' +
'</a>';

/* 2
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"readme": "https://github.com/casualsoty/maemotes/blob/main/README.md",
"title": "Maemotes",
"url": "https://github.com/casualsoty/maemotes",
"version": "1.0.4"
"version": "1.0.5"
}

0 comments on commit 57bece8

Please sign in to comment.