5

About:

This userscript clones the tags and adds them to the top of the post when working in the review queue. This is in response to a feature-request on Meta Stack Overflow.

enter image description here

Installation:

Install

// ==UserScript==
// @name         Tag Reposition
// @description  Repositions Tags at top of question in review queue
// @namespace    https://stackoverflow.com/users/1454538/
// @author       ᴉʞuǝ
// @match        *://*.askubuntu.com/review/*
// @match        *://*.mathoverflow.net/review/*
// @match        *://*.serverfault.com/review/*
// @match        *://*.stackapps.com/review/*
// @match        *://*.stackexchange.com/review/*
// @match        *://*.stackoverflow.com/review/*
// @match        *://*.superuser.com/review/*
// @exclude      *://api.stackexchange.com/*
// @exclude      *://blog.stackexchange.com/*
// @exclude      *://blog.stackoverflow.com/*
// @exclude      *://data.stackexchange.com/*
// @exclude      *://elections.stackexchange.com/*
// @exclude      *://stackexchange.com/*
// @run-at       document-end
// ==/UserScript==
(function($) {
    $(document).ajaxComplete(function(event, request, settings) {
        if(isReview(settings.url)){
            var $tags,
                $review = $(".review-content"),
                $title = $("<h2/>", {text: "Tags", style:"display: inline-block; margin-right: 5px;"});

            if(isEditReview(window.location.href)){
                $tags = $("a.post-tag:first").parent().clone();
            } else {
                $tags = $(".post-taglist").clone();
            }

            $tags.addClass("subheader").css("border-bottom", "none");
            $tags.prepend($title);
            $review.prepend($tags);
        } 
    });

    function isReview(url){
        var result = false;
        if(~url.indexOf("review/task-reviewed") || ~url.indexOf("review/next-task")){
            result = true;
        }
        return result;
    }

    function isEditReview(url){
        return url.indexOf("edits") === -1 ? false : true;
    }
}(jQuery));
1
  • For js noobs like me follow this installation instruction. Greasemonkey didn't work for whatever reason, but Tampermonkey did. Thanks for creating this script, which makes life easier. Commented Mar 9, 2018 at 12:43

1 Answer 1

1

The script is working except in the Suggested Edits review queue, since the .subheader h2:first does not exist for that queue.

Can you please add some workaround for the Suggested Edits review queue?

3
  • Its working fine except the tag only change edits. Sample. Here it doesn't show the rendered output and markdown. This case need to be handle. Commented Jan 28, 2016 at 4:29
  • 1
    After the fix it's working as expected. Cheers. Commented Jan 28, 2016 at 6:00
  • 1
    Since I don't have enough reputation (currently less than 3K), but I find a sample (from SO meta - audit failed questions) for Close vote, Re open and tested. Everything looking good. Commented Jan 28, 2016 at 6:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.