您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
avatar
当前为
// ==UserScript== // @name Plug.dj avatar ramdom // @namespace plugdj // @version 1.04 // @description avatar // @match https://plug.dj/* // ==/UserScript== function randomAvatar() { setTimeout(randomAvatar, 5000); // Script created by Unnoen of FiM | https://plug.dj/friendshipismagic // You may include this or variations in your own script but credit must be given. // <3 var avatarSuccess, avatars; function getAvatars() { $.ajax({ url : 'https://plug.dj/_/store/inventory/avatars', type : 'GET', contentType : 'application/json', success : function (data) { console.info("[Random Avatar] Got Avatars!"); avatarSuccess = true; avatars = data.data; } }); }; function randomFromArray(array) { return array[Math.floor(Math.random() * array.length)]; }; function changeAvatar(avid) { var dataSend = { "id" : avid }; $.ajax({ url : 'https://plug.dj/_/users/avatar', type : 'PUT', contentType : 'application/json', data : JSON.stringify(dataSend), success : function (data) { console.info("[Random Avatar] Avatar Changed to " + avid); } }); }; setInterval(function () { if (!!avatarSuccess) { changeAvatar(randomFromArray(avatars).id); }; }, 600000); getAvatars(); }; randomAvatar();