GC - Rainbow Pool Missing Lists

Show what species or colors are missing from certain paint brushes or species

当前为 2024-09-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name GC - Rainbow Pool Missing Lists
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description Show what species or colors are missing from certain paint brushes or species
  6. // @author wibreth
  7. // @match https://www.grundos.cafe/rainbowpool/neopetcolours/?*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
  9. // @grant GM.getValue
  10. // @grant GM.setValue
  11. // @grant GM_registerMenuCommand
  12. // @grant GM_unregisterMenuCommand
  13. // ==/UserScript==
  14.  
  15. (async function() {
  16. 'use strict';
  17.  
  18. const speciesList = ['Acara','Aisha','Blumaroo','Bori','Bruce','Buzz','Chia','Chomby','Cybunny','Draik','Elephante','Eyrie','Flotsam','Gelert','Gnorbu','Grarrl','Grundo','Hissi','Ixi','Jetsam','JubJub','Kacheek','Kau','Kiko','Koi','Korbat','Kougra','Krawk','Kyrii','Lenny','Lupe','Lutari','Meerca','Moehog','Mynci','Nimmo','Ogrin','Peophin','Poogle','Pteri','Quiggle','Ruki','Scorchio','Shoyru','Skeith','Techo','Tonu','Tuskaninny','Uni','Usul','Wocky','Xweetok','Yurble','Zafara'];
  19. const colorList = ['Alien', 'Apple', 'Asparagus', 'Aubergine', 'Avocado', 'Baby', 'Birthday', 'Biscuit', 'Blue', 'Blueberry', 'Botanical', 'Brown', 'Camouflage', 'Carrot', 'Checkered', 'Cherry', 'Chocolate', 'Chokato', 'Christmas', 'Clay', 'Cloud', 'Coconut', 'Corn', 'Custard', 'Darigan', 'Desert', 'Disco', 'Dragonfruit', 'Durian', 'Edgy', 'Electric', 'Faerie', 'Fire', 'Garlic', 'Ghost', 'Glass', 'Glowing', 'Gold', 'Gooseberry', 'Grape', 'Green', 'Grey', 'Halloween', 'Ice', 'Invisible', 'Island', 'Jelly', 'Lemon', 'Lime', 'Mallow', 'Maraquan', 'Msp', 'Mutant', 'Nugget', 'Orange', 'Pea', 'Peach', 'Pear', 'Pepper', 'Pineapple', 'Pink', 'Pirate', 'Plum', 'Plushie', 'Purple', 'Quigukiboy', 'Quigukigirl', 'Rainbow', 'Red', 'Robot', 'Royalboy', 'Royalgirl', 'Shadow', 'Silver', 'Sketch', 'Skunk', 'Snot', 'Snow', 'Speckled', 'Split', 'Sponge', 'Spotted', 'Starry', 'Stone', 'Strawberry', 'Striped', 'Thornberry', 'Tomato', 'Tyrannian', 'Usukiboy', 'Usukigirl', 'Valentine', 'White', 'Yellow'];
  20. const exclusions = ['Apple', 'Asparagus', 'Aubergine', 'Avocado', 'Blueberry', 'Carrot', 'Cherry', 'Chokato', 'Coconut', 'Corn', 'Dragonfruit', 'Durian', 'Garlic', 'Gooseberry', 'Grape', 'Lemon', 'Lime', 'Mallow', 'Pea', 'Peach', 'Pear', 'Pepper', 'Pineapple', 'Plum', 'Quigukiboy', 'Quigukigirl', 'Thornberry', 'Tomato', 'Usukiboy', 'Usukigirl'];
  21.  
  22. let isToggleOn = await GM.getValue('toggle', false);
  23. let menuCommandId = null;
  24.  
  25. function compareList(target, exclusions) {
  26. $('.missing-list').remove();
  27. let existing = [];
  28. $('.flex-column span').each(function() {
  29. existing.push($(this).text().trim());
  30. });
  31. let missing = target.filter(x => !existing.includes(x));
  32. missing = missing.join(', ');
  33. $('main > div.center').append($(`<p class="missing-list">These color/species combos don't exist yet: ${missing}</p>`));
  34. }
  35.  
  36. function generateList() {
  37. if (menuCommandId !== null) GM_unregisterMenuCommand(menuCommandId);
  38. menuCommandId = GM_registerMenuCommand(isToggleOn ? 'Use longer color list' : 'Use shorter color list', () => {
  39. isToggleOn = !isToggleOn;
  40. GM.setValue('toggle', isToggleOn);
  41. generateList();
  42. }, 'l');
  43.  
  44. if (window.location.href.includes('colour=')) {
  45. if (window.location.href.includes('species='))
  46. return;
  47. compareList(speciesList);
  48. }
  49. else if (window.location.href.includes('species=')) {
  50. isToggleOn ? compareList(colorList.filter(x => !exclusions.includes(x))) : compareList(colorList);
  51. }
  52. }
  53. generateList();
  54.  
  55. })();