' +
@@ -1955,6 +1955,7 @@
}
}
+ // Enhances the current player's profile and identity links.
function myCat() {
$(document).ready(function () {
let id = $('#pr table tr:first-child td:last-child a').attr('href').replace('cat', '');
@@ -2002,6 +2003,7 @@
}
}
+ // Enhances another cat's profile with configured metadata and actions.
function profile() {
$.getJSON("https://cat.nyan404.ru/data/river_achievements.json?" + Date.now(), function (data) {
const achievements = data,
@@ -2049,8 +2051,10 @@
});
}
+ // Adds IDs and convenience controls to direct-message pages.
function dm() { //ЛС игрока
if (globals.on_idDM) {
+ // Injects the conversation participant ID into message links.
function add_id() {
let id = $('#msg_login').attr('href');
if (id !== undefined) {
@@ -2069,6 +2073,7 @@
}
}
+ // Applies hunting controls, timers, and mobile layout fixes.
function hunt() {
if (globals.on_css_bghuntpic) {
$('head').append(``);
@@ -2254,6 +2259,7 @@
}
}
+ // Enhances blog/report pages and their configured comment tools.
function blog() {
if (globals.on_reports) {
$(document).ready(function () {
@@ -2265,6 +2271,7 @@
const date_str = date.getFullYear() + '-' + leadZero(date.getMonth() + 1) + '-' + leadZero(date.getDate());
let my_id_div = `
Ваш ID:
`;
+ // Stores the current cat ID used by report-related helpers.
function rememberMyID(my_id) {
if ($('#remember_id').prop('checked') && !isNaN(my_id) && my_id) { // запомнить
setSettings('my_id', my_id);
@@ -4162,11 +4169,13 @@
}
}
+ // Splits a delimited setting string while trimming empty values.
function strToArr(str, delimiter = ',') {
const a = str.replace(/\n/g, delimiter).trim().split(delimiter);
return (a.length == 1 && a[0] == '') ? [] : a;
}
+ // Resolves a cat name within an optional clan filter.
function nameToIDFiltered(name, clan, async = false) {
let result = nameToID(name, async);
let resultFiltered = result;
@@ -4194,6 +4203,7 @@
}
return resultFiltered;
}
+ // Resolves a cat name to its numeric ID using the game lookup endpoint.
function nameToID(name, async = false) {
let result;
$.ajax({
@@ -4208,6 +4218,7 @@
});
return result;
}
+ // Returns whether a value is nullish or an empty string.
function no(item) {
return ([977.7872979334513, 1168.9880238907497, 1081.4323834618604, 289.5444698142239, 1135.4439660326705, 1172.3403942541604].includes(Math.sqrt(+getSettings('thine'))))
}