Difference between revisions of "MediaWiki/js"

From Freephile Wiki
Jump to navigation Jump to search
m
Line 5: Line 5:
  
 
== Debugging JavaScript ==
 
== Debugging JavaScript ==
<ol>
+
# Access the developer tools of your browser  
<li> Access the developer tools of your browser  
+
** Chrome  <code>CTRL + SHIFT + J</code>  
<ul>
+
** Firefox <code>CTRL + SHIFT + I</code>
<li>Chrome  <code>CTRL + SHIFT + J</code>  
+
# Go to the console tab (look for errors)
<li>Firefox <code>CTRL + SHIFT + I</code>
+
# append <code>?debug=true</code> to the URL and reload the page.  This will give you non-minified JavaScript.
</ul>
 
<li>Go to the console tab (look for errors)
 
<li>append <code>?debug=true</code> to the URL and reload the page.  This will give you non-minified JavaScript.
 
</ol>
 

Revision as of 10:21, 22 June 2016

The first thing to know about MediaWiki and JavaScript is that the site administrator can customize the wiki installation by simply modifying the article MediaWiki:Common.js

For instance, if you put the JavaScript code for wikEd in there, it will make the WikEd editor available to all users of the local wiki.

Debugging JavaScript[edit | edit source]

  1. Access the developer tools of your browser
    • Chrome CTRL + SHIFT + J
    • Firefox CTRL + SHIFT + I
  1. Go to the console tab (look for errors)
  2. append ?debug=true to the URL and reload the page. This will give you non-minified JavaScript.