// ==UserScript== // @name [Pokeclicker] Synthetic Shiny Synapse // @namespace Pokeclicker Scripts // @match https://www.pokeclicker.com/ // @grant none // @version 1.4 // @author Ephenia // @description Allows you to adjust and modify the shiny rates of everything specifically, as well as set a global shiny rate. // @downloadURL none // ==/UserScript== const genSource = ['generateWildPokemon', //Wild Pokemon 'generateDungeonPokemon', //Dungeon Pokemon 'evolve', //Evolution Pokemon 'new', //Safari Pokemon 'claimFunction', //Shop/Claim/Gift Pokemon 'hatch', //Breeding/Eggs 'generateWanderPokemon', //Wandering/Farm Pokemon ]; const genDesc = ['Wild Pokémon shiny odds:', 'Dungeon Pokémon shiny odds:', 'Evolution Stone Pokémon shiny odds:', 'Safari Pokémon shiny odds:', 'Gift/Claimed Pokémon shiny odds:', 'Breeding/Hatchery Pokémon shiny odds:', 'Wandering/Farm Pokémon shiny odds:' ]; var shinyTypes; var shinyRates = []; var prefShinyRates; var globalShinyState; var globalShinyRate; var karmaMode; var karmaRates; var shinyDOMUpdate; function initShinySynapse() { getShinyRates(); const profileModal = document.getElementById('profileModal'); const profileDrop = document.getElementById('startMenu').querySelectorAll('ul li')[0]; const shinyLi = document.createElement('li'); const a = document.createElement('a'); a.setAttribute('class', 'dropdown-item'); a.setAttribute('href', '#shinyModal'); a.setAttribute('data-toggle', 'modal'); a.textContent = 'Shiny Modifier'; a.addEventListener('click', () => { updateShinyModal(); }); shinyLi.appendChild(a); profileDrop.before(shinyLi); const shinyMod = document.createElement('div'); shinyMod.setAttribute("class", "modal noselect fade show"); shinyMod.setAttribute("id", "shinyModal"); shinyMod.setAttribute("tabindex", "-1"); shinyMod.setAttribute("aria-labelledby", "shinyModal"); shinyMod.setAttribute("aria-labelledby", "shinyModal"); shinyMod.setAttribute("aria-modal", "true"); shinyMod.setAttribute("role", "dialog"); shinyMod.innerHTML = `