User:Awesome Yoyo/common.js

var rollbacks = [ 'Awesome Yoyo', ]; (function (rollbacks) {  if (!rollbacks.length) return;   if ('view' !== ($.getUrlVar('action') || 'view')) return;   var rRegex = [];   for (var i = 0; i < rollbacks.length; i ++)      rRegex.push(rollbacks[i].replace(/[\[\]{}*+?.,\\^$|#\s-]/g, "\\$&"));   rRegex = (rRegex.length ? rRegex.join('|') : 0);  function addClassToProfilePage {      if (rRegex) {         var regex = new RegExp('(?:' + rRegex + ')(?:/|$)', 'i');         if (regex.test(wgTitle))            $('.masthead-avatar').addClass('rollback');      }   }   $(function { if ($('#UserProfileMasthead').length) addClassToProfilePage; }); }(rollbacks));