Thảo luận MediaWiki:Common.js

Nội dung trang không được hỗ trợ ở ngôn ngữ khác.
Văn thư lưu trữ mở Wikisource

Để dịch hộp "optlist" ở thanh bên, một bảo quản viên cần thêm đoạn mã này vào script:

self.ws_messages = { 
 "optlist": "Tùy chọn hiển thị",
 "hide_page_numbers": "Ẩn liên kết trang",
 "show_page_numbers": "Hiện liên kết trang",
}

 – Nguyễn Xuân Minh (thảo luận, đóng góp) 16:17, ngày 11 tháng 11 năm 2011 (UTC)[trả lời]

Thêm 1 lỗi ở khung sửa đổi:
'<a href="http://en.wikisource.org/wiki/Wikisource:Chất_lượng_văn_kiện">Tiến triển của văn kiện</a>';
en phải sửa thành vi. Tranminh360 (thảo luận) 09:36, ngày 13 tháng 11 năm 2011 (UTC)[trả lời]
Y Xong. – Nguyễn Xuân Minh (thảo luận, đóng góp) 10:49, ngày 24 tháng 11 năm 2011 (UTC)[trả lời]

Give search results even when page doesn't exist[sửa]

Screenshot of the Earth test search, with this script adding links to Wikidata, Reasonator, Commons, and Wikipedia.

Hello, I propose to enable the tool created by Magnus Manske (creator of MediaWiki) to provide results from other languages and Commons (via Wikidata) when a page doesn't exist here: links are added to Special:Search and noarticletext. This helps to encourage translation and to make readers use your wiki more, because they can be sure to find something even if it's not local (rather than searching directly on the biggest wiki). The Italian and Polish Wikipedias, among others already enabled it by default.
Examples: [1] [2] [3]. More information: Magnus blog.
How to: just add the following line at the end of Common.js.

// Results from Wikidata
// 
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ||  ( mw.config.get( 'wgArticleId' ) === 0 && mw.config.get( 'wgCanonicalSpecialPageName' ) === false ) ) {
	importScriptURI("//en.wikipedia.org/w/index.php?title=MediaWiki:Wdsearch.js&action=raw&ctype=text/javascript");
}
--Nemo ~~~~~ (comments, translations and last instructions)

TypeError: $(...).find(...).attr(...).match(...) is null[sửa]

@[[User:Mxn|]]: The script which mentions OldWikisource:MediaWiki:DoubleWiki.js is causing TypeError: $(...).find(...).attr(...).match(...) is null on the main page. Maybe it could be synced with the original, which has more recent edits? ~~~~