Loading the editor takes time. Why wait, if you only want to read a page's source code? This little tool 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.
Installation
- See also: Help:JavaScript and CSS Cheatsheet
To install View Source, simply add the appropriate row to your importArticles()
call in your global.js or your wiki's MediaWiki:Wikia.js - depending on whether you want to use this addon as a personal script or a site script.
importArticles({
type: 'script',
articles: [
'u:dev:View_Source/code.js'
]
});
Demo
There's no demo as such but this tool is enabled on the entire dev wiki.