This repository has been archived on 2026-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
polyplus/js/account/settings-privacy.js
Index 251e28edeb Update Notification Banner & Improvements
- Update banner on settings page with 2 options: go to releases page on this GitHub repository or to skip this update (unrecommended)

- You can now skip updates (again, unrecommended)

- Added "Reset to Default" button on all options modals on the settings page which will reset that setting's specific options to their defaults.

- Removed element IDs from the "Modify Navbar" feature options modal (they were there due to the old way options modals worked before release)

- Renamed polyplus-settings.js to settings.js

- Updated all "IRL Price with Brick Count" display code to have different variable names

- "IRL Price with Brick Count" is more accurate by parsing abbreviated numbers into their full number (fixing odd bugs that would happen with things such as a user's networth) - it is still not super accurate when it comes to users' networth but it's way better than before

 - You can now clear specific data locations (chrome.storage.sync and chrome.storage.local) on the extension's debug page

- Updated update notifier code

- The profile page now uses the utilities to calculate the "IRL Price with Brick Count" result rather than using the old repetitive code

- Added another extension icon for when the extension has an update available - it currently isn't used anywhere due to the code for it not working for some reason
2024-03-07 10:38:11 -06:00

32 lines
No EOL
1.5 KiB
JavaScript
Executable file

setTimeout(function () {}, 100)
chrome.storage.sync.get(['PolyPlus_Settings'], function(result){
if (result.PolyPlus_Settings.MoreSearchFiltersOn === true) {
const BlockedUsersCard = document.getElementsByClassName('card-body')[1]
const InputGroup = document.createElement('div')
InputGroup.classList = 'input-group mb-2'
InputGroup.innerHTML = `
<input id="blocked-users-search" type="text" class="form-control bg-dark" placeholder="Search blocked users...">
<button id="blocked-users-confirm" class="btn btn-secondary"><i class="fad fa-search"></i></button>
`
BlockedUsersCard.insertBefore(InputGroup, BlockedUsersCard.children[0])
const SearchBar = document.getElementById('blocked-users-search')
const ConfirmBtn = document.getElementById('blocked-users-confirm')
ConfirmBtn.addEventListener('click', function(){
SearchBlockedUsers(SearchBar.value);
});
function SearchBlockedUsers(query) {
query = query.toLowerCase();
for (let i = 1; i < BlockedUsersCard.children.length; i++) {
let Username = BlockedUsersCard.children[i].getElementsByTagName('h5')[0].innerText.toLowerCase();
if (Username.includes(query)) {
BlockedUsersCard.children[i].style.display = 'block'
} else {
BlockedUsersCard.children[i].style.display = 'none'
}
}
}
}
});