Overlay QuiverPRO - Coneccta

Interface overlay

目前为 2023-06-01 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/467601/1198365/Overlay%20QuiverPRO%20-%20Coneccta.js

function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) {
  var startTimeInMs = Date.now();
    console.log("testeatt")
  function loopSearch() {
    if (document.querySelector(selector) !== null) {
      console.log(document.querySelector(selector));
      callback();
      return;
    } else {
      setTimeout(function() {
        if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs) {
          return;
        }
        loopSearch();
      }, checkFrequencyInMs);
    }
  }

  loopSearch();
}

(function() {
  'use strict';

  // Function to insert the first overlay element
  function insertElement(divReferencia, divClassName, labelClassName, styleName, labelText) {
    var referencia = document.getElementById(divReferencia);
    let div = document.createElement('div')
    div.className = divClassName
    let label = document.createElement('label');
    label.className = labelClassName
    label.textContent = labelText;
    label.style.cssText = styleName;
    referencia.appendChild(div);
    div.appendChild(label)
    console.log("Inseriu elemento " + referencia);
  }

  // Define the styles for the first overlay element
  const labelStyle = `
    position: static;
    font-family: inherit;
    font-size: 2em;
    letter-spacing: 0px;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
    font-color: #fff;
    line-height: 2em;
    outline: none;
    animation: animate 10s linear infinite;
    border: 1px solid black;
    border-radius: 5px;
    animation: blinkingC 1s infinite;
  `;

  // Define the styles for the second overlay element
  const labelStyle2 = `
    position: static;
    font-family: inherit;
    font-size: 2em;
    letter-spacing: 0px;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
    font-color: #fff;
    line-height: 2em;
    outline: none;
    animation: animate 10s linear infinite;
    border: 1px solid black;
    border-radius: 5px;
    animation: blinkingC2 1s infinite;
  `;

  // Define the blinking animation for the label element
  const blinkAnimation = `
    @keyframes blinkingC {
      0% {
        color: white;
        background: #03a600;
      }
      100% {
        color: lightcyan;
        background: #bfbf10;
      }
    }
  `;

  // Define the blinking animation for the label element
  const blinkAnimation2 = `
    @keyframes blinkingC2 {
      0% {
        color: white;
        background: #bfbf10;
      }
      100% {
        color: lightcyan;
        background: #03a600;
      }
    }
  `;

  // Add the blinking animation to the page
  const style = document.createElement('style');
  style.appendChild(document.createTextNode(blinkAnimation));
  style.appendChild(document.createTextNode(blinkAnimation2));
  document.head.appendChild(style);

  waitForElementToDisplay("#DIVPadrao2000_Observacoes", function() {
    insertElement("DIVPadrao2000_Observacoes", "card-Overlay", "label-Overlay", labelStyle, "Informe que a ligação está sendo gravada");
  }, 10000, 900000);

  waitForElementToDisplay("#DIVPadrao2000_Cobertura190 > div", function() {
    insertElement("BoxDadosSegurado", "card-Overlay", "label-Overlay", labelStyle2, "Verificar grupo de afinidade");
  }, 10000, 900000);

  waitForElementToDisplay("#DIVPadrao2000_Cobertura190 > div", function() {
    insertElement("DIVPadrao2000_Cobertura190", "card-Overlay", "label-Overlay", labelStyle, "Esclarecer que uso particular implica em não utilizar o veículo para atividade comercial");
  }, 10000, 900000);

  waitForElementToDisplay("#BoxCobsBasicas", function() {
    insertElement("BoxCobsBasicas", "card-Overlay", "label-Overlay", labelStyle2, "Verificar se as coberturas atendem o segurado");
  }, 10000, 900000);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址