Jump to content

Move warned comments to the end of the suggestion


base64

Recommended Posts

Current situation:
Users cannot see contents of warned comments by default
Users cannot "like" warned comments
Users cannot "dislike" warned comments
Users cannot make subcomments to warned comments
Subcomments of warned comments are not hidden
Warned comments are usually sorted from oldest to newest
Warned comments can reside between two top-level valid comments
 
Problem:
Warned comments catch the most attention especially when they are posted first
Subcomments of warned comments distract users from reading the next valid comment
 
Solution:
Move all warned comments along with their subcomments to the end of the suggestion
Optional: Hide subcomments of warned comments unless the user clicks "Show" 
 
The first part:
// ==UserScript==
// @name       Backpack.tf Move warned comments to the end
// @namespace  http://backpack.tf/
// @version    1.0
// @description  Because
// @include    http://backpack.tf/vote/id/*
// @copyright  2013+, base64
// ==/UserScript==

$( document ).ready(function() {
	$('div.widget-content.padded').find('div.comment-warning').nextAll('ul').andSelf().each(function () {
		$(this).appendTo($(this).parent());
	});
});

 

Testing without installing userscript:

 

If you are using Chrome and you want to test it out

Go to http://backpack.tf/vote/id/52634aec4dd7b81d378b4568

Press F12

Click "Console"

Paste the following code

$('div.widget-content.padded').find('div.comment-warning').nextAll('ul').andSelf().each(function () {$(this).appendTo($(this).parent());});

Press Enter

Observe difference

 

and if you want to test the effects of hiding subcomments of warned comments manually

Paste the following code afterwards

$('div.widget-content.padded').find('div.comment-warning').nextAll('ul').hide();

Press Enter

Observe difference

movewarned.zip

Link to comment
Share on other sites

I upvote this. Too many times have I seen half the page of a key/bud suggestion filled with warns and I have to scroll for about 15 seconds just to find the comment that I was looking for.

Link to comment
Share on other sites

Unless i'm just being stupid....doesn't that just move the warned subcomments to the bottom of that comment thread, and not actually affect main-comments that have been warned? 

Link to comment
Share on other sites

Unless i'm just being stupid....doesn't that just move the warned subcomments to the bottom of that comment thread, and not actually affect main-comments that have been warned? 

 

It moves the whole damn thing. 

 

Warned comments + all subcomments of warned comments. 

Link to comment
Share on other sites

This one hides subcomments of warned comments unless the user clicks "Show" 
 
but it might be buggy. 
 

// ==UserScript==
// @name       Backpack.tf Move warned comments to the end
// @namespace  http://backpack.tf/
// @version    1.1
// @description  Because
// @include    http://backpack.tf/vote/id/*
// @copyright  2013+, base64
// ==/UserScript==

$( document ).ready(function() {
	$('div.widget-content.padded').find('div.comment-warning').nextAll('ul').andSelf().each(function () {
		$(this).appendTo($(this).parent());
	});

	$('div.widget-content.padded').find('div.comment-warning').nextAll('ul').toggle();

	$("button:contains('Show')").attr('onclick','').unbind('click');

	$("button:contains('Show')").each(function () {
		$(this).click(function() {
			$(this).parent().parent().parent().prev().toggle();
			$(this).parent().parent().parent().parent().nextUntil('div').toggle();
		});
	});
});
Link to comment
Share on other sites

Good proof upvote (i wish i was a programmer/ good at programming to make things like this, welp, gotta wait 6 more years)

Why the wait? I know many people under the age of 15 that are programming geniuses. And the best part is it's easy to score a job if you're simply good at what you do -- that sort of business wants efficiency rather some lousy paper diploma.

Link to comment
Share on other sites

Why the wait? I know many people under the age of 15 that are programming geniuses. And the best part is it's easy to score a job if you're simply good at what you do -- that sort of business wants efficiency rather some lousy paper diploma.

 

well, my school TOTALLY encourages me to try things that aren't given in the syllabus. Also, school is taking a lot of my time so i have no intention to study something new, my subjects are more than enough

Link to comment
Share on other sites

  • Administrators

Yes, moving the warned comments below to the page will help reading all the other comments. Nice suggestion. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...