-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookmarklet
20 lines (20 loc) · 1.24 KB
/
bookmarklet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This should be minified before using.
javascript: (window.location.pathname.includes('kibana') && document.msearch_responses === undefined && document.getElementById('parse_download') === null ? (function (open) {
var import_script = document.createElement('script');
import_script.setAttribute('src', 'https://bbcdn.githack.com/itskdaniel/varys-kibs/raw/df7a463eb95d742cdec89487aa8b061e26e176e1/varys.js');
document.head.appendChild(import_script);
var import_css = document.createElement('link');
import_css.setAttribute('rel', 'stylesheet');
import_css.setAttribute('type', 'text/css');
import_css.setAttribute('href', 'https://bbcdn.githack.com/itskdaniel/varys-kibs/raw/df7a463eb95d742cdec89487aa8b061e26e176e1/varys.css');
document.head.appendChild(import_css);
document.msearch_responses = '';
XMLHttpRequest.prototype.open = function (method, url, async, user, pass) {
this.addEventListener("readystatechange", function () {
if (this.readyState == 4 && url.includes("_msearch")) {
document.msearch_responses = this.response;
}
}, false);
open.call(this, method, url, async, user, pass);
};
})(XMLHttpRequest.prototype.open) : document.getElementById('parse_download') === null ? kibs_create_button() : null);