// ==UserScript==
// @name GC Gourmet Highlighter
// @namespace https://gf.qytechs.cn/en/users/1175371/
// @version 1.5
// @description Supplements Rowan's Gourmet Helper script to highlight avatar gourmets.
// @author sanjix
// @match https://www.grundos.cafe/gourmet_club/?pet_name=*
// @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
// @grant none
// ==/UserScript==
var choc = ["Mint Chocolate Kacheek", "Dark Chocolate Poogle", "Orange Chocolate Scorchio", "Juppiemint Bar", "Lemon Sherbert Jelly Beans", "Charcoal Jelly Beans", "Sweet Necklace", "Baby Cabbage Jelly Beans", "Mint Chocolate Lupe", "Dark Chocolate Shoyru", "Mint Chocolate Blumaroo", "Dark Chocolate Skeith", "Strawberry Fondant Surprise", "Fluff N Stuff Grarrl Gobstopper", "Mint Chocolate Chia", "Apple and Custard Drops", "Kau Sundae", "Mint Chocolate Peophin", "Minty Choccywhip", "Bullseyes", "Yummy Drops", "Super Spicy Jelly Beans", "Hazelnut Whirl", "Chocolate Peach", "ErgyFruit Jelly Beans", "Creamy Choccywhip", "Spooky Flying Doughnut", "Omnipotent Onion Grarrl Gobstopper", "Caramel and Custard Drops", "Neotruffle", "Deluxe Strawberry Toffee Chokato", "Fishy Delight Grarrl Gobstopper", "Double Chocolate Jelly Beans", "Lemon and Lime Easter Negg", "Luxury Chocolate Easter Negg", "Mint Chocolate Easter Negg", "Chocolate Orange Easter Negg", "Pretty Pink Easter Negg", "Spotted Easter Negg", "Strawberries and Cream Easter Negg", "Chococherry Blumaroo Ears", "Chocolate Gum", "Chocoon", "Crunchy Chocolate Grarrl", "Chocolate Lipstick", "Chocolate Peanuts With Peas", "Choco Spray"];
var health = ["Cube-Shaped Strawberry", "Parsnip Pie", "Jelly Covered Greycorn", "Stuffed Olive Salad", "Cube-Shaped Orange", "Cube-Shaped Lemon", "Cone-Shaped Watermelon", "Cube-Shaped Cherry", "Radish Pie", "Cabbage Cupcake", "Cone-Shaped Strawberry", "Radish Meringue", "Cheesy Broccoli Bite", "Baked Apple with Snowberries", "Cone-Shaped Orange", "Broccoli Kebab", "Fresh Sushi Roll", "Cone-Shaped Lemon", "Radish and Cheese", "Broccoli and Mustard Sandwich", "Fresh Sushi Cone", "Cauliflower Lolly", "Pickled Cauliflower", "Cauliflower Shake", "Cauliflower Soup", "Cone-Shaped Cherry", "Asparagus Balls", "Cheesy Asparagus", "Asparagus Pie", "Luxury Cabbage Cake", "Four Layer Carrot Cake", "Cheesy Carrots", "Broccoli with Sprinkles", "Tomato Kebab", "French Onion Soup", "Artichoke Fondue", "Artichoke Cupcake", "Artichoke and Onion Surprise"];
var spook = ["Ghost Marshmallows", "Haunted Milk", "Intestines and Marinara", "Rest in Peace of Chicken", "Blumaroo Tail Salad Extravaganza", "Spooky Handwich", "The Stuff", "Spooky Jelly Brains", "Hair Stuffed Maggot", "Bat Kebab", "Chocolate Coated Eye", "Grundo Toe Lint", "Mouldy Cheese", "Parts on a Pizza", "Meerca Pie", "Quiggle Pie", "Runny Snot", "Crunchy Snotball", "Wing of Korbat", "Snorkle Pudding", "Pumpkin Scoopings", "Jelly Spider Eyeball", "Apple Lantern", "Halloween Candy Cane", "Coco Pumpkin", "Gorerito", "Jelly Finger", "Spoooky Muffin", "Fright Pop", "Spooky Ghostbeef", "Gnome Shroom", "Crypt of Spaghetti", "Brainburger", "Knuckle Sandwich"];
var snow = ["Fruity Brucicle", "Moehog Lollypop", "Chocolate Kyrii Ice Cream", "Strawberry Chia Pop", "Grape Jelly Brucicle", "Crystal Burger", "Crystal Cookies", "Crystal Crunch", "Frozen Negg", "Crystal Pop", "Crystal Taco", "Crystal Turkey", "Banana Split Chia Pop", "Angelic Ice Lolly", "Hamarama Ice Lolly", "Magical Apple Chia Pop", "Magical Asparagus Chia Pop", "Magical Aubergine Chia Pop", "Magical Avocado Chia Pop", "Magical Blueberry Chia Pop", "Magical Carrot Chia Pop", "Magical Chokato Chia Pop", "Magical Durian Chia Pop", "Magical Gooseberry Chia Pop", "Magical Grape Chia Pop", "Magical Lemon Chia Pop", "Magical Lime Chia Pop", "Magical Orange Chia Pop", "Magical Pea Chia Pop", "Magical Peach Chia Pop", "Magical Pear Chia Pop", "Magical Pepper Chia Pop", "Magical Pineapple Chia Pop", "Magical Plum Chia Pop", "Magical Thornberry Chia Pop", "Magical Tomato Chia Pop", "Tartan Chia Pop", "Magical Nugget Chia Pop", "Snowager Ice Lolly", "Magical Strawberry Brucicle", "Sparkly Ice Lolly"];
var avatarGourmets = [];
avatarGourmets.push(choc);
avatarGourmets.push(health);
avatarGourmets.push(spook);
avatarGourmets.push(snow);
var button = document.createElement('button');
button.className = "highlighter";
button.textContent="Show only avatar gourmets";
button.addEventListener("click", function() {toggleAvatarGourmets();});
var gourmetsEaten = document.querySelector('div.center p');
gourmetsEaten.after(button);
var chocbutton = document.createElement('button');
chocbutton.className = 'highlighter candy';
chocbutton.textContent = 'Hide candy gourmets';
var healthbutton = document.createElement('button');
healthbutton.className = 'highlighter health';
healthbutton.textContent = 'Hide health gourmets';
var spookbutton = document.createElement('button');
spookbutton.className = 'highlighter spooky';
spookbutton.textContent = 'Hide spooky gourmets'
var snowbutton = document.createElement('button');
snowbutton.className = 'highlighter snow';
snowbutton.textContent = 'Hide snow gourmets';
button.after(chocbutton);
chocbutton.after(healthbutton);
healthbutton.after(spookbutton);
spookbutton.after(snowbutton);
chocbutton.addEventListener('click', function() {showHideGourmets(choc);})
healthbutton.addEventListener('click', function() {showHideGourmets(health);})
spookbutton.addEventListener('click', function() {showHideGourmets(spook);})
snowbutton.addEventListener('click', function() {showHideGourmets(snow);})
function showHideGourmets(avType) {
var items = document.querySelectorAll('li span');
items.forEach((item) => {
if (avType.includes(item.textContent)) {
if (item.parentNode.style.display == '' || item.parentNode.style.display == 'list-item') {
item.parentNode.style.display = 'none';
} else if (item.parentNode.style.display == 'none') {
item.parentNode.style.display = 'list-item';
}
}
});
}
function toggleAvatarGourmets() {
var items = document.querySelectorAll('li span');
items.forEach((item) => {
//if (avatarGourmets.flat().includes(item.textContent.replace(/\ufeff/g,"").trim())) {
// item.style.backgroundColor = 'yellow';
//}});
if (choc.includes(item.textContent)) {
item.style.backgroundColor = '#C6A680';
} else if (health.includes(item.textContent)) {
item.style.backgroundColor = '#C9E5CD';
} else if (spook.includes(item.textContent)) {
item.style.backgroundColor = '#FFCD7E';
} else if (snow.includes(item.textContent)) {
item.style.backgroundColor = '#DDFFFF';
} else if (item.parentNode.style.display == '' || item.parentNode.style.display == 'list-item') {
item.parentNode.style.display = 'none';
button.textContent = "Show all gourmets";
} else {
item.parentNode.style.display = 'list-item';
button.textContent = "Show only avatar gourmets";
}});
}
var eaten = document.querySelectorAll('.center p img');
var progress = document.createElement('table');
gourmetsEaten.before(progress);
var header = progress.createTHead().insertRow();
header.appendChild(document.createElement('th')).textContent = 'Chocolate';
header.appendChild(document.createElement('th')).textContent = 'Healthy';
header.appendChild(document.createElement('th')).textContent = 'Spooky';
header.appendChild(document.createElement('th')).textContent = 'Snow';
var body = progress.createTBody().insertRow();
var chocprog = 0;
var healthprog = 0;
var spookprog = 0;
var snowprog = 0;
eaten.forEach((food) => {
if (choc.includes(food.title)) {
chocprog += 1;
} else if (health.includes(food.title)) {
healthprog += 1;
} else if (spook.includes(food.title)) {
spookprog += 1;
} else if (snow.includes(food.title)) {
snowprog += 1;
}
});
body.insertCell().textContent = chocprog;
body.insertCell().textContent = healthprog;
body.insertCell().textContent = spookprog;
body.insertCell().textContent = snowprog;
progress.style.border = 'black 1px solid';
progress.style.marginLeft = 'auto';
progress.style.marginRight = 'auto';
progress.style.borderCollapse = 'collapse';
document.querySelectorAll('th').forEach((item) => {item.style.border = 'black 1px solid'; item.style.padding = '0 1em';});
document.querySelectorAll('td').forEach((item) => {item.style.border = 'black 1px solid'; item.style.padding = '0 1em';});