您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change border color for the cheapest item in inventory and backpack on page load or DOM update
Dead Frontier Cheapest Item Highlighter
This userscript enhances your experience in Dead Frontier by automatically highlighting the cheapest items in your inventory and backpack. It helps you quickly identify the best deals and manage your resources more effectively.
The script uses a MutationObserver to monitor changes in the DOM, ensuring that the highlighting function is called whenever items are added or removed from your inventory or backpack. You can customize the items to ignore and the style of the highlights through the script settings.
Here’s how your inventory will look with items highlighted:
To use this script, you will need a Tampermonkey userscript manager. Simply copy the script code and create a new script in your userscript manager.
Once installed, navigate to your inventory or scrap yard in Dead Frontier, and the script will automatically highlight the cheapest items based on your settings.
You can easily modify the script to change the highlighting behavior and style. Here are the key variables you can adjust:
Add item names to the ignoredItems
array to prevent the script from highlighting them:
const ignoredItems = ['BM14 Survival', 'Cooked Quinoa']; // Add item names to ignore
Simply replace or add the names in the array with the items you want to ignore.
Set this variable to true to highlight all items with the same cheapest price:
// Set this variable to true to highlight all items with the same cheapest price
const highlightAll = true; // Change to false to highlight only one item
Customize the highlight style:
const highlightStyle = '1.5px dashed #FF6112'; // Change to your desired style
To change the highlight style, you can use different CSS styles, such as:
'1px solid red'
for a solid red border.'1px dotted yellow'
for a dotted yellow border.'1.5px dashed #b68fb1'
for a dashed border with a custom color.Simply replace the value of highlightStyle
with your preferred style.