diff options
| author | yo momma <shutup@oops.wtf> | 2026-02-04 19:04:59 +0000 |
|---|---|---|
| committer | yo momma <shutup@oops.wtf> | 2026-02-04 19:04:59 +0000 |
| commit | ad4d74ea45be6b227027588f6515fb22fafc335a (patch) | |
| tree | dc33e854cc1f6f7d12ca746edef0e844be17f97f /static/js/pichat2.js | |
| parent | ae480c44c59a9e77ea279f2208dd7f932079e078 (diff) | |
Refactor UI: dump classes -> hump
Diffstat (limited to 'static/js/pichat2.js')
| -rwxr-xr-x | static/js/pichat2.js | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/static/js/pichat2.js b/static/js/pichat2.js index e6078eb..c2e5e3f 100755 --- a/static/js/pichat2.js +++ b/static/js/pichat2.js @@ -265,7 +265,7 @@ window.Away = { "updateTitle": function () { if (Away.UnseenMsgCounter > 0) { var plural = Away.UnseenMsgCounter > 1 ? 's' : ''; - $('title').text(Away.UnseenMsgCounter + ' new dump' + plural + '! | ' + Away.OrigTitle); + $('title').text(Away.UnseenMsgCounter + ' new hump' + plural + '! | ' + Away.OrigTitle); } setTimeout(Away.updateTitle, Away.UpdateFrequency); @@ -286,22 +286,22 @@ function initChat() { $('#imgbutton input').attr('checked', ImgsEnabled).change(setImgsEnable); /* $('#clearbutton input').click(function() { track('UI', 'ClearScreen'); - $('.dump').remove(); + $('.hump').remove(); $(this).removeAttr('checked'); return false; }); */ $('.oldmsg').each(function() { - var dump = $(this); - var content = dump.find(".content") - MessageContentCache[dump.attr("id").substr(8)] = content.text() + var hump = $(this); + var content = hump.find(".content") + MessageContentCache[hump.attr("id").substr(8)] = content.text() content.html(buildMsgContent(content.text(), Recips)); - if ((ImgsEnabled && dump.hasClass('contains-image')) || (TextEnabled && !dump.hasClass('contains-image'))) - dump.show(); + if ((ImgsEnabled && hump.hasClass('contains-image')) || (TextEnabled && !hump.hasClass('contains-image'))) + hump.show(); else - dump.hide(); + hump.hide(); }); Drag.bindImages(); @@ -386,7 +386,7 @@ function makePlainText() { function initChatThumb(){ $(".chat-thumb").live('mouseover mouseout', function(e) { - var favorited = $(this).parents(".dump").hasClass("favorite") ? true : false; + var favorited = $(this).parents(".hump").hasClass("favorite") ? true : false; if (e.type == "mouseover") { if (favorited) { $(this).attr("src", Imgs.chatThumbOff); @@ -413,10 +413,10 @@ function initChatThumb(){ -// grab message id etc from some element e that's inside a dump -// (messages have something like id="message-0001" class="dump" ) +// grab message id etc from some element e that's inside a hump +// (messages have something like id="message-0001" class="hump" ) function getMessageInfo(e){ - var message = $(e).parents(".dump") + var message = $(e).parents(".hump") var id = message.attr("id").substr(8) // cut "message-001" to "001" var nick = message.attr("nick") var link = "/p/" + nick + "/" + id @@ -462,12 +462,12 @@ function setTextEnable() { TextEnabled = true; Preferences.setProperty("chat.textEnabled", "false"); track('UI', 'TextEnabled'); - $('.dump').not('.contains-image,'+muted).show(); + $('.hump').not('.contains-image,'+muted).show(); } else { TextEnabled = false; Preferences.setProperty("chat.textEnabled", "false"); track('UI', 'TextDisabled'); - $('.dump').not('.contains-image').hide() + $('.hump').not('.contains-image').hide() } }; @@ -529,7 +529,7 @@ function initDirectory() { t.html(buildMsgContent(t.text())); }); Search.initInpage() - initLogThumb('.dlogged-dump .thumb', '.dlogged-dump'); + initLogThumb('.dlogged-hump .thumb', '.dlogged-hump'); } // See log.js @@ -967,11 +967,11 @@ parseUri.options = { function initLog(recips) { Search.initInpage(); - $('.logged-dump .content').each(function() { + $('.logged-hump .content').each(function() { var t = $(this); t.html(buildMsgContent(t.text(), recips)); }); - initLogThumb(".logged-dump .thumb", '.dump'); + initLogThumb(".logged-hump .thumb", '.hump'); } @@ -1036,7 +1036,7 @@ function invalidImageDomain(content) { function clearMessages(){ track('UI', 'ClearScreen'); - $('.dump').remove(); + $('.hump').remove(); } function submitMessage() { @@ -1117,7 +1117,7 @@ function buildMessageDiv(msg, opts) { if (displayStyle === '' && MUTES[nick]) displayStyle = ' style="display: none"'; - return '<div class="msgDiv dump ' + loadingClass + containsImageClass + " nick_" + nick + '" ' + msgId + displayStyle + '>' + return '<div class="msgDiv hump ' + loadingClass + containsImageClass + " nick_" + nick + '" ' + msgId + displayStyle + '>' + '<span class="nick"><b><a href="' + RootDomain + nick + ' ">' + nick + '</a></b>' + ' <img src="'+Imgs.chatThumbDot+'" class="chat-thumb" onclick="Tag.favorite(this)"> ' + '</span>' @@ -1573,7 +1573,7 @@ function initProfile(recips) { $('#edit-toggle').click(enableProfileEdit); activateProfileEditable(); - $('.dash-dump .content').each(function() { + $('.dash-hump .content').each(function() { var t = $(this); t.html(buildMsgContent(t.text())); }); @@ -2014,17 +2014,17 @@ window.SpaceFill = { Tag = { "favorite": function(button) { var message = getMessageInfo(button); - var favorited = $(button).parents(".dump").hasClass("favorite"); + var favorited = $(button).parents(".hump").hasClass("favorite"); if (favorited) { Tag.rm(message.id, "favorite"); - $(button).parents(".dump").removeClass("favorite"); + $(button).parents(".hump").removeClass("favorite"); if (RawFavs[message.id]) { delete RawFavs[message.id]; paletteImageCache = false; } } else { Tag.add(message.id, "favorite"); - $(button).parents(".dump").addClass("favorite"); + $(button).parents(".hump").addClass("favorite"); if (RawFavs && MessageContentCache[message.id]) { // chat ui stuff if ($("#palette-button").css("display") == "none") paletteButtonShowAnim(); @@ -2051,19 +2051,19 @@ Tag = { "animated_fav": function(button, scoreClass, bigTextSize, smallTextSize) { if (!Nick) { return; } Tag.favorite(button); - var $dump = $(button).parents(".dump"); - var isAdding = $dump.hasClass('favorite'); + var $hump = $(button).parents(".hump"); + var isAdding = $hump.hasClass('favorite'); // Frontpage-favs can be triggered by clicking score number, // so manually sync heart-thumb visual state. if ($(button).hasClass('hallscore')) { - $dump.find('.thumb').attr('src', isAdding ? Imgs.logThumb : Imgs.logThumbOff); + $hump.find('.thumb').attr('src', isAdding ? Imgs.logThumb : Imgs.logThumbOff); } - if ($dump.attr('nick') == Nick) + if ($hump.attr('nick') == Nick) return; - var $score = $dump.find(scoreClass); + var $score = $hump.find(scoreClass); var inc = isAdding ? 1 : -1; var oldScore = parseInt($score.text(), 10); $score.text(oldScore + inc); @@ -2076,9 +2076,9 @@ Tag = { .attr('href', Domain + '/' + Nick + '/popular') .append($('<b>').text(Nick)) .append(" "); - $dump.find('.faver-list').append(link); + $hump.find('.faver-list').append(link); } else { - $dump.find('.faver-list b').filter(function() { return $(this).text() == Nick }).parent().remove(); + $hump.find('.faver-list b').filter(function() { return $(this).text() == Nick }).parent().remove(); } } } |
