Single post in Site Skins: How-To, and Helpful CSS
Forum Index > PokéFarm > Guides > Site Skins: How-To, and Helpful CSS >
QUOTE originally posted by DrWho
QUOTE originally posted by Jana Kennedy
i know this isn't a css question but not quite sure where to go - i believe there was a tamper monkey script that arranged the pokemon in the shelter in level order - does anyone have the link to it??
// ==UserScript==
// @name Show level in shelter
// @namespace http://pokefarm.com/user/drwho
// @version 0.1
// @description display the pokemon's level in the shelter without clicking
// @author /user/drwho
// @match https://pokefarm.com/shelter
// @icon https://pokefarm.com/favicon.ico
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.body.insertAdjacentHTML(`beforeend`,`<style>#shelterarea [data-level]:not([data-level='1'])::after {
position: absolute;
bottom: 0;
left: 0;
background-color: #000;
color: #fff;
font-family: monospace;
font-size: smaller;
color: #ededed;
min-width: 1em;
min-height: 1em;
padding: 3px;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 100%;
z-index: 999;
content: attr(data-level);
}</style>`)
const cb = () => {
Array.from(document.querySelectorAll("#shelterarea .pokemon"))
.filter(node => node.dataset.stage === 'pokemon')
.forEach(node => node.dataset.level = node.nextElementSibling.textContent.match(/Lv.(\d+)/)[1])
}
// run once
cb()
// run on change
const mo = new MutationObserver(cb)
mo.observe(document.querySelector('#shelterarea'), { childList: true })
})();
Always looking for quirky pokemon!
- Typerace
- Shop
Current Type
Current Points 0
Clicklist
Next month=
My shop! I offer shelter hunts, free fields, shiny/albino, variants/exclusives and more. Please post in shop rather than send a pm.
Buying
Spectral Leiomano
for anywhere between 20 - 40zc depending on market price - send pm to see if i have enough money ^.^