diff --git a/src/fx-image.ts b/src/fx-image.ts index f34e0d0..5468b8f 100644 --- a/src/fx-image.ts +++ b/src/fx-image.ts @@ -18,7 +18,11 @@ export function reveal(img: HTMLImageElement, instant?: boolean): void { export const FX_IMAGE_SCRIPT = `(function(){var r=${reveal.toString()};` + `var p=/(\\/game\\/[^?#\\s]+)\\.png(?=[?#\\s]|$)/g;` + - `function w(t){if(t.getAttribute('data-webp-tried'))return false;var s=t.getAttribute('src')||'';if(!/\\/game\\/[^?#]+\\.png/.test(s))return false;` + - `t.setAttribute('data-webp-tried','1');var ss=t.getAttribute('srcset');if(ss)t.setAttribute('srcset',ss.replace(p,'$1.webp'));t.setAttribute('src',s.replace(p,'$1.webp'));return true}` + + `function w(t){var s=t.getAttribute('src')||'';` + + `if(!t.getAttribute('data-webp-tried')&&/\\/game\\/[^?#]+\\.png/.test(s)){t.setAttribute('data-webp-tried','1');var ss=t.getAttribute('srcset');` + + `if(ss)t.setAttribute('srcset',ss.replace(p,'$1.webp'));t.setAttribute('src',s.replace(p,'$1.webp'));return true}` + + + `if(t.getAttribute('data-site-tried')||s.charAt(0)!=='/'||s.charAt(1)==='/'||location.hostname==='fishies.lol')return false;` + + `t.setAttribute('data-site-tried','1');t.removeAttribute('srcset');t.setAttribute('src','https://fishies.lol'+s);return true}` + `function h(e){var t=e.target;if(!t||t.tagName!=='IMG')return;if(e.type==='error'&&w(t))return;if(t.hasAttribute('data-fx'))r(t)}` + `document.addEventListener('load',h,true);document.addEventListener('error',h,true)})()` diff --git a/src/icons.ts b/src/icons.ts index bd09bf3..8db9d28 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -26,7 +26,7 @@ export const SYSTEM_ICONS = [ ui('remedy', 'Remedy', 'care', 'heal a sick fish'), ui('inspect', 'Inspect', 'care', 'look closer at a fish'), ui('home', 'Home', 'places', 'your own aquarium'), ui('explore', 'Explore', 'places', 'find other keepers'), ui('map', 'Map', 'places', 'the ocean map and its places'), ui('shop', 'Shop', 'places', 'buy fish, decor and care'), ui('cart', 'Cart', 'places', 'open the basket'), ui('cart-add', 'Add to cart', 'places', 'put something in the basket'), - ui('inventory', 'Storeroom', 'places', 'what you own but have not placed'), ui('book', 'Book', 'places', 'the Reef Journal and guides'), + ui('inventory', 'Pantry', 'places', 'what you own but have not placed'), ui('book', 'Book', 'places', 'the Reef Journal and guides'), ui('people', 'People', 'places', 'keepers, friends, followers'), ui('share', 'Share', 'places', 'send a link elsewhere'), ui('pin', 'Pin', 'places', 'keep it on top'), ui('menu', 'Menu', 'system', 'more choices'), ui('bell', 'Notices', 'system', 'what happened while you were away'), ui('gear', 'Settings', 'system', 'change how it works'), ui('help', 'Help', 'system', 'ask or learn how'), ui('sound', 'Sound', 'system', 'sound is on'), ui('mute', 'Muted', 'system', 'sound is off'),