Wikisource:Shared Scripts
From Wikisource
Here is a list of Javascript tools that are used at Wikisource subdomains. If you use one of them, please add your wiki to the Deployment column.
Note : Some of those scripts have internal messages that need to be localized. In order to display messages in your language, define the ws_messages variable at your wiki, following this example :
self.ws_messages = {
'optlist':'Anzeigeoptionen',
'hide_page_numbers':'Seitenzahlen ausblenden',
'show_page_numbers':'Seitenzahlen einblenden'
}
See en:MediaWiki:Common.js for a complete list.
| Link | Description | Templates | Deployment |
| Base.js | Options toolbox and shared definitions : needed by other scripts | Option | all subdomains except cs, pl, sv |
| OCR.js | OCR button | None | ca, da, de, en, es, et, fr, hr, it, la, no, pl, pt, vec |
| InterWikiTransclusion.js | Multilingual books (example) | Iwpage, Iwpages, IwpageSection, Iwtrans | all subdomains except cs, pl, sv |
| MatchSplit.js | Match & Split gadget (uses PheBot) | None | en, fr, de, it, vec |
| Corrections.js | Corrections (example : 'coquilles' link in the options toolbox) | Corr | ca, en, fr, vec (modified version) |
| Modernisation.js (superseded by LanguageConverter.js) |
Modernisation (example : 'modernisation' link in the options toolbox) | Dictionary | es, fr |
| LanguageConverter.js | Modernisation (example: new portlet in the top) | Dictionary | pt (see global usage of the file) |
| IndexForm.js | Enhanced index form | None | br, en, fr, pt |
| Dictionary.js | Dynamic display of very small pages. Useful for dictionary entries, encyclopedias, etc. (example) | None | fr |
| RegexpButton.js | Regexp button ( |
None | ca fr |
| PageNumbers.js | page numbers and dynamic layouts | pagenum | ca, de, en, es, fr, no, pt |
| DynamicRC.js | Self-updating Recent Changes (requires Firefox 4) | individual setting | |
| SpecialChars.js | Keyboard shortcuts to type special characters. | en, fr | |
| DisplayFooter.js | Add a navigation bar at the bottom of pages that have a header | en, fr, pt | |
| Book2Scroll | Toolserver-based "fluent" page scrolling for multi-page PDF/DjVU files | none yet, could be useful though | en, de, it, pt |
| DoubleWiki.js | Displays an article and its translation on two columns of the same page (uses DoubleWiki extension). See also Compare.js | bn, br, ca, cy, el, fa, fr, hr, hy, mk, nl (others may have the BilingualLink() function directly in their Common.js) | |
| Compare.js | Adds a link to compare two versions of the same work (in the same language or different languages), side-by-side on two columns (example: click on the ⇔ symbols on the left). This is intended as a replacement for DoubleWiki, which does not always work well and does not permit to compare pages in the same language. However the two can coexist. |
AutreVersion for same-language comparison. | es, it, la, pt, vec |
| OldwikisourceInterwiki.js | Makes every link to oldwikisource, in the form of oldwikisource:Foo, look like a regular interwiki link | ||
| TextSizeModifier.js | Provides commands in the sidebar for enlarging/reducing text size | es | |
| TranscludedIn.js | Show one or more tabs, in namespace Page, pointing to the texts that transclude that page. | it, vec, oldwikisource |
You may deploy any of those scripts on your wiki, using the following syntax :
mw.loader.load('//wikisource.org/w/index.php?title=MediaWiki:OCR.js&action=raw&ctype=text/javascript');