From d5fe635e18a91769efa22538c2325eab972d9cf7 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 20 Mar 2019 23:57:38 +0000 Subject: [PATCH] resources: Add verifiable upstream for various jquery plugins * jStorage: Plain v0.4.12 release. * throttle-debounce: Plain v1.1 release. * jquery.form: Plain release. (But they don't have a git tag for it). * jquery.fullscreen: This was a pre-release committed in 3fe5f92a26f02 to fix a bug in IE11. We modified the header to indiciate which unreleased hash it came from upstream. Shortly after that, upstream released it proper (only the header was different). * hoverIntent: I accidentally modified this file in 2011 with 85d5e617d77a1f. That (insignificant) change is now reverted. Change-Id: Ibb1d368473b2a4b13795afedb66271a44e7e5bae --- maintenance/resources/foreign-resources.yaml | 30 +++++++++++++++++++ resources/Resources.php | 10 +++---- .../lib/{ => jquery.form}/jquery.form.js | 0 .../jquery.fullscreen.js | 2 +- .../jquery.hoverIntent.js | 4 +-- .../jstorage.js} | 2 +- .../jquery.ba-throttle-debounce.js | 0 7 files changed, 39 insertions(+), 9 deletions(-) rename resources/lib/{ => jquery.form}/jquery.form.js (100%) rename resources/lib/{ => jquery.fullscreen}/jquery.fullscreen.js (99%) rename resources/lib/{ => jquery.hoverIntent}/jquery.hoverIntent.js (98%) rename resources/lib/{jquery.jStorage.js => jquery.jStorage/jstorage.js} (99%) rename resources/lib/{ => jquery.throttle-debounce}/jquery.ba-throttle-debounce.js (100%) diff --git a/maintenance/resources/foreign-resources.yaml b/maintenance/resources/foreign-resources.yaml index 37768cce39..3ecd12e8a3 100644 --- a/maintenance/resources/foreign-resources.yaml +++ b/maintenance/resources/foreign-resources.yaml @@ -90,6 +90,36 @@ jquery.cookie: src: https://raw.githubusercontent.com/carhartl/jquery-cookie/v1.3.1/CHANGELOG.md integrity: sha384-SQOHhLc7PHxHDQpGE/zv9XfXKL0A7OBu8kuyVDnHVp+zSoWyRw4xUJ+LSm5ql4kS +jquery.form: + type: file + src: https://raw.githubusercontent.com/jquery-form/form/ff80d9ddf4/jquery.form.js + integrity: sha384-h4G2CrcSbixzMvrrK259cNBYaL/vS1D4+KdUN9NJDzQnTU1bQ6Avluget+Id13M7 + dest: jquery.form.js + +jquery.fullscreen: + type: file + src: https://raw.githubusercontent.com/theopolisme/jquery-fullscreen/v2.1.0/jquery.fullscreen.js + integrity: sha384-G4KPs2d99tgcsyUnJ3eeZ1r2hEKDwZfc4+/xowL/LIemq2VVwEE8HpVAWt4WYNLR + dest: jquery.fullscreen.js + +jquery.hoverIntent: + type: file + src: https://raw.githubusercontent.com/briancherne/jquery-hoverIntent/823603fdac/jquery.hoverIntent.js + integrity: sha384-lca0haN0hqFGGh2aYUhtAgX9dhVHfQnTADH4svDeM6gcXnL7aFGeAi1NYwipDMyS + dest: jquery.hoverIntent.js + +jquery.jStorage: + type: file + src: https://raw.githubusercontent.com/andris9/jStorage/v0.4.12/jstorage.js + integrity: sha384-geMeN8k803kPp6cqRL4VNfuSM1L8DcbKRk0St/KHJzxgpX9S0y9FA6HxA/JgucrJ + dest: jstorage.js + +jquery.throttle-debounce: + type: file + src: https://raw.githubusercontent.com/cowboy/jquery-throttle-debounce/v1.1/jquery.ba-throttle-debounce.js + integrity: sha384-ULOy4DbAghrCqRcrTJLXOY9e4gDpWh0BeEf6xMSL0VtNudXWggcb6AmrVrl4KDAP + dest: jquery.ba-throttle-debounce.js + moment: type: tar src: https://codeload.github.com/moment/moment/tar.gz/2.24.0 diff --git a/resources/Resources.php b/resources/Resources.php index 86bca6c6c0..aa6e7550f2 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -223,10 +223,10 @@ return [ 'targets' => [ 'desktop', 'mobile' ], ], 'jquery.form' => [ - 'scripts' => 'resources/lib/jquery.form.js', + 'scripts' => 'resources/lib/jquery.form/jquery.form.js', ], 'jquery.fullscreen' => [ - 'scripts' => 'resources/lib/jquery.fullscreen.js', + 'scripts' => 'resources/lib/jquery.fullscreen/jquery.fullscreen.js', ], 'jquery.getAttrs' => [ 'scripts' => 'resources/src/jquery/jquery.getAttrs.js', @@ -240,7 +240,7 @@ return [ 'targets' => [ 'desktop', 'mobile' ], ], 'jquery.hoverIntent' => [ - 'scripts' => 'resources/lib/jquery.hoverIntent.js', + 'scripts' => 'resources/lib/jquery.hoverIntent/jquery.hoverIntent.js', ], 'jquery.i18n' => [ 'scripts' => [ @@ -299,7 +299,7 @@ return [ ], 'jquery.jStorage' => [ 'deprecated' => 'Please use "mediawiki.storage" instead.', - 'scripts' => 'resources/lib/jquery.jStorage.js', + 'scripts' => 'resources/lib/jquery.jStorage/jstorage.js', ], 'jquery.suggestions' => [ 'targets' => [ 'desktop', 'mobile' ], @@ -332,7 +332,7 @@ return [ 'jquery.throttle-debounce' => [ 'deprecated' => 'Please use OO.ui.throttle/debounce instead. See ' . 'https://phabricator.wikimedia.org/T213426', - 'scripts' => 'resources/lib/jquery.ba-throttle-debounce.js', + 'scripts' => 'resources/lib/jquery.throttle-debounce/jquery.ba-throttle-debounce.js', 'targets' => [ 'desktop', 'mobile' ], ], diff --git a/resources/lib/jquery.form.js b/resources/lib/jquery.form/jquery.form.js similarity index 100% rename from resources/lib/jquery.form.js rename to resources/lib/jquery.form/jquery.form.js diff --git a/resources/lib/jquery.fullscreen.js b/resources/lib/jquery.fullscreen/jquery.fullscreen.js similarity index 99% rename from resources/lib/jquery.fullscreen.js rename to resources/lib/jquery.fullscreen/jquery.fullscreen.js index 30e44846ee..2702ceecda 100644 --- a/resources/lib/jquery.fullscreen.js +++ b/resources/lib/jquery.fullscreen/jquery.fullscreen.js @@ -1,5 +1,5 @@ /** - * jQuery fullscreen plugin v2.0.0-git (9f8f97d127) + * jQuery fullscreen plugin * https://github.com/theopolisme/jquery-fullscreen * * Copyright (c) 2013 Theopolisme diff --git a/resources/lib/jquery.hoverIntent.js b/resources/lib/jquery.hoverIntent/jquery.hoverIntent.js similarity index 98% rename from resources/lib/jquery.hoverIntent.js rename to resources/lib/jquery.hoverIntent/jquery.hoverIntent.js index adf948df10..bd11442f4b 100644 --- a/resources/lib/jquery.hoverIntent.js +++ b/resources/lib/jquery.hoverIntent/jquery.hoverIntent.js @@ -1,4 +1,4 @@ -/** +/** * hoverIntent is similar to jQuery's built-in "hover" function except that * instead of firing the onMouseOver event immediately, hoverIntent checks * to see if the user's mouse has slowed down (beneath the sensitivity @@ -81,7 +81,7 @@ if ( p == this ) { return false; } // copy objects to be passed into t (required for event object to be passed in IE) - var ev = $.extend({},e); + var ev = jQuery.extend({},e); var ob = this; // cancel hoverIntent timer if it exists diff --git a/resources/lib/jquery.jStorage.js b/resources/lib/jquery.jStorage/jstorage.js similarity index 99% rename from resources/lib/jquery.jStorage.js rename to resources/lib/jquery.jStorage/jstorage.js index 45e19ac673..1ac8fccc3b 100644 --- a/resources/lib/jquery.jStorage.js +++ b/resources/lib/jquery.jStorage/jstorage.js @@ -993,4 +993,4 @@ // Initialize jStorage _init(); -})(); +})(); \ No newline at end of file diff --git a/resources/lib/jquery.ba-throttle-debounce.js b/resources/lib/jquery.throttle-debounce/jquery.ba-throttle-debounce.js similarity index 100% rename from resources/lib/jquery.ba-throttle-debounce.js rename to resources/lib/jquery.throttle-debounce/jquery.ba-throttle-debounce.js -- 2.20.1