View Source
Description
adds a "View source" link to the "Edit" menu
Updated
November 21, 2023
English (en) العربية (ar) беларуская (be) català (ca) Deutsch (de) Ελληνικά (el) español (es) eesti (et) suomi (fi) français (fr) עברית (he) हिन्दी (hi) hrvatski (hr) magyar (hu) Bahasa Indonesia (id) italiano (it) 日本語 (ja) ქართული (ka) 한국어 (ko) молдовеняскэ (mo) Nederlands (nl) norsk (no) polski (pl) português (pt) português do Brasil (pt-br) русский (ru) Türkçe (tr) українська (uk) Tiếng Việt (vi) 中文(简体) (zh-hans) 中文(繁體) (zh-hant) 中文(香港) (zh-hk) 中文(臺灣) (zh-tw) Translate! [
View ]
View Source adds a "View source" link to the "Edit" dropdown menu that replaces the page's content with the raw code. Pick "View article" from the same menu to return the page to normal. You can view the demo for this script on this page.
Add this to MediaWiki:ImportJS :
dev:View Source/code.js
importArticles
:
Add this JavaScript on your wiki (or add the highlighted text to your existing import statement):
importArticles ({ type : 'script' , articles : [ 'u:dev:MediaWiki:View Source/code.js' , ] });
Local:
Special:MyPage/common.js
Importing multiple scripts? This quick guide shows how to combine the imports. For personal use, note that personal JS must be enabled for your account. If the script requires configuration through MediaWiki:Common.js for sitewide use, don't forget to contact Fandom Staff to get it enabled on your wiki, if it isn't already enabled.