The idea is adding a toggle checkbox on auction. If it's checked, items are highlighted based on description that matches the keyword..
Example scenario:
1) User saves keywords preferences on settings. (e.g "Lucius", "Delicacy").
2) User visits auction and checks the checkbox
3) System highlight items (e.g red border around item html element)
I have some sample code that does the job. It can be improved.
var itemHighlightKeywords = new Array("Lucius", "Delicacy"); // read from settings
function highlightItems() {
let items = jQuery(".auction_item_div .ui-draggable");
for (let i = 0; i < items.length; i++) {
let itemProps = jQuery(items[i]).data().tooltip[0];
for (let j = 0; j < itemProps.length; j++) {
for (let k = 0; k < itemHighlightKeywords.length; k++) {
let prop = itemProps[j][0].toString().toLowerCase();
let keyword = itemHighlightKeywords[k].toLowerCase();
if (prop.contains(keyword)) {
jQuery(items[i]).closest(".section-header").css("border", "red solid 4px");
break;
}
}
}
}
}
The idea is adding a toggle checkbox on auction. If it's checked, items are highlighted based on description that matches the keyword..
Example scenario: 1) User saves keywords preferences on settings. (e.g "Lucius", "Delicacy"). 2) User visits auction and checks the checkbox 3) System highlight items (e.g red border around item html element)
I have some sample code that does the job. It can be improved.
It looks like this: