45

Currently, the only way to cancel stars in a chat transcript is when the chat-message is visible in the chatroom's sidebar.

cancel stars dialog box

However, in a fast-moving, multi-star chatroom, the window of opportunity to cancel can be short, and rapid changes in starring can quickly make this impossible to do in a timely way.

We use stars as markers in moderator chat events (where the Community managers disseminate important information to the moderator teams) as well as for town halls during elections.

Feature request: Allow mods/room owners to cancel stars from the chat message menu box, including in the transcript.

message menu

13
  • 1
    Yes! I was trying to clear some stars earlier and failed miserably because of this.
    – ChrisF Mod
    Commented Feb 5, 2013 at 20:32
  • this would be most useful.
    – voretaq7
    Commented Feb 5, 2013 at 20:44
  • 8
    What? I think you mean that every chat item should get it's own star: clicking on it increases the size and color intensity. Also they should be animated to sparkle. And we should rename chatroom to galaxy. (Seriously, your idea is better. ;-) Commented Feb 5, 2013 at 20:48
  • @JonEricson No no, Chat Katamari! Screw all other ideas and implement Chat Katamari immediately
    – Zelda
    Commented Feb 5, 2013 at 21:06
  • 4
    @BenBrocka shockingly, there are already 331 Google results for "Chatamari Damacy."
    – Pops
    Commented Feb 5, 2013 at 21:14
  • @PopularDemand I get 882. Popularity is through the roof
    – Zelda
    Commented Feb 5, 2013 at 21:16
  • kathack.com
    – user1228
    Commented Feb 5, 2013 at 21:22
  • 1
    Still no answer or action? Commented Jan 8, 2014 at 4:52
  • This would be very very useful, and I can't imagine it's very difficult to implement...
    – David Z
    Commented Sep 10, 2014 at 0:35
  • @Gilles "current answers do not contain enough detail"? I see no answers... :) Commented Nov 27, 2015 at 20:08
  • 1
    @ShadowWizard I think that “” (the sum total of all information contained in the answers) is not enough detail. Commented Nov 27, 2015 at 20:21
  • 1
    @Gilles just nitpicking wrong bounty reason, should choose "Draw attention" or "Authoritative reference needed" when there are no answers at all. :) Commented Nov 27, 2015 at 20:24
  • This post is about possibility of seeing more stars on the starboard: Let me see stars. It is a different question, but still this might help when somebody wants to unstar a message that is too old.
    – Martin
    Commented May 17, 2018 at 9:08

2 Answers 2

11
+50

Until this gets implemented you can use the following userscript to cancel stars as a room owner from the transcript:

// ==UserScript==
// @name         Unstar/unpin for room owners
// @namespace    http://stackoverflow.com/users/578411/rene
// @version      0.1
// @description  unstar
// @author       rene
// @match        *://chat.stackoverflow.com/transcript/*
// @match        *://chat.stackexchange.com/transcript/*
// @match        *://chat.meta.stackexchange.com/transcript/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

// https://meta.stackexchange.com/a/262239/158100
function unstar(node) {
    var fkey = document.getElementById('fkey').value,
        id = node.parentElement.id.split('-')[1];
    $.post('/messages/' + id + '/unstar', {fkey: fkey}, function (data, status, xhr) {
       if (status !== 'success' || data !== 'ok') {
           alert('Not OK? ' + status + ' | ' + data);  
       } else {
           node.remove();
       }
    });
}

function unpinBuilder(node) {
    var outer = document.createElement('span'),
        sprite = document.createElement('span'),
        text = document.createTextNode("unpin/cancel stars (RO only)");

    sprite.className = "sprite sprite-ownerstar-off"
    outer.className = "star";
    outer.appendChild(sprite);
    outer.appendChild(text);

    outer.addEventListener(
        "click", 
        function () {
            unstar(node);
        }, 
        false);
    return outer;
}

function addUnstar(node) {
    var prevNode,
        currentNode,
        i;

    for(i = 0; i < node.childNodes.length; i = i + 1) {
        currentNode = node.childNodes[i];
        if (currentNode.nodeType === 1 && currentNode.nodeName === 'SMALL') {
            if (prevNode.nodeName === 'span') {
                // already added
            } else {
                node.insertBefore(
                    unpinBuilder(node),
                    currentNode);            
            }
            break;
        } else {
            prevNode = currentNode;
        }
    }
}

function processMutationRecord(record) {
    var node;
    if (record.addedNodes) {
        for(var i = 0; i < record.addedNodes.length; i = i + 1) {
            node = record.addedNodes[i];
            if (node.nodeType === 1 && node.nodeName === 'DIV' && node.className === 'popup') {
                addUnstar(node);
            }
        }
    }
}

var mut = new MutationObserver(function(items, src) {
    for(var i=0; i < items.length; i = i +1) {
        processMutationRecord(items[i]);
    }
});

mut.observe(document.getElementById('transcript'), { childList: true, subtree: true });

The script adds an item to the popup and on clicking that item it posts to /messageid/unstar as explained here.

If the script is active this is how your popup should look like:

unpin item in close up dialog

3

I agree except that the users who gave out the stars should be able to remove them as well.

Of course, users who spam stars/remove dozens of stars at the same time can be easily be dealt by room owners and/or mods by allowing them to reverse the stars by themselves (or at least attract attention to that user). Users can have a "starred" history, which is similar to the "favorites" tab in the Profile page. Users can view what they have starred (and the star itself) and be able to remove the star by clicking on the star. Upon clicking, the dialog box will pop up asking if you are sure and voila! The star is removed and that message(s) will no longer be in the starred tab (after a reload).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .