The script below puts it at the beginning of the comment header, just after the up/down vote arrows.
This has been tested in Firefox.
// ==UserScript==
// @name HN: Change location of comment-collapse toggle switch
// @namespace HN_sendos
// @include https://news.ycombinator.com/item?id=*
// @version 1
// @run-at document-idle
// @grant none
// ==/UserScript==
(function()
{
var allPosts = document.getElementsByClassName('comhead');
for (var i = 0; i < allPosts.length; i++)
{
allPosts[i].innerHTML = allPosts[i].innerHTML.replace(RegExp("^(.+)(<a class=\"togg\" .+</a>)(.*)$","mg"), "$2 $1 $3");
}
})();No comments yet.