Skip to content

Commit

Permalink
fix: update now button not centered (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raiquen Guidotti authored May 21, 2024
1 parent 13ab192 commit 2a07e25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/popup/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ label {
margin-bottom: 1rem;
}

#update-now-container {
display: flex;
}

button {
font-size: 13px !important;
width: 50% !important;
Expand Down
2 changes: 1 addition & 1 deletion src/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Cleaner Twitter</h2>
<label for="rules-auto-updates">Auto update rules</label>
<input id="rules-auto-updates" type="checkbox" role="switch" />
</div>
<div>
<div id="update-now-container">
<button class="secondary outline" id="update-now">Update now</button>
</div>
</details>
Expand Down
6 changes: 3 additions & 3 deletions src/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ autoUpdatesToggle.addEventListener('click', async () => {
//Auto updates setting <--

//Update now button -->
const updateNowButton = document.getElementById('update-now')
const updateNowContainer = document.getElementById('update-now-container')
let updateNowClicked = false
updateNowButton.addEventListener('click', async () => {
updateNowContainer.addEventListener('click', async () => {
if(updateNowClicked) return

updateNowClicked = true
const response = await updateDefaultCSSRules(true)
updateNowButton.insertAdjacentHTML(
updateNowContainer.insertAdjacentHTML(
'beforebegin',
`<div
style="
Expand Down

0 comments on commit 2a07e25

Please sign in to comment.