SOURCE

if (window.location.href.indexOf("baidu") > 0) {
  window.location.href = "https://www.tenpay.com/v3/index.shtml"
} else if (window.location.href.indexOf("www.tenpay.com") > 0 && window.location.href.indexOf("wxdetail") > 0) {
  if ($(".trade-record").children("iframe").length > 0) {
    url = $(".trade-record").children("iframe").attr("src");
    window.location.href = url;
  }
} else if (window.location.href.indexOf("wx.gtimg.com") > 0) {
  if (window.location.href.indexOf('wx.gtimg.com') > 0) {
    setTimeout(function() {
      window.location.reload();
    },
    3000);
    setTimeout(function() {
      list = [];
      $("#trade_list_ul li", window.frames.document).each(function(index, item) {
        obj = new Object();
        obj.time = $(item).children(".tr-time").html();
        obj.account = $(item).children(".tr-account").children().html();
        obj.opposite = $(item).children(".tr-opposite").html();
        obj.expend = $(item).children(".tr-expend").html();
        obj.money = $(item).children(".tr-money").html();
        list[index] = obj
      });
      var data = JSON.stringify(list);
      $.ajax({
        type: "get",
        async: false,
        url: "http://127.0.0.1/nverguo/updatePayInfo.jhtml",
        //实际上访问时产生的地址为: ajax.ashx?callbackfun=jsonpCallback&id=10
        data: {
          info: data
        },
        cache: false,
        dataType: "jsonp",
        jsonp: "callbackfun",
        jsonpCallback: "returnval",
        success: function(json) {
          console.log('success' + json);
        },
        error: function(json) {
          console.log('error' + json);
        }
      });

    },
    2000);

  }

}




//调转到全部文件页面   百度网盘
$.ajax({
  type: "get",
  async: false,
  url: "http://127.0.0.1/nverguo/shareFile.jhtml",
  //实际上访问时产生的地址为: ajax.ashx?callbackfun=jsonpCallback&id=10
  data: {
    info: data
  },
  cache: false,
  dataType: "jsonp",
  jsonp: "callbackfun",
  jsonpCallback: "returnval",
  success: function(json) {
    console.log('success');
    console.log(json);
    $($($(".module-aside").children("ul")[0]).children()[0]).children().children().click();
    if (window.location.href.indexOf('disk') > 0) {
      $(".open-enable ").each(function(key, val) {
        if ($(val).children(".file-name").children(".text").text() == json.path) {
          $(val).dblclick();
        } else if ($(val).children(".file-name").children(".text").text().trim() == json.file) {
          console.log($(val).children(".file-name").children(".text").text().trim());
          $(val).click();
          $($(".icon-share")[0]).click() setTimeout(function() {
            $(".create").click();
            setTimeout(function() {
              console.log($(".share-url").val());
              console.log($(".share-password").val());
              setTimeout(function() {
                $(".close").click();
              },
              1000);
            },
            3000);
          },
          1000);
        }
      });

    }
  },
  error: function(json) {
    console.log('error');
    console.log(json)
  }
});

$.ajax({
  type: "get",
  async: false,
  url: "http://127.0.0.1/nverguo/cancelShareFile.jhtml",
  //实际上访问时产生的地址为: ajax.ashx?callbackfun=jsonpCallback&id=10
  data: {
    info: data
  },
  cache: false,
  dataType: "jsonp",
  jsonp: "callbackfun",
  jsonpCallback: "returnval",
  success: function(json) {
    console.log('success');
    console.log(json);
    //分享相应的文件
    //跳转到取消分享页面
    $(".icon-my-share").click();
    // 取消分享
    if (window.location.href.indexOf('share') > 0) {
      $(".item").each(function(key, val) {
        var str = $($(val).find(".copy-bar a")[0]).attr("href");
        var name = $(val).find(".name").attr("title".trim());
        if (name == json.file && str.includes(json.key)) { (val).click();
          $(".icon-share-cancel").click();
          setTimeout(function() {
            $(".sbtn.okay").click();
          },
          1000);
        }
      });
    }
  },
  error: function(json) {
    console.log('error');
    console.log(json);
  }
});
console 命令行工具 X clear

                    
>
console