Greasy Fork

Greasy Fork is available in English.

MAM Max User Gift

3/20/23 Maximizes the default gift value for old and new members

当前为 2023-03-20 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name MAM Max User Gift
// @namespace yyyzzz999
// @author yyyzzz999
// @description 3/20/23 Maximizes the default gift value for old and new members
// @match https://www.myanonamouse.net/u/*
// @version 0.5
// @icon  https://cdn.myanonamouse.net/imagebucket/164109/3m64.png
// @license MIT
// @grant        none
// ==/UserScript==
/*jshint esversion: 6 */
/*eslint no-multi-spaces:0 */

// Automate adjusting to new gift limits on MAM
// 2023-03-17: Decreased bonus gifts to new users (sub 2 weeks) from 1k to 100 per user
setTimeout(function() {
    'use strict';
    var DEBUG =1; // Debugging mode on (1) or off (0)
    if (DEBUG > 0) console.log('Starting MAM Max User Gift');
    var dateString = document.querySelector(".coltable").rows[0].cells[1].textContent ; //
    const date = new Date(dateString.split(' ')[0] + 'T' + dateString.split(' ')[1] + 'Z');
    const twoWeeksAfter = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 14, date.getHours(), date.getMinutes(), date.getSeconds());
    if (DEBUG > 0) {
        console.log("Join date: " + date.toUTCString());
        console.log("2 weeks after join: " + twoWeeksAfter.toUTCString());
        console.log("Now: " + now.toUTCString());
    }
    if (now > twoWeeksAfter) {
       document.getElementById("bonusgift").value = "1000";
    } else {
       document.getElementById("bonusgift").value = "100";
    }
    if (DEBUG > 0) console.log('MAM Max User Gift Finished');
}, 500); // delay in ms to run after MAM+ is finished, default 0.5 seconds