Last modified: 2012-12-30 20:19:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30475, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28475 - Automatically add a source code link for minimized scripts and styles
Automatically add a source code link for minimized scripts and styles
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-09 22:47 UTC by Nux
Modified: 2012-12-30 20:19 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nux 2011-04-09 22:47:26 UTC
Something like:
"/*\nsource:\n{$strFullUrl}\n*/"

Would be great to quickly view documented source code. For example loaded "MediaWiki:SomeScript.js" would be:
/*
source:
http://en.wikipedia.org/wiki/MediaWiki:SomeScript.js
*/

I've notice this could be added in ResourceLoaderWikiModule but would be removed when minimized...

So if this cannot easily be overridden then probably not worth complication.
Comment 1 Bugmeister Bot 2011-08-19 19:12:58 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 2 Matthew Flaschen 2012-12-30 08:18:58 UTC
There's a ResourceLoader::getScriptURLsForDebug method already that would work for this.  It would have a small perf impact, but it might be worth it.

In the meantime, you can use debug mode: https://www.mediawiki.org/wiki/ResourceLoader/Features#Debug_mode

Note that there is a cookie option, so you don't need to put &debug=true on every request.
Comment 3 Krinkle 2012-12-30 20:19:11 UTC
load.php requests look like this:
> loader.implement(.., function(){..});loader.implement(.., function(){..});loader.implement(.., function(){..});loader.implement(.., function(){..});loader.implement(.., function(){..});loader.implement(.., function(){..});

What is the point of having a url somewhere hidden inside with the location of the unminified source code of that little chunk in the middle of a larger body code with many different modules.

Closing as wontfix for lack of use case.

WikiModule already puts a /* Pagename */ comment in the code in debug mode (not in production mode). If you're looking to change that to a url instead of a pagename, please re-open the bug and clarify for that.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links