Page MenuHomePhabricator

New action parameter that renders js/css pages via wiki syntax
Closed, ResolvedPublic

Description

Author: yes0song

Description:
Currently, the contents of javascript and css pages are rendered in <pre> tag. However, I think this can cause inconvenient sometimes.

In Chinese Wikipedia, administrators have described .js/.css source code in MediaWiki: namespace using wiki syntax via /* */ comment lines, e.g.:

/*

中文處理

*/
//设置中文语言页
var htmlE=document.documentElement;
htmlE.setAttribute("lang",wgUserLanguage);
htmlE.setAttribute("xml:lang",wgUserLanguage);

//返回繁簡字串
function wgULS(hans,hant,cn,tw,hk,sg,zh){
...
}

/*

IE兼容性修正

*/
if (navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat"){
(function(){...}

...}

(from [[zh:MediaWiki:Commons.js]])

This was very convenient when MediaWiki of old version was used. In this format, maintainers could divide scripts into sections and it was easy to check what functions are wroted in the page via the ToC made in the wiki page.

However, this became useless now because current MediaWiki software processes .js/.css pages via <pre> tag! Of course, the "<pre> tag-processing" has some merits, but has lost other good points.

Therefore, I request to add new "action=" parameter (for example, "action=wikisyntax"). When "action=wikisyntax", MediaWiki software renders .js/.css pages via wiki syntax not "<pre> tag-processing".


Version: unspecified
Severity: enhancement

Details

Reference
bz13388

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:03 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz13388.
bzimport added a subscriber: Unknown Object (MLST).

Duping to bug 10410, which collects these issues (linking, sections for JS/CSS pages)

  • This bug has been marked as a duplicate of bug 10410 ***