// ==UserScript== // @name Avvy Pirate // @namespace PXgamer // @version 0.1 // @description Steals people's avatars anywhere on KAT. // @author PXgamer // @include *kat.cr/* // @grant none // @downloadURL none // ==/UserScript== /*jshint multistr: true */ (function() { 'use strict'; $('div.userPic div.userPicHeight a[href^="/user/"] img').after( ' Steal User\'s avatar' ); $('.stealAvvy').on( 'click', function() { var imgData = $(this).prev('img').attr('src'); $.ajax( { type: 'POST', url: '/account/setuserpic/', data: { avatar: imgData }, error: function() { console.info('AP: An error occurred'); }, dataType: 'json', success: function(data) { location.reload(); } } ); } ); })();