User:Flaarnsturgen/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
== JavaScript ==

=== viewSource ===

This code will create a new button called '''[view source]''' to the left of the '''[edit this page]''' button (unless you're already editing a page or the page is protected). Technically, it takes you to editing the page, but removes the interface (edit summary box, minor edit and watch checkboxes, save/preview/show changes buttons) below the editing box. This will prevent you from accidentally saving the page if you were just playing with the content.

To install it, add the following to [[Special:Mypage/monobook.js|your monobook]]:

<source lang=javascript>
importScript('User:Misza13/viewSource.js');
</source>