2,733
edits
Red Leader (talk | contribs) (Start cleanup) |
Red Leader (talk | contribs) (Finish re-write) |
||
Line 1: | Line 1: | ||
The '''Instant-Cquotes''' script is a | The '''Instant-Cquotes''' script is a userscript implemented in JavaScript in order to convert [http://forum.flightgear.org/ forum] or [[mailing list]] quotes into MediaWiki markup. It is supported by Firefox, Chrome/Chromium, Opera, Safari. | ||
== Background == | == Background == | ||
FlightGear development is not centrally coordinated in any way | FlightGear's development is not centrally coordinated in any way – at best, it is "self-coordinated," i.e., contributors discuss ideas and make proposals to contribute in a certain fashion and then team up to implement certain features and building blocks. | ||
Obviously, ideas and feature requests made by end-users are also appreciated. But at the end of the day, people who do the actual work have | Obviously, ideas and feature requests made by end-users are also appreciated. But at the end of the day, it's the people who do the actual work that have more say about future development than those who make suggestions. Contributors tend to prioritize items that are prioritized/suggested by other contributors, especially regular contributors and/or those offering to get involved and help in some way. | ||
Unfortunately, because of the lack of development manpower, many good ideas tend to have a fairly long shelf life; there is a danger that good ideas may be forgotten over time. | |||
This is | This is why it is important for other developers/contributors to know who came up with a certain idea and who originally supported it, possibly months (or even years) after a discussion took place. Good ideas should not just be preserved, but accompanied by corresponding quotes, linking back to the original discussion, so that potential contributors can make up their own minds to determine if/how they want to get involved in some effort or not. | ||
The Instant-Cquotes script is intended to help with this. It also allows people to easily reuse forum or mailing list announcements in wiki articles, e.g., to update the [[Next Changelog|changelog]], [[Next newsletter|newsletter]] or the [[Release plan/Lessons learned]] page. It does this by making it easy to copy & paste important discussions over to the wiki, without having to rewrite any text or manually put together a proper [[Template:FGCquote|Cquote]]. It doesn't take more than a few seconds. | |||
If you want to suggest a new feature/improvement, or have discovered a bug, please add details to the [[#Known Limitations|Known Limitations]] or [[#Feature Requests & Ideas|Feature Requests & Ideas]]. | |||
== Example Output == | == Example Output == | ||
Line 25: | Line 28: | ||
|title=<nowiki>Re: Get objects to show up on Map/Radar</nowiki> | |title=<nowiki>Re: Get objects to show up on Map/Radar</nowiki> | ||
|author=<nowiki>Hooray</nowiki> | |author=<nowiki>Hooray</nowiki> | ||
|date= | |date=Jun 14th, 2014 | ||
}} | }} | ||
}} | }} | ||
== Installation == | == Installation == | ||
* Install | * '''Firefox''' | ||
# Install [http://www.greasespot.net/ Greasemonkey]. | |||
# Save [[#the script|the script]] below as <code>instant_cquotes.user.js</code>, then drag-and-drop it into Firefox. | |||
* '''Chrome/Chromium''', '''Opera''', or '''Safari''' | |||
# Install [https://tampermonkey.net/ Tampermonkey] (download links: [https://tampermonkey.net/index.php?ext=dhdg&browser=chrome Chrome/Chromium], [https://tampermonkey.net/index.php?ext=dhdg&browser=opera Opera], [https://tampermonkey.net/index.php?ext=dhdg&browser=safari Safari]). | |||
# Navigate to "Add a new Script" | |||
# Copy and paste [[#the script|the script]] below into the editing window. | |||
# Click the save button (just above the {{button|Search}} button). | |||
== Usage == | == Usage == | ||
# Go to some [[mailing list]] archive URL, for example: http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/5389094A.3080601%40gmail.com/#msg32400727 | |||
: | : Or to any forum message, such as: http://forum.flightgear.org/viewtopic.php?f=71&t=23299#p212558. | ||
# Select the relevant portion of text. | |||
# When you release the mouse button, a box will appear containing the converted text. | |||
# As the text will already be selected for you, press {{key press|Ctrl|c}} to copy it. | |||
# Paste the text into the desired wiki page. | |||
== | == Development == | ||
{{Note|A Chrome/Chromium-specific extension that will not need Tampermonkey installed is under development.}} | |||
* | |||
== Issues/limitations == | |||
* Quoting code doesn't work properly yet. {{Not done}} | |||
* The | * The JavaScript <code>alert();</code> boxes used are typically restricted to a max size of about 10 kb {{clarify}}; other options should be looked at. {{Not done}} | ||
== Feature | == Feature requests & ideas == | ||
* GET-encoded sid arguments should be stripped from forum URLs | * GET-encoded sid arguments should be stripped from forum URLs. {{Not done}} | ||
* | * Links to repositories should be converted to use wiki templates. {{Not done}} | ||
* | * The {{Abbr|regexes|regular expressions}} used may fail if the HTML DOM of the source changes (e.g., phpBB/theme update) | ||
** Show a warning when that's the case. {{Not done}} | |||
** Try multiple regexes in order. {{Not done}} | |||
* Use the script to update previously created Cquotes automatically | |||
** Instead of using the getSelection() helper, we could register a match for <tt>wiki.flightgear.org</tt> with <code>action=edit</code> set, so that we can directly process all text of an edited page, using AJAX calls to open the URL in the background. {{Not done}} | |||
== The Script == | == The Script == |