// ==UserScript== // @name [Pokeclicker] Synthetic Shiny Synapse // @namespace Pokeclicker Scripts // @author Ephenia // @description Allows you to adjust and modify the shiny rates of everything specifically, as well as set a global shiny rate. // @copyright https://github.com/Ephenia // @license GPL-3.0 License // @version 1.5.3 // @homepageURL https://github.com/Ephenia/Pokeclicker-Scripts/ // @supportURL https://github.com/Ephenia/Pokeclicker-Scripts/issues // @match https://www.pokeclicker.com/ // @icon https://www.google.com/s2/favicons?domain=pokeclicker.com // @grant unsafeWindow // @run-at document-idle // @downloadURL https://update.greasyfork.icu/scripts/447563/%5BPokeclicker%5D%20Synthetic%20Shiny%20Synapse.user.js // @updateURL https://update.greasyfork.icu/scripts/447563/%5BPokeclicker%5D%20Synthetic%20Shiny%20Synapse.meta.js // ==/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 = `