⚠️ Warning: This is a draft ⚠️
This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.
If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.
Come up with the most useful feature additions you can think of for Rosetta Code.
The features shouldn't be ''necessary'' for use of the site.
Take a good look at the CSS involved and surrounding code examples; Ages ago, I added CSS classes that the site highlighting doesn't use, with the intent of enabling programmatic awareness.
For the moment, consider any exposed functionality and structured formatting on the site fair game; I don't know that any of it will be removed in the foreseeable future.
Don't forget about the MediaWiki API.
If you'd like some changes server-side, mention it. If it can be done within reasonable resource requirements (server and my own time), and isn't a major problem in some other respect, I might do it.
If you're limited by testing resources, mention it; perhaps someone with another browser will lend a hand.
If you're hampered by problems with the way the site content exists, this would be a good time to identify specific limitations and fix them where possible.
Inclusion to sitewide JS load, for whatever that's worth.
My appreciation, for whatever that's worth.
Maybe, just maybe, I'll be able to send a specialized T-shirt, mug, greeting card or some such. It depends on how many people I'd have to send to.
What do you need prizes for? I thought you guys all coded because you enjoyed it! --[[User:Short Circuit|Michael Mol]] 14:01, 19 May 2010 (UTC)
== Language comparison script ==
[[Rosetta Code:Language comparison script]]
This script puts checkboxes next to each language in the ToC which can be checked to compare a number of languages. I chose to leave them underneath the ToC rather than floating them next to it due to the observation that many of the examples have fairly long line lengths, making side-by-side comparison rather difficult space-wise.
--[[User:Tyrok1|Tyrok1]] 00:16, 20 May 2010 (UTC)
: I took the liberty of playing around a bit with the DOM after your script did its job: [[:File:Compare Languages Concept.png]]. Depending on the display resolution a side-by-side comparison of at least two languages should be possible in most cases, I think. The ToC in its smaller form there might need work; that doesn't look too compelling yet, but it's at least much shorter (vertically) than before. But that was just a rough idea what could be done. Overall I think a side-by-side view would be quite nice to have. —[[User:Hypftier|Johannes Rössel]] 06:22, 20 May 2010 (UTC)
: Jeepers, have you got a large screen. :) I'll see what I can do. --[[User:Tyrok1|Tyrok1]] 14:07, 20 May 2010 (UTC)
: New version's up at the same link - [[Rosetta Code:Language comparison script]] Please let me know what you think. --[[User:Tyrok1|Tyrok1]] 21:01, 21 May 2010 (UTC)
: The script is on its own page now. The links are updated to reflect this. --[[User:Tyrok1|Tyrok1]] 03:19, 23 May 2010 (UTC)
: Updated links after moving page to Rosetta Code namespace. --[[User:Tyrok1|Tyrok1]] 03:18, 25 May 2010 (UTC)
Could this maybe be changed to that it doesn't show the boxes on talk pages? Sometimes they get enough sections to get ToC's, but they don't need to be compared. Unless it would be advantageous to only show some sections of talk pages...? --[[User:Mwn3d|Mwn3d]] 03:18, 26 May 2010 (UTC)
: The new version is supposed to only activate if it's on a page that's in the Programming Tasks category, so in theory it shouldn't do that anymore. However, it's certainly possible you found a bug, and if the new version's still doing that, can you post an example link? --[[User:Tyrok1|Tyrok1]] 23:17, 26 May 2010 (UTC)
== Direct links to language examples when coming from a language page ==
Just a random thought/idea: Since languages are categories they simply aggregate all pages that are tagged with that category. For languages hwoever, there is also a pretty rigid structure on this site concerning ''where'' the interesting part (concerning a particular language) is on a task page. Currently the links to the tasks from a language page simlpy link to the task page (which for a normal Wiki is fine since it's the ''page'' that's in the category, not a section). But on RC those links could – theoretically – link directly to the appropriate section (which is probably what a user might expect when clicking on a task link on a language page).
For most languages this is rather simple, I think, since the anchor name on the task page is identical to the language's name (which is also the category name for that language). However, for a few languages, including C# and F#, this doesn't quite work, as their categories are named »C sharp« and »F sharp« and the anchors use »C.23« and »F.23« (apparently url-encoded and
% replaced by
.). The name used in the anchors appears to be nowhere to grab for JS on the language page, although this might be solvable with converting the infobox into a template which makes the intended/canonical name accessible via a
<span class='intended-name'> or so. –[[User:Hypftier|Johannes Rössel]] 21:18, 21 May 2010 (UTC)
:See [[Rosetta_Code:Village_Pump/Language_Page_Links|language page links]] (includes code). [[User:BR|BR]] 01:38, 21 November 2010 (UTC)
== Per-code example buttonbar ==
Buttonbar set per-code example. Including features like:
- "Select all" -- for easy copy
- "Try on Codepad" -- for languages which support Codepad
- "Collapse/Shrink" -- to optionally shrink/expand code examples.
- "Show/Hide tags" -- Adding to arbitrary categories like [[:Category:Examples/Tags/Functional]], [[:Category:Examples/Tags/pure code]] or any other arbitrary tag
: Didn't add Collapse/Shrink, as I'm not sure this is necessary with the language comparison script. Didn't add Show/Hide Tags as I don't believe there are tags yet to show or hide. However, this script implements Select All, Copy to Clipboard (in IE), and Try on Codepad: : [[Rosetta Code:Per-Code Example Buttonbar]] : --[[User:Tyrok1|Tyrok1]] 01:14, 6 July 2010 (UTC)
:: Just made a change that should fix it. If you could try it out again and let me know if it works, that'd be great. --[[User:Tyrok1|Tyrok1]] 12:08, 13 July 2010 (UTC)
== Syntax highlighting selector color picker ==
Color picker for GeSHi highlighting CSS selectors. Save to cookies or HTML5 local datastore. (There's currently no serverside datastore for RC) --[[User:Short Circuit|Michael Mol]] 20:36, 26 June 2010 (UTC)
: Give this a try - [[Rosetta Code:Syntax Highlight Color Picker]]. --[[User:Tyrok1|Tyrok1]] 19:32, 3 July 2011 (UTC)
== Live version of all JS + HTML examples ==
== "My Scripts" Menu == [[Rosetta Code:My Scripts Menu]]
This script adds a "My scripts" menu next to the "My preferences" button which allows users to choose which JS modules they want to use. It stores the state of these choices in a cookie so it can automatically load the same modules whenever they navigate to a new page. --[[User:Tyrok1|Tyrok1]] 22:28, 18 July 2010 (UTC)