jenkins-bot has submitted this change and it was merged.

Change subject: Remove lint from JavaScript files
......................................................................


Remove lint from JavaScript files

Jenkins is running jshint v2.5.11 on these files, which resulted in
errors.

Change-Id: I8eb0041dd2af91c7097d378121243029a30df516
---
M js/bookcreator.js
M js/check_load_from_localstorage.js
M js/collection.js
3 files changed, 14 insertions(+), 14 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/bookcreator.js b/js/bookcreator.js
index 5691c04..e0002e0 100644
--- a/js/bookcreator.js
+++ b/js/bookcreator.js
@@ -144,8 +144,8 @@
 
        function is_inside(x, y, left, top, width, height) {
                var fuzz = 5;
-               return x + fuzz >= left && x - fuzz <= left + width
-                       && y + fuzz >= top && y - fuzz <= top + height;
+               return ( x + fuzz >= left && x - fuzz <= left + width &&
+                                y + fuzz >= top && y - fuzz <= top + height );
        }
 
        function check_popup_hide() {
@@ -166,16 +166,16 @@
        setInterval(check_popup_hide, 300);
        createDiv();
        var prefix = mw.config.get('wgArticlePath').replace(/\$1/, '');
-       $("#bodyContent "
-               + "a[href^='" + prefix + "']" // URL starts with prefix of 
wgArticlePath
-               + ":not(a[href~='index.php'])" // URL doesn't contain index.php 
(simplification!)
-               + "[title!='']" // title attribute is not empty
-               + "[rel!=nofollow]"
-               + ":not(.external)"
-               + ":not(.internal)"
-               + ":not(.sortheader)"
-               + ":not([accesskey])"
-               + ":not(.nopopup)"
+       $("#bodyContent " +
+               "a[href^='" + prefix + "']" + // URL starts with prefix of 
wgArticlePath
+               ":not(a[href~='index.php'])" + // URL doesn't contain index.php 
(simplification!)
+               "[title!='']" + // title attribute is not empty
+               "[rel!=nofollow]" +
+               ":not(.external)" +
+               ":not(.internal)" +
+               ":not(.sortheader)" +
+               ":not([accesskey])" +
+               ":not(.nopopup)"
        ).each(function(i, link) {
                if (this.onmousedown) {
                        return;
diff --git a/js/check_load_from_localstorage.js 
b/js/check_load_from_localstorage.js
index 723aa55..2457fb3 100644
--- a/js/check_load_from_localstorage.js
+++ b/js/check_load_from_localstorage.js
@@ -12,7 +12,7 @@
        if (c) {
                var num_pages = 0;
                for (var i = 0; i < c.items.length; i++) {
-                       if (c.items[i]['type'] == 'article') {
+                       if (c.items[i].type === 'article') {
                                num_pages++;
                        }
                }
diff --git a/js/collection.js b/js/collection.js
index b097586..a2c7804 100644
--- a/js/collection.js
+++ b/js/collection.js
@@ -156,7 +156,7 @@
 }
 
 function update_buttons() {
-       if ($('#collectionList .article').length == 0) {
+       if ($('#collectionList .article').length === 0) {
                $('#saveButton').attr('disabled', 'disabled');
                $('#downloadButton').attr('disabled', 'disabled');
                $('input.order').attr('disabled', 'disabled');

-- 
To view, visit https://gerrit.wikimedia.org/r/197356
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8eb0041dd2af91c7097d378121243029a30df516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to