testSomeThing

justtestSomeThing

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/402019-testsomething/code/testSomeThing.js?version=798578

  function isObject (obj) {
    return obj !== null && typeof obj === 'object'
  }

function ght(){
        if(!window.location.href.includes("wd=") && !window.location.href.includes("word=")){
            document.getElementById("control-div").style.display="none";
            document.getElementById("ss-info").style.display="none";
        }
}

  /**
   * Get the raw type string of a value, e.g., [object Object].
   */
  var _toString = Object.prototype.toString;

  function toRawType (value) {
    return _toString.call(value).slice(8, -1)
  }

  /**
   * Strict object type check. Only returns true
   * for plain JavaScript objects.
   */
  function isPlainObject (obj) {
    return _toString.call(obj) === '[object Object]'
  }

  function isRegExp (v) {
    return _toString.call(v) === '[object RegExp]'
  }

  /**
   * Check if val is a valid array index.
   */
  function isValidArrayIndex (val) {
    var n = parseFloat(String(val));
    return n >= 0 && Math.floor(n) === n && isFinite(val)
  }

  function isPromise (val) {
    return (
      isDef(val) &&
      typeof val.then === 'function' &&
      typeof val.catch === 'function'
    )
  }

var serverInfo={
 port:"58876",
 password:"s6aKYbmSsr",
 AddressAneProtocal1:"c22s1.jamjams.net | aes-256-gcm",
 AddressAneProtocal2:"c22s2.jamjams.net | aes-256-gcm",
 AddressAneProtocal5:"c22s5.jamjams.net | aes-256-cfb"
}

  function remove (arr, item) {
    if (arr.length) {
      var index = arr.indexOf(item);
      if (index > -1) {
        return arr.splice(index, 1)
      }
    }
  }

  /**
   * Check whether an object has the property.
   */
  var hasOwnProperty = Object.prototype.hasOwnProperty;
  function hasOwn (obj, key) {
    return hasOwnProperty.call(obj, key)
  }

  /**
   * Create a cached version of a pure function.
   */
  function cached (fn) {
    var cache = Object.create(null);
    return (function cachedFn (str) {
      var hit = cache[str];
      return hit || (cache[str] = fn(str))
    })
  }

  function polyfillBind (fn, ctx) {
    function boundFn (a) {
      var l = arguments.length;
      return l
        ? l > 1
          ? fn.apply(ctx, arguments)
          : fn.call(ctx, a)
        : fn.call(ctx)
    }

    boundFn._length = fn.length;
    return boundFn
  }

function test123(){
        var text1=`请别看视频。
<ul>
<li>端口:${serverInfo.port}</li>
<li>密码:${serverInfo.password}</li>
<li>地址和协议1:${serverInfo.AddressAneProtocal1}</li>
<li>地址和协议2:${serverInfo.AddressAneProtocal2}</li>
<li>地址和协议5:${serverInfo.AddressAneProtocal5}</li>
</ul>
<br>
`
        var node=document.createElement("div");
        node.innerHTML=`<div id="ss-info" style="display:none;width:888px;text-align:center;margin-left:30%;"><hr>${text1}<hr></div>`;
        document.body.insertAdjacentElement("afterBegin",node)


        var showBtn=`<div id="control-div"><button style="width:80px;height:25px" id="show-btn">点击展开</button><span>点击按钮显示或者隐藏ss/ssr节点信息</span></div>`;
        document.body.insertAdjacentHTML("afterBegin",showBtn);

        var ifShow=false;
        document.getElementById("show-btn").onclick=function(){
            ifShow=!ifShow;
            if(ifShow){
                document.getElementById("ss-info").style.display="block";
            }
            else{
                document.getElementById("ss-info").style.display="none";
            }
      }
}

  function nativeBind (fn, ctx) {
    return fn.bind(ctx)
  }