- 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
32 lines
No EOL
1.5 KiB
JavaScript
Executable file
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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}); |