Greasy Fork

JetBra

Add a button on the plugin homepage and click to get the plugin activation code

< 脚本JetBra的反馈

评价:好评 - 脚本运行良好

§
发表于:2024-07-18

彩虹括号激活时间超过两年就失效了 可以改下脚本把激活时间改成2年。

function buildLicensePartJson(pluginCode, licenseId) {
    // 获取当前日期
    let currentDate = new Date();

    // 当前日期加两年
    let futureDateTwoYears = new Date(currentDate);
    futureDateTwoYears.setFullYear(futureDateTwoYears.getFullYear() + 2);
    let formattedDateTwoYears = futureDateTwoYears.toISOString().split('T')[0];

    // 默认日期
    let fallbackDate = formattedDateTwoYears;
    let paidUpTo = formattedDateTwoYears;

    return JSON.stringify({
        "licenseId": licenseId,
        "licenseeName": "reborn",
        "assigneeName": "reborn",
        "assigneeEmail": "",
        "licenseRestriction": "",
        "checkConcurrentUse": false,
        "products": [{
            "code": pluginCode,
            "fallbackDate": fallbackDate,
            "paidUpTo": paidUpTo,
            "extended": false
        }],
        "metadata": "0120230102PPAA013009",
        "hash": "41472961/0:1563609451",
        "gracePeriodDays": 7,
        "autoProlongated": true,
        "isAutoProlongated": true
    });
}

发表回复

登录以发表回复。