Talk:Requests for comment/Clickable section anchors

From mediawiki.org

Implementation[edit]

$('#mw-content-text').find('.mw-headline').after(function () {
	return $('<a>')
		.text('[#]')
		.css({'color': '#aaa', 'font-size': '12px', 'margin-left': '1em'})
		.attr('href', '#' + $(this).attr('id'))
})

Code from Matma Rex. --MZMcBride (talk) 18:17, 16 July 2013 (UTC)Reply

Implementation (2)[edit]

See MediaWiki:Gadget-vector-headanchor.js and MediaWiki:Gadget-vector-headanchor.css. Krinkle (talk) 18:22, 16 July 2013 (UTC)Reply

Option 2, left margin looks great to me on desktop. What would be the implementation on mobile, though? Also, have you had a chance to run this by someone in UX? -- RobLa-WMF (talk) 17:35, 2 January 2014 (UTC)Reply

What does it copy, a wikilink, ID, or href?[edit]

The proposal reads to provide a copyable #Hello or possible [[Example page#Hello]]

But the talk about the link icon makes it sound as if it's to provide a full hyperlink URL, https://www.mediawiki.org/wiki/Example_Page#Hello. Well, which? Sometimes you want one, sometimes you want the other.

The Flow discussion and collaboration extension uses a permalink icon in the right margin that is an <a href> hyperlink so that right-click > Copy Link Location provides a full href URL. We may move it into an action menu.

-- S Page (WMF) (talk) 00:02, 7 January 2014 (UTC)Reply