It is a fairly easy to solve issue, and I would be grateful if this is not postponed to future.
Look at this example page please:
http://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:ExtraTools/ExtraTools.js
As you notice, because the wiki is in a right-to-left language, the Javascript code is also rendered right-to-left. Looking at the page HTML, we observe that the Javascript code is inside a PRE tag. If we had a way to add a style to this PRE tag (through common.css file) to force it to be rendered left-to-right, the problem was solved. However, we need a solution which impacts on this PRE only, not all PRE tags on wiki pages (there are cases where a right-to-left PRE is needed).
The solution is fairly easy. We just need to have an ID attribute for the PRE tags used on User:foo/bar.js and User:foo/bar.css pages of the wiki, so we can add this to commons.css:
PRE#theID{
direction:ltr;
}
and voila!
Hope you will oblige.
Version: unspecified
Severity: enhancement