Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64295
Change subject: Update formatting
......................................................................
Update formatting
Add .jshintrc too
Change-Id: I9439f7268bdce9e8e6840c412f682e6b4b7c8e5c
---
A .jshintrc
M TocTree.hooks.php
M modules/ext.toctree.js
3 files changed, 32 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TocTree
refs/changes/95/64295/1
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..d7649a3
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,29 @@
+{
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "noempty": true,
+ "nonew": true,
+ "quotmark": "single",
+ "trailing": true,
+ "undef": true,
+ "unused": true,
+ "onevar": true,
+ "bitwise": true,
+ "forin": false,
+ "regexp": false,
+ "strict": true,
+ "laxbreak": true,
+ "smarttabs": true,
+ "multistr": true,
+ "browser": true,
+ "predef": [
+ "mediaWiki",
+ "jQuery",
+ "QUnit"
+ ]
+}
diff --git a/TocTree.hooks.php b/TocTree.hooks.php
index 6edc22f..fed0391 100644
--- a/TocTree.hooks.php
+++ b/TocTree.hooks.php
@@ -10,7 +10,7 @@
* @param OutputPage $out
* @return bool
*/
- public static function wfTocTreeParserOutput( OutputPage &$out ) {
+ public static function wfTocTreeParserOutput( OutputPage &$out ) {
$out->addModules( 'ext.toctree' );
return true;
diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index b091e10..5f85533 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -27,7 +27,7 @@
}
},
- init: function() {
+ init: function () {
var $toc = $( '#toc' );
if ( $toc.length > 0 ) {
@@ -39,7 +39,7 @@
var $mainUl = $( 'ul:first', $toc );
var $mainList = $( 'li', $toc );
- $mainList.each( function( i ) {
+ $mainList.each( function ( i ) {
if ( $( this ).hasClass( 'toclevel-1' ) ) {
$( this ).css( 'position', 'relative' );
var $subList = $( 'ul', $( this ) );
--
To view, visit https://gerrit.wikimedia.org/r/64295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9439f7268bdce9e8e6840c412f682e6b4b7c8e5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits