Greasy Fork 还支持 简体中文。

MyMunzeeProfile

my Munzee profile script

目前為 2014-12-21 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name MyMunzeeProfile
  3. // @namespace MyMunzeeProfile
  4. // @include http://www.munzee.com/m/*
  5. // @version 1.1.0
  6. // @grant none
  7. // @description my Munzee profile script
  8. // ==/UserScript==
  9.  
  10. jQuery(document).ready(function ($) {
  11. function handleBatches() {
  12. var badges = {
  13. achievements: {
  14. description: 'Achievement badges',
  15. searches: [{
  16. attr: 'data-title',
  17. search: '=',
  18. titles: [
  19. 'Perfect 10', 'Over The Hill', 'Centurion',
  20. '1k Day', '5k Day', '10k Day', '25k Day',
  21. '#1', 'Top 10', 'Top 50', 'Top 100',
  22. 'Winner', 'First Loser', 'Lucky', 'Unlucky',
  23. 'Rover Walker', 'Rover Mover', 'Rover Transporter',
  24. 'Easy as Pi'
  25. ]
  26. }]
  27. },
  28. captures: {
  29. description: 'Capture badges',
  30. searches: [{
  31. attr: 'data-title',
  32. search: '=',
  33. titles: [
  34. 'Seeker', 'Capture Streak', 'First Responder', 'Sampler', 'ROY G BIV',
  35. 'It\\\'s a Blast!', 'Dirty Dozen',
  36. 'Hunter', 'Collector', 'Hoarder', 'Curator', 'Historian',
  37. '5 by 5',
  38. 'Breakfast', 'Wifi', 'Pool'
  39. ]
  40. }]
  41. },
  42. deploys: {
  43. description: 'Deploy badges',
  44. searches: [{
  45. attr: 'data-title',
  46. search: '=',
  47. titles: [
  48. 'Hider', 'Deploy Streak', 'Super Streak',
  49. 'Air Munzee', '5 by 5 deployed', '100 Green',
  50. 'Virtual High 5', 'Watson', 'Holmes',
  51. 'VardemInn', 'Foster\\\'s Palace', 'Founders\\\' Towers'
  52. ]
  53. }]
  54. },
  55. battle: {
  56. description: 'Battle badges',
  57. searches: [{
  58. attr: 'data-title',
  59. search: '=',
  60. titles: [
  61. 'Clan Gold', 'Clan Silver', 'Clan Bronze',
  62. 'Battle Ready', 'Warrior', 'Combat Chuck', 'SuperChuck'
  63. ]
  64. }]
  65. },
  66. socials: {
  67. description: 'Social badges',
  68. attr: 'data-title',
  69. searches: [
  70. {
  71. attr: 'data-title',
  72. search: '=',
  73. titles: [
  74. 'Social Caterpillar', 'Social Cocoon', 'Social Butterfly', 'Social Princess', 'Social Queen',
  75. 'Social Tadpole', 'Social Froglet', 'Social Frog', 'Social Prince'
  76. ]
  77. }
  78. ]
  79. },
  80. munzee: {
  81. description: 'Munzee special badges',
  82. searches: [
  83. {
  84. attr: 'data-title',
  85. search: '=',
  86. titles: [
  87. 'Early Bird', 'Munzee HQ', 'MHQ Badge',
  88. 'Grand Opening', 'Munzee Marketplace', 'Behind the Wall',
  89. 'Player Of The Week', 'Meet the Makers', 'Reseller',
  90. 'MHQ Bash 2014', 'Worlds Collide MHQ', 'Munzee Garden'
  91. ]
  92. }
  93. ]
  94. },
  95. christmas: {
  96. description: 'Christmas badges',
  97. searches: [
  98. {
  99. attr: 'data-title',
  100. search: '^=',
  101. titles: [
  102. 'Christmas '
  103. ]
  104. }
  105. ]
  106. },
  107. event: {
  108. description: 'Event badges',
  109. searches: [
  110. {
  111. attr: 'data-title',
  112. search: '=',
  113. titles: [
  114. 'Event Host'
  115. ]
  116. },
  117. {
  118. attr: 'data-content',
  119. search: '*=',
  120. titles: [
  121. 'Thanks for having fun in Cologne! Hope you tried some Kölsch!',
  122. 'Thanks for participating, hope you have fun'
  123. ]
  124. }
  125. ]
  126. }
  127. };
  128. $('#badges-listing').prepend('<div class="page-header" id="badges-listing-all"><h2><small>Other badges</small></h2></div>');
  129. $.each(badges, function (key, data) {
  130. var category = '<div class="page-header" style="padding-bottom: 5px; margin: 10px 0px 0px" id="badges-listing-' + key + '">' +
  131. '<h2 style="margin: 0px 0px 0px;"><small>' + data['description'] + '</small></h2></div>';
  132. alert(data['searches'][0]);
  133. for(var h = data['searches'].length - 1; h >= 0; h--) {
  134. var search = data['searches'][h];
  135. for(var i = search['titles'].length - 1; i >= 0; i--) {
  136. var badge = $("li.badge-helper[" + search['attr'] + search['search'] + "'" + search['titles'][i] + "']");
  137. if ($(badge).length != 0) {
  138. if (category != '') {
  139. $('#badges-listing-all').before(category);
  140. category = '';
  141. }
  142. $('#badges-listing-' + key).after(badge);
  143. }
  144. }
  145. }
  146. });
  147. }
  148. if (window.location.href.substring(window.location.href.length - 8) == '/badges/') {
  149. handleBatches()
  150. }
  151. });
  152.