Nested comments (Userscript): Difference between revisions

From diaspora* project wiki
(Undo revision 10488 by DenSchub (talk))
Tag: Undo
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Languages}}
[[File:NestedComments Streamview.png|thumb|250px|right|Example of a nested comment discussion in the stream-view.]]
 
{{Work_in_progress|date=2014-11-15}}


'''Nested Comments''' is an userscript by [[User:DeusFigendi|Deus Figendi]] that allows to create and view nested comments in diaspora-discussions.
'''Nested Comments''' is an userscript by [[User:DeusFigendi|Deus Figendi]] that allows to create and view nested comments in diaspora-discussions.
Line 7: Line 5:
== Functionality ==
== Functionality ==


[[File:NestedComments Streamview.png|thumb|right|Example of a nested comment discussion in the stream-view.]]
'''Nested Comments''' allows the user to answer directly to a comment. If the script is used, these comments are shown as tree-like subcomments.


'''Nested Comments''' allows the user to answer direct to a single comment instead just to a post. If the Script is used these comments are shown as a tree like subcomment.
=== A little tech ===


=== A little Tech ===
What technically happens is this: the script creates a link, at the beginning of a comment, which leads to another comment. The text shown by the link doesn't matter, just its target. If the target is found on the current page, the comment containing the link is shown as a subcomment of the one it is linking to.


What technicly happens is this: The Script creates a link at the beginning of and comment that shows to another comment. The text the link shows doesn't matter just its target. If the target is found on the current page the comment containing the link is considered and shown as a subcomment of that one that is linked.
This way, the script works totally transparently, not only for the script users but also for those who do not use it. They can just click the link (and read the text hovering over the link, when the hovering option is used) to know the comment it is commenting on.
 
This way the script works totally transparent, also for those who do not use it, they can just click the link and will get to the comment this one is the answer to.


=== Usage ===
=== Usage ===


[[File:NestedComments Hover.gif|500px|right]]Usage is simple, whenever you'd like to comment a comment and not the post move your cursor to the upper right corner of that comment, where you can usually delete your own comments or abuse others. There you will find a little plus (+) symbol, click on it and the comment-area will be prefilled with the code for a link.
[[File:NestedComments Hover.gif|400px|thumb|right|Location of the comment button.]]Usage is simple: whenever you'd like to comment on a comment, not the post itself, move your cursor to the upper right corner of that comment (that's where you can delete your own comments or flag abuse).  


You can just write your comment behind that link and you're done.
There, you will find a little plus (+) symbol; click on it and the comment-area at the bottom of the page will be prefilled with the code for a nested comment link.


Little advanced users can also slightly edit the link. The links target itself should keep untouched otherwise the script will not be able to recognize it. But you can change the text the link shows (even to a nearly not visible single dot) and edit or add the title-text (that is the text shown when you hover a link).
You can just write your comment after that link and you're done.


=== Usage ===
Slightly more advanced users can also edit the link. The link's target should be kept untouched, otherwise the script will not be able to recognize it, but you can change the text the link shows (you may even leave a nearly invisible single dot) and edit or add the title-text (that is the text shown when you hover a link).


''Tentative plan''; ''could include screenshots''; ''it is a bit verbose at this point''
You may use a quote to provide more context. To do so just select some text of the comment and hit the plus(+) while the quote is selected.


''Explain the basics : text selection, ...''
If the quote you use is long (more than 20 characters), it will appear as an hover effect on the name of the commentator which appears at the beginning of your response. Otherwise, your quote appears instead of his or her name.
[[File:long.gif|400px|thumb|right|Using quotes.]]


Then :
== Installation ==


