Greasy Fork is available in English.

tame QTKJ

at the end of with it.

اعتبارا من 23-08-2018. شاهد أحدث إصدار.

// ==UserScript==
// @name         tame QTKJ
// @namespace    Vionlentmonkey
// @version      0.3.1
// @description  at the end of with it.
// @author       someone
// @match        http://218.94.1.182:8080/jslawyer/index.html
// @match        http://218.94.1.181:8087/sfxzwsxy/jypxks/index.html
// @match        http://218.94.1.181:8087/sfxzwsxy/jypxks/index.html#
// @match        http://218.94.1.181:5088/unzipapp/project/ware/attach/*/index.html
// @grant        GM_addStyle
// @grant        GM_openInTab
// @run-at       document-start
// ==/UserScript==

// 律师管理系统
if (location.href === 'http://218.94.1.182:8080/jslawyer/index.html') {
  //隐藏没用的转圈,隐藏密码修改框。
  GM_addStyle('div.content-loading, #password, #passwordInfo {display: none !important;}')
  //退回按钮红色高亮
  GM_addStyle('a.btns-icon[ng-show="currWorkStatus>=firstWorkStatus"] {color: red !important;}')

  // 红色高亮 —— 数据来源:退回。不能终止重复执行,否则会导致切换页面后不再高亮
  function highlight() {
    if ($('td.ng-binding:contains("退回")').length > 0) {
      $('td.ng-binding:contains("退回")').css({ "color": "red" });
    }
  }
  red = setInterval(highlight, 1000);

  // 后台新标签页批量打开所有许可附件
   /* 
   强烈建议关闭下载工具扩展或监控,并修改响应头:
   Content-Type : image ;
   Content-Disposition : inline ;
   参考:
   https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types
   https://wiki.greasespot.net/GM.xmlHttpRequest
   */
  document.onkeyup = function openThem(event) {
    let e = event || window.event;
    let keyCode = e.keyCode || e.which;
    let attachments = document.querySelectorAll('a.ng-binding[style="color:blue;"][ng-href^="attachment/file/"]');
    switch (keyCode) {
      case 115: // F4:不能在浏览器中直接浏览附件
        // 倒序循环保证打开的标签页顺序从左至右
        for (let i = attachments.length - 1; i >= 0; i--) {
          let openattachs = GM_openInTab(attachments[i], true);
          openattachs;
          // 自动关闭已打开标签方法来自: https://greasyfork.org/en/forum/discussion/comment/34183/#Comment_34183
          setTimeout(function() {openattachs.close();}, 10000);
          clearInterval(open); // 快捷键绑定一次即可
        }
        break;
      case 119: // F8:可在浏览器中直接浏览附件

        for (let i = attachments.length - 1; i >= 0; i--) {
          GM_openInTab(attachments[i], true); 
          clearInterval(open);
        }
        break;
    }
  }
  open = setInterval(openThem, 1000);
}

// 隐藏网上学院 index.html 密码修改提示 和 index.html# 每日一题 
if (location.href === 'http://218.94.1.181:8087/sfxzwsxy/jypxks/index.html' || 
    location.href === 'http://218.94.1.181:8087/sfxzwsxy/jypxks/index.html#') {
  GM_addStyle('#layui-layer1, #layui-layer-shade1 {display: none !important;}');
}

// 我心有佛
if (location.href.indexOf('http://218.94.1.181:5088/unzipapp/project/ware/attach/') === 0) {
  Object.defineProperty(navigator, "userAgent", {
      value: "iPhone",
      writable: false,
      configurable: false,
      enumerable: true
  });
  function cancel() {
    if (document.getElementById('cancel')) {
      document.getElementById('cancel').click();
    }
  }
  play = setInterval(cancel, 1000);
  
  function option() {
    if (document.querySelectorAll('div.option>label>input[name="que"]').length > 0) {
      document.querySelectorAll('div.option>label>input[name="que"]')[0].click();
      document.getElementsByClassName('button')[0].click();
      document.getElementsByClassName('button_wan')[0].click();
      document.getElementById('course_player5').click();
    }
  }
  setInterval(option, 1000);
}