Last modified: 2014-02-24 01:26:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48412, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46412 - Make block and rollback links hide-able
Make block and rollback links hide-able
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.21.x
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-21 11:04 UTC by Theopolisme
Modified: 2014-02-24 01:26 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Theopolisme 2013-03-21 11:04:20 UTC
Per [http://en.wikipedia.org/wiki/Wikipedia:Administrators%27_noticeboard#Recent_changes_tab_in_Preferences_-_special_choices_for_administrators], it became apparent that administrators wanted the ability to selectively hide either the rollback or the block links in [[Special:Watchlist]], [[Special:Contributions]], [[Special:RecentChanges]], etc.

It appears that this is a relatively simple "add some more CSS ids and make another preference" kind of enhancement, but of course I could be mistaken.
Comment 1 Brad Jorsch 2013-03-21 12:18:54 UTC
Rollback buttons are already hidable, the class is mw-rollback-link.

Personally, I don't find the block button much of a concern since the only thing that happens if you click on it is that you are taken to the block form, at which point you simply hit 'back' in your browser.

As for a preference to do so, it's an almost trivial change to Special:Mypage/common.css. I'd say just make a Gadget if people insist.
Comment 2 Technical 13 2013-03-21 12:20:18 UTC
Rollback is in span.mw-rollback-link, so that one can easily be done with a little CSS/JavaScript. Block is a little more difficult to modify from user end without using JavaScript/Jquery to look for the <a> element with the innerHTML of "block".  I tried editing MediaWiki:Blocklink on my test wiki to wrap "block" with a span.mw-block-link, but the MW parser doesn't allow HTML on that message.  Looking at the source a little deeper, that would still leave an extra | that would "look" weird, so the proper workaround would be to use JavaScript/Jquery to find that <a> element, remove the href - title - innerHTML, add a class of "block", then replace " | <a class="block"></a>" with "" in the span.mw-usertoollinks.
Comment 3 Technical 13 2013-03-21 12:50:57 UTC
(In reply to comment #2)
> Rollback is in span.mw-rollback-link, so that one can easily be done with a
> little CSS/JavaScript. Block is a little more difficult to modify from user
> end
> without using JavaScript/Jquery to look for the <a> element with the
> innerHTML
> of "block".  I tried editing MediaWiki:Blocklink on my test wiki to wrap
> "block" with a span.mw-block-link, but the MW parser doesn't allow HTML on
> that
> message.  Looking at the source a little deeper, that would still leave an
> extra | that would "look" weird, so the proper workaround would be to use
> JavaScript/Jquery to find that <a> element, remove the href - title -
> innerHTML, add a class of "block", then replace " | <a class="block"></a>"
> with
> "" in the span.mw-usertoollinks.

On second thought, it would have to be done with JavaScript unless you want those buttons to go away from pages you are reviewing.  It would also be nice if it was incorporated into the server-side PHP so that if those options were checked, the parser wouldn't even include them on the page instead of just hiding them.

As a side-note, I've tried on two different wikis to add:
span.mw-rollback-link {
  text-decoration: blink; //with and without !important
}
to my common.css because the class wasn't responding to my display: hidden/none and it isn't responding to blinking either.  Is it just me not doing it right, or is there a bug somewhere preventing that css from applying to that class?
Comment 4 Brad Jorsch 2013-03-21 13:47:41 UTC
(In reply to comment #3)
> As a side-note, I've tried on two different wikis to add:
> span.mw-rollback-link {
>   text-decoration: blink; //with and without !important
> }
> to my common.css because the class wasn't responding to my display:
> hidden/none
> and it isn't responding to blinking either.  Is it just me not doing it
> right,
> or is there a bug somewhere preventing that css from applying to that class?

display:none works fine for me on enwiki. Since I have browser.blink_allowed set to false in my Firefox, I can't test the other. ;)
Comment 5 Technical 13 2013-03-21 13:50:41 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > As a side-note, I've tried on two different wikis to add:
> > span.mw-rollback-link {
> >   text-decoration: blink; //with and without !important
> > }
> > to my common.css because the class wasn't responding to my display:
> > hidden/none
> > and it isn't responding to blinking either.  Is it just me not doing it
> > right,
> > or is there a bug somewhere preventing that css from applying to that class?
> 
> display:none works fine for me on enwiki. Since I have browser.blink_allowed
> set to false in my Firefox, I can't test the other. ;)

With css?  I still can't get it to work setting the css, but I did get it to work with jquery to .css('display', 'none');

Working on writing a full script to do what the requester wants without needing any core changes.  If whomever has the power wants to assign it to me, I'll write the js and close it as wontfix when js is complete.
Comment 6 Technical 13 2013-03-21 13:51:07 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > As a side-note, I've tried on two different wikis to add:
> > > span.mw-rollback-link {
> > >   text-decoration: blink; //with and without !important
> > > }
> > > to my common.css because the class wasn't responding to my display:
> > > hidden/none
> > > and it isn't responding to blinking either.  Is it just me not doing it
> > > right,
> > > or is there a bug somewhere preventing that css from applying to that class?
> > 
> > display:none works fine for me on enwiki. Since I have browser.blink_allowed
> > set to false in my Firefox, I can't test the other. ;)
> 
> With css?  I still can't get it to work setting the css, but I did get it to
> work with jquery to .css('display', 'none');
> 
> Working on writing a full script to do what the requester wants without
> needing
> any core changes.  If whomever has the power wants to assign it to me, I'll
> write the js and close it as wontfix when js is complete.

Or as worksforme maybe?
Comment 7 Technical 13 2013-03-21 19:16:15 UTC
Okay, the jquery / JavaScript to make those things disappear is:

// Remove [rollback]
$('span.mw-rollback-link').remove();
// Remove " | block" link
$('span.mw-usertoollinks').each(function () {
    var $elem = $(this);
    $elem.children('a:last').replaceWith("-");
    $elem.html($elem.html().replace(" | -", ""));
});
Comment 8 Theopolisme 2013-04-07 01:29:17 UTC
This script does the trick; no need to keep open.
Comment 9 Marius Hoch 2014-02-24 01:26:30 UTC
Marking this as WONTFIX: First of all, this is not possible in the current software (without JS/CSS hacks) so it's not fixed. We also don't want it to be in the software (feature creep, ...), so that this wont be fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links