'''Respond to a comment without context'''
=== Requirements ===
As with [[Tools_to_use_with_Diaspora|other scripts for Diaspora]], you will need [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] (Firefox), [https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en Tampermonkey] (Chrome) or [http://en.wikipedia.org/wiki/Greasemonkey#Equivalents_for_other_browsers the equivalent for Safari]. Opera should run userscripts native without any extension.


:::::''a screenshot goes here''
=== Sourcecode, Download and Installation ===


This will only provide the name of the user you're responding to.  
[https://github.com/DeusFigendi/Userscripts/blob/master/Diaspora/Nested_Comments.user.js Sourcecode], [https://github.com/DeusFigendi/Userscripts/raw/master/Diaspora/Nested_Comments.user.js Download and Installation]. Just click to install.


'''Respond with context'''
=== Troubleshooting ===
 
[[File:long.gif]]
 
::''This is especially useful in the case when a commenter says a lot of different things and you wish to focus on one (or some) of those. You may answer to a complex comment with comments targeting different aspects of it.''
 
If you choose to provide context, there are two possibilities:


* If the quote you use is long (more than XX characters), it will appear as an hover effect on the name of the commentator which appears at the beginning of your response. (It can be rather long, but carriage returns ''bla blah blah : Carriage returns are okay at this point, DF?'')
==== Seems the script does not work anyhow ====
:::::''a screenshot goes here''


* If the quote is short, it will appear as is, where the commenter's name would be.
* Check if your pod is listed in the "include"-part of the script in the meta-data in the verry first 50 lines.
* Check if the script is loaded (depends on browser)
* Check if the script throws any errors by opening your error-console (Ctrl+Shift+J) and watching for "nested comments"-errors.


:::::''a screenshot goes here''
==== In a stream like view the comments ain't nested ====


NOTE : ''In any case, the username or context you provide are clickable and link to the comment you're responding to, which allows those who don't use the script to know what you're doing. This being said, you should avoid "me too" or "yes"/"no" comments, which may cause misunderstandings: remember that some will see your response in the usual stacked mode and will tend, if you provide no context, to interpret your response as a response to the last commenter.''
* Unfold the comments by clicking "View more comments"
* Be patient, wait for about 10 seconds.


== Installation ==
==== I'm not sure I've been notified of all recent comments ====


=== Requirements ===
Scroll to the bottom of the page and refresh (Ctrl+R) to see for a few instants the discussion in non-nested view, before the script kicks in.
As with [[Tools_to_use_with_Diaspora|other scripts for Diaspora]], you will need [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Greasemonkey] (Firefox), [https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en Tampermonkey] (Chrome) or [http://en.wikipedia.org/wiki/Greasemonkey#Equivalents_for_other_browsers the equivalent for Safari].


=== Troubleshooting ===
==== The script's too fast! ====


* ''Remarks about the defective notifications system and the fact that it causes the user not to know how many new messages there are?''
* If trying again fails, [http://wiki.greasespot.net/images/7/7a/Win7-ff4-toolbar-monkey-menu.png deactivate the script] and refresh.
* Change the timeout-values at the end of the script to higher values (e.g. 5000ms instead of 1999) to delay that "kick in".

Latest revision as of 00:18, 5 December 2022

Example of a nested comment discussion in the stream-view.

Nested Comments is an userscript by Deus Figendi that allows to create and view nested comments in diaspora-discussions.

Functionality

Nested Comments allows the user to answer directly to a comment. If the script is used, these comments are shown as tree-like subcomments.

A little tech

What technically happens is this: the script creates a link, at the beginning of a comment, which leads to another comment. The text shown by the link doesn't matter, just its target. If the target is found on the current page, the comment containing the link is shown as a subcomment of the one it is linking to.

This way, the script works totally transparently, not only for the script users but also for those who do not use it. They can just click the link (and read the text hovering over the link, when the hovering option is used) to know the comment it is commenting on.

Usage

Location of the comment button.

Usage is simple: whenever you'd like to comment on a comment, not the post itself, move your cursor to the upper right corner of that comment (that's where you can delete your own comments or flag abuse).

There, you will find a little plus (+) symbol; click on it and the comment-area at the bottom of the page will be prefilled with the code for a nested comment link.

You can just write your comment after that link and you're done.

Slightly more advanced users can also edit the link. The link's target should be kept untouched, otherwise the script will not be able to recognize it, but you can change the text the link shows (you may even leave a nearly invisible single dot) and edit or add the title-text (that is the text shown when you hover a link).

You may use a quote to provide more context. To do so just select some text of the comment and hit the plus(+) while the quote is selected.

If the quote you use is long (more than 20 characters), it will appear as an hover effect on the name of the commentator which appears at the beginning of your response. Otherwise, your quote appears instead of his or her name.

Using quotes.

Installation

Requirements

As with other scripts for Diaspora, you will need Greasemonkey (Firefox), Tampermonkey (Chrome) or the equivalent for Safari. Opera should run userscripts native without any extension.

Sourcecode, Download and Installation

Sourcecode, Download and Installation. Just click to install.

Troubleshooting

Seems the script does not work anyhow

  • Check if your pod is listed in the "include"-part of the script in the meta-data in the verry first 50 lines.
  • Check if the script is loaded (depends on browser)
  • Check if the script throws any errors by opening your error-console (Ctrl+Shift+J) and watching for "nested comments"-errors.

In a stream like view the comments ain't nested

  • Unfold the comments by clicking "View more comments"
  • Be patient, wait for about 10 seconds.

I'm not sure I've been notified of all recent comments

Scroll to the bottom of the page and refresh (Ctrl+R) to see for a few instants the discussion in non-nested view, before the script kicks in.

The script's too fast!

  • If trying again fails, deactivate the script and refresh.
  • Change the timeout-values at the end of the script to higher values (e.g. 5000ms instead of 1999) to delay that "kick in".