In general:
- Get a list of all the spans/nodes that you might want to delete.
- Filter out the ones that contain your specific text.
- Delete or hide what's left.
- Beware of AJAX (or plugin) timing issues.
You can do steps 1 thru 3 with jQuery like:
var itemRows = $(".market_listing_row_link");
var rowsToDelete = itemRows.not (":has(.market_listing_item_name > span:contains('(warning)'))");
rowsToDelete.hide ();
BUT, since the warning is added by a plugin (and/or some market pages might be added by AJAX techniques), chances are good that your Tampermonkey script will run before the page is finished the way you expect/need it to be.
To compensate for that, use techniques like waitForKeyElements() and find some condition whereby you can know that the "plugin" you mentioned has finished its work.
Since you didn't provide details, we will assume that the plugin finishes before the window load
event fires.
So, here is a complete Tampermonkey script that works in both AJAX and static scenarios (you may have to provide an additional delay based on this "plugin"):
// ==UserScript==
// @name _Steam Market, hide items that DON't have a warning!?
// @include http://YOUR_SERVER.COM/YOUR_PATH/*
// @match *://steamcommunity.com/market*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
introduced in GM/TM 1.0. It restores the sandbox.
*/
window.addEventListener ("load", function () {
waitForKeyElements (".market_listing_row_link", hideUnwarnedRows);
}, false);
function hideUnwarnedRows (jNode) {
if (jNode.has (".market_listing_item_name > span:contains('(warning)')").length) {
return;
}
jNode.hide ();
}