2
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
window.onload = function() {
|
||||
window.onload = function () {
|
||||
manageWebbyDisplay();
|
||||
|
||||
new MutationObserver(function (mutations, self) {
|
||||
const op = document.getElementById(`operations-${data.shortName}-${data.operationId}`);
|
||||
if (!op) return;
|
||||
if (!op) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.disconnect();
|
||||
|
||||
op.querySelector('.opblock-summary').click();
|
||||
const tryOutObserver = new MutationObserver(function (mutations, self) {
|
||||
const tryOut = op.querySelector('.try-out__btn');
|
||||
if (!tryOut) return;
|
||||
if (!tryOut) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.disconnect();
|
||||
|
||||
@@ -31,7 +35,7 @@ window.onload = function() {
|
||||
}
|
||||
|
||||
// Wait input values to be populated before executing the query
|
||||
setTimeout(function(){
|
||||
setTimeout(function () {
|
||||
op.querySelector('.execute').click();
|
||||
op.scrollIntoView();
|
||||
}, 500);
|
||||
@@ -71,10 +75,12 @@ window.onload = function() {
|
||||
// Adapted from https://github.com/vitalyq/react-trigger-change/blob/master/lib/change.js
|
||||
// Copyright (c) 2017 Vitaly Kuznetsov
|
||||
// MIT License
|
||||
function reactTriggerChange(node) {
|
||||
function reactTriggerChange(node)
|
||||
{
|
||||
// Do not try to delete non-configurable properties.
|
||||
// Value and checked properties on DOM elements are non-configurable in PhantomJS.
|
||||
function deletePropertySafe(elem, prop) {
|
||||
function deletePropertySafe(elem, prop)
|
||||
{
|
||||
const desc = Object.getOwnPropertyDescriptor(elem, prop);
|
||||
if (desc && desc.configurable) {
|
||||
delete elem[prop];
|
||||
@@ -129,9 +135,12 @@ window.onload = function() {
|
||||
}
|
||||
}
|
||||
|
||||
function manageWebbyDisplay() {
|
||||
function manageWebbyDisplay()
|
||||
{
|
||||
const webby = document.getElementsByClassName('webby')[0];
|
||||
if (!webby) return;
|
||||
if (!webby) {
|
||||
return;
|
||||
}
|
||||
|
||||
const web = document.getElementsByClassName('web')[0];
|
||||
webby.classList.add('calm');
|
||||
|
||||
Reference in New Issue
Block a user