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

Change subject: zuul: Include jquery-visibility.js
......................................................................


zuul: Include jquery-visibility.js

It was in the local copy, but suppressed by gitignore.
Was causing a HTTP 404 when using integration.wikimedia.org/zuul/

Follows-up 71a5a4f.

Change-Id: I6b7e8c0b5ac10209df59da685aacff91249fe514
---
M zuul-status/.gitignore
A zuul-status/public_html/jquery-visibility.js
2 files changed, 65 insertions(+), 1 deletion(-)

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



diff --git a/zuul-status/.gitignore b/zuul-status/.gitignore
index 1ecdbed..39e5d74 100644
--- a/zuul-status/.gitignore
+++ b/zuul-status/.gitignore
@@ -1,4 +1,3 @@
 public_html/jquery.min.js
-public_html/jquery-visibility.js
 public_html/bootstrap
 public_html/jquery.graphite.js
diff --git a/zuul-status/public_html/jquery-visibility.js 
b/zuul-status/public_html/jquery-visibility.js
new file mode 100644
index 0000000..b1f6c29
--- /dev/null
+++ b/zuul-status/public_html/jquery-visibility.js
@@ -0,0 +1,65 @@
+/*! http://mths.be/visibility v1.0.8 by @mathias | MIT license */
+;(function(window, document, $, undefined) {
+       "use strict";
+
+       var prefix;
+       var property;
+       // In Opera, `'onfocusin' in document == true`, hence the extra 
`hasFocus` check to detect IE-like behavior
+       var eventName = 'onfocusin' in document && 'hasFocus' in document ?
+               'focusin focusout' :
+               'focus blur';
+       var prefixes = ['webkit', 'o', 'ms', 'moz', ''];
+       var $support = $.support;
+       var $event = $.event;
+
+       while ((prefix = prefixes.pop()) !== undefined) {
+               property = (prefix ? prefix + 'H': 'h') + 'idden';
+               $support.pageVisibility = document[property] !== undefined;
+               if ($support.pageVisibility) {
+                       eventName = prefix + 'visibilitychange';
+                       break;
+               }
+       }
+
+       // normalize to and update document hidden property
+       function updateState() {
+               if (property !== 'hidden') {
+                       document.hidden = $support.pageVisibility ? 
document[property] : undefined;
+               }
+       }
+       updateState();
+
+       $(/blur$/.test(eventName) ? window : document).on(eventName, 
function(event) {
+               var type = event.type;
+               var originalEvent = event.originalEvent;
+
+               // Avoid errors from triggered native events for which 
`originalEvent` is
+               // not available.
+               if (!originalEvent) {
+                       return;
+               }
+
+               var toElement = originalEvent.toElement;
+
+               // If it’s a `{focusin,focusout}` event (IE), `fromElement` and 
`toElement`
+               // should both be `null` or `undefined`; else, the page 
visibility hasn’t
+               // changed, but the user just clicked somewhere in the doc. In 
IE9, we need
+               // to check the `relatedTarget` property instead.
+               if (
+                       !/^focus./.test(type) || (
+                               toElement === undefined &&
+                               originalEvent.fromElement === undefined &&
+                               originalEvent.relatedTarget === undefined
+                       )
+               ) {
+                       $event.trigger(
+                                       property && document[property] || 
/^(?:blur|focusout)$/.test(type) ?
+                                               'hide' :
+                                               'show'
+                       );
+               }
+               // and update the current state
+               updateState();
+       });
+
+}(this, document, jQuery));
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b7e8c0b5ac10209df59da685aacff91249fe514
Gerrit-PatchSet: 2
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to