summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/ext.wikiEditor.templates.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/WikiEditor/modules/ext.wikiEditor.templates.js')
-rw-r--r--extensions/WikiEditor/modules/ext.wikiEditor.templates.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/WikiEditor/modules/ext.wikiEditor.templates.js b/extensions/WikiEditor/modules/ext.wikiEditor.templates.js
new file mode 100644
index 00000000..4ac09b54
--- /dev/null
+++ b/extensions/WikiEditor/modules/ext.wikiEditor.templates.js
@@ -0,0 +1,12 @@
+/*
+ * JavaScript for WikiEditor Templates
+ */
+
+$( document ).ready( function() {
+ // Disable for template namespace
+ if ( mw.config.get( 'wgNamespaceNumber' ) == 10 ) {
+ return true;
+ }
+ // Add templates module
+ $( '#wpTextbox1' ).wikiEditor( 'addModule', 'templates' );
+} ); \ No newline at end of file