您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add the username and new avatar to the associative array to
// ==UserScript== // @name mmmturkeybacon Avatar Switcheroo // @author mmmturkeybacon // @description Add the username and new avatar to the associative array to // replace a user's avatar. Automatically turns users without // avatars into robots. // @namespace http://userscripts.org/users/523367 // @match http://www.mturkgrind.com/threads/* // @match http://www.mturkgrind.com/showthread.php?* // @require http://code.jquery.com/jquery-latest.min.js // @version 1.65 // @grant GM_log // ==/UserScript== // Set this to true to give all users without an avatar a unique robot avatar. var AVATARS_FOR_ALL = true; // Put the username and avatar in userdict to give that user a new avatar whether // they have one already or not. Use 'robot' in place of an avatar image to // assign a specific user a robot avatar. var userdict = {}; userdict['Da_Tax_Man'] = 'http://i.imgur.com/9c1YkKb.jpg'; //userdict['justmerob'] = 'robot'; $(window).load(function() { $('div.userinfo > div.username_container').each(function() { var username = $(this).find('a[id][title][href^="members/"]').text().trim(); //var username_URL = $(this).find('a[id][title][href^="members/"]').attr('href');; //var username = username_URL.substring(username_URL.indexOf('-')+1); if (userdict[username]) { $(this).parent().find('a.postuseravatar').remove(); if (userdict[username] == 'robot') { var avatar = 'http://robohash.org/'+username+'png?size=100x100'; $(this).parent().find('hr').before('<a class="postuseravatar"><img src="'+avatar+'"></a>'); } else { $(this).parent().find('hr').before('<a class="postuseravatar"><img src="'+userdict[username]+'"></a>'); } } else if (AVATARS_FOR_ALL && $(this).parent().find('a.postuseravatar').length == 0) { // username is not in userdict and user doesn't have an avatar var avatar = 'http://robohash.org/'+username+'png?size=100x100'; $(this).parent().find('hr').before('<a class="postuseravatar"><img src="'+avatar+'"></a>'); } }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址