[絕]显示最低价

2020/9/30 下午5:21:46

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        [絕]显示最低价
// @author      絕版大叔丶
// @namespace   https://sdator.github.io/
// @match       https://wegamedb.info/products/*
// @grant       none
// @version     1.0
// @description 2020/9/30 下午5:21:46
// ==/UserScript==


!function (data) {
    // 排除 0
    const arr = data.filter((v) => {
        return v.value[1]
    })
    // 按大小排列
    arr.sort((a, b) => {
        return a.value[1] - b.value[1]
    })
    // 取最低价
    const min = arr[0].value[1]
    // 替换元素内容
    $('#v-pills-price > table > tbody > tr:nth-child(1) > td:nth-child(4)').text(min + " 元")
}(data)