Last modified: 2013-08-08 04:06:11 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 T8883, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6883 - Allow page-specific inclusion of <script>s, etc. in header
Allow page-specific inclusion of <script>s, etc. in header
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 31958 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-31 21:20 UTC by Aryeh Gregor (not reading bugmail, please e-mail directly)
Modified: 2013-08-08 04:06 UTC (History)
9 users (show)

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


Attachments

Description Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-31 21:20:04 UTC
Consider http://kryogenix.org/code/browser/sorttable/.  It would be tremendously
useful on all sorts of pages . . . but it requires 6 KB of Javascript to be
included.  Not good.  Consider, however, if the code could be added by an admin
to a special namespace, say [[Include:Sorttable.js]], and then the text
"{{Include:Sorttable.js}}" would add that page's wikitext to the page in
question via a <script> in the header?  Any page where a sortable table would be
used could include that, for great increase and functionality with no needless
bandwidth loss.

Obviously, only certain specially-designated pages could be included, namely
ones in the Include: namespace.  The file would presumably be Javascript, but it
could be applied to CSS as well if that would be useful to someone.
Comment 1 Rob Church 2007-06-08 00:33:31 UTC
Now feasible thanks to ParserOutput::$mHeadItems et al.
Comment 2 Rd232 2011-12-03 13:13:22 UTC
*** Bug 31958 has been marked as a duplicate of this bug. ***
Comment 3 Gregor Hagedorn 2011-12-03 13:26:43 UTC
Yes, Bug 31958 (marked as duplicate) contains some scenarios. The above-mentioned include namespace should be the existing Mediawiki: namespace, but what is still missing is a parserfunction that injects a javascript from Mediawiki-namespace into a specific article page, to support custom functionalities developed by the community according to community needs for specific purposes.

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


Navigation
Links