Talk:Old letter

Since there is no TOC, is there an easy way to refer to section anchors besides fishing out the title and constructing the URL manually? It would be useful if it for example provided some self link. You can see how it's done here for instance. It doesn't need to be a word "link" which is somewhat cluttering. Github for example does it as a neat character which only appears when you hover over titles. See here. — Gilrond (talk) 22:27, 25 June 2017 (UTC)
 * I'm not entirely sure what you mean. Creating a link to a given page section is as easy as, or if you prefer   — Game widow ( talk ) 12:56, 26 June 2017 (UTC)
 * Yes, it's surely possible now in that manual fashion, but I meant simply having a link that you can hover over with a mouse, and copy to refer to the wiki from other sites :) See how it's done in other examples I linked above. Nothing major, just usability improvement. — — Gilrond (talk) 01:13, 28 June 2017 (UTC)
 * I still don't get what you are asking, linking to a section of a page from an external source works the same way # — Game widow ( talk ) 11:35, 28 June 2017 (UTC)
 * OK compare these two cases. Currently, to construct the link you need to copy the URL first, then copy section name, construct the result (with #). Then you can paste that result somewhere else, for example on The Witcher forum, to reference subsection of the wiki page :). Now imagine a simpler case, when you hover above the title of the subsection, some "link" symbol appears on the side, you hover over it, right-click and select "copy link". Then you paste it easily somewhere else ;) That's how Github example above works. PCGamingWiki example above is simpler to make, but it's more cluttered - they just provide explicit link with word "link" on the side of each page subsection title. — Gilrond (talk) 03:19, 29 June 2017 (UTC)
 * Dito. Every time I want to post a reference to a special section I have to construct a link manually like you, Gilrond, if this article doesn't shows a TOC. A "Link link" next to the "Edit link" of a section would be nice and helpful. :) — »»Dove«« (talk) 21:49, 2 July 2017 (UTC)
 * You can copy the full url with the section from any page that links to the section you want — Game widow ( talk ) 11:54, 5 July 2017 (UTC)
 * You can copy the link to a section of a page when the #section add already is shown in the url. But usually you open the article - and there is no # section in the url. But if you jump via TOC to a section of an article, the # section is added automatically to the url - so what do you do when there is NOTOC? Right, you have to add the # section manually to the url if you want to post a direct link to this section. ;D — »»Dove«« (talk) 17:46, 5 July 2017 (UTC)
 * That's what the What links here item under Tools is for — Game widow ( talk ) 20:57, 5 July 2017 (UTC)
 * I'm not sure what you refer to in there. I don't see section links there. Regardless, it's all is quite indirect. There can be some automated way (CSS/JavaScript) to easily provide self link to section titles. It can be shown only on demand (when you hover over it), like Github does, to reduce clutter. If needed, I can take a look how to make a simple example like that. — Gilrond (talk) 04:31, 6 July 2017 (UTC)
 * I'm not an HTML expert, but looks like CSS pseudoelements can offer some solution. I'll dig more into it. UPDATE: Looks like it's not possible with CSS as is. See also here. JavaScript? — Gilrond (talk) 04:45, 6 July 2017 (UTC)
 * I'll look for a function that Game widow can implement to our wiki. Just give me some hours. :) — »»Dove«« (talk) 15:23, 6 July 2017 (UTC)
 * I was not able to find an authorized/official extension. But I'll look further. — »»Dove«« (talk) 17:36, 7 July 2017 (UTC)
 * I'll write some JavaScript function, when I'll have time. — Gilrond (talk) 17:39, 7 July 2017 (UTC)
 * What I found out is that Github is using a TOC extension - there you can enable a permalink option in its config file that generates the header (perma)link (see Markdown extensions). Something adequate for mediawiki I still could not find, but maybe this source is helping you, Gilrond, creating a JS solution.— »»Dove«« (talk) 19:40, 7 July 2017 (UTC)


 * @Gilrond: I found a JS+CSS solution for mediawiki here: http://www.websightdesigns.com/posts/view/adding-section-permalinks-to-mediawiki - they show the paragraph &para; symbol after the section header on mouseover. It works, I tested it via my user common.css and common.js. Maybe you can use this code, only exchange the symbol and switch the location to the front of the header, like Github did. Good luck! :) — »»Dove«« (talk) 20:57, 7 July 2017 (UTC)
 * Heh, their idea is similar to mine. I did my test before I saw your link :) I also found this. — Gilrond (talk) 21:34, 7 July 2017 (UTC)
 * OK, I made is a small example (using jquery):

test.html <!doctype html>  Heading links test   $(document).ready(function {   set_heading_links;  }); I"m heading one

I"m heading two

I"m heading three

scripts.js function set_heading_links { $(":header").hover(     function {         var heading = $(this).html.replace(new RegExp(" ", 'g'), "_");         var heading_url = window.location.href.split("#")[0] + "#" + escape(heading);         var heading_link = "&#x1f517;"         $(this).append(heading_link);      },      function {         $(".helper-hover-link").remove;      }   ); }

It works well for me in Firefox. Try it. The point of the test, is to plug links into existing pages, without mangling data. — Gilrond (talk) 21:27, 7 July 2017 (UTC)
 * Cool, i will test it out tomorrow and if it seems to work for most browsers, then we're good to go. As a quick aside, you might want to make it work for h3 as well, as that does happen, on occasion — Game widow ( talk ) 01:49, 8 July 2017 (UTC)
 * See the update. If you want to avoid selecting heading h1, you can use something like: $("h2, h3, h4, h5, h6") for example. — Gilrond (talk) 04:07, 9 July 2017 (UTC)
 * You'd probably need to modify the example, since I think children.remove will remove tags inside h tags (like edit link). You can for example assign that new  tag some id, and then select by that id to remove it. — Gilrond (talk) 08:51, 9 July 2017 (UTC)
 * So does this expect html markup, or will it interpret wiki markup properly ? if it interprets wiki markup, properly, then you can simply add the js to your personal js file and you're all set — Game widow ( talk ) 13:22, 9 July 2017 (UTC)
 * Well, the point is to improve the wiki for everyone :) I'm just guessing above, since I didn't apply the actual code to the wiki. But I see, that h tags have subtags on actual pages, so I suppose children.remove will affect them. I can update the code to limit removal to added tag only, rather than to all h subtags. — Gilrond (talk) 15:53, 9 July 2017 (UTC)
 * See the update, I made it more precise, using helper-hover-link class (hopefully that's unique enough). — Gilrond (talk) 17:20, 9 July 2017 (UTC)
 * @Girlond: In your solution the header is "jumping" while hovering it. In my websightdesigns JS adaption this isn't happening, maybe a matter of CSS? Btw: I don't like the symbol &#x1f517; that much - in IE/Edge it looks quite nice, but in FF and Chrome it looks huge and is only black and white. But I could probably live with that ;) — »»Dove«« (talk) 18:18, 9 July 2017 (UTC)
 * I'll give it a try, integrating it with wiki as you did in the personal js file. — Gilrond (talk) 18:47, 9 July 2017 (UTC)