Greasy Fork is available in English.

tame QTKJ

at the end of with it.

Tính đến 15-08-2018. Xem phiên bản mới nhất.

// ==UserScript==
// @name         tame QTKJ
// @namespace    https://tampermonkey.net/
// @version      0.2.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#
// @grant        GM_addStyle
// @grant        GM_openInTab
// ==/UserScript==

// 律师管理系统
if (location.href === 'http://218.94.1.182:8080/jslawyer/index.html') {
  //隐藏没用的转圈,隐藏密码修改框。
  GM_addStyle('div.content-loading, #password, #passwordInfo {display: none !important;}')

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

  // 后台新标签页批量打开所有许可附件
  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);
}

// 网上学院
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#') {
  // 隐藏 index.html 密码修改提示 和 index.html# 每日一题
  GM_addStyle('#layui-layer1, #layui-layer-shade1 {display: none !important;}');
}

/* 网上学院要实现使用 HTML5 播放器可以伪装移动版,或者是将播放器如下修改:

<div id="course_player" style="width: 386.8px; height: 247.575px;">
	<h2>Flash version 10,1 or greater is required</h2>
	<h3>You have no flash plugin installed</h3>
	<p>Download latest version from <a href="http://get.adobe.com/flashplayer">here</a></p>
</div>

==》

<div id="course_player" style="width: 386.8px; height: 247.575px;">
	<video id="course_player5" controls="controls" webkit-playsinline="" preload="preload" src="courseware/video/1.mp4"></video>
</div>

播放器的 iframe 三层嵌套不说,居然使用非标准端口导致跨域,f**k!

自动修改难度太大,优先级降低。

*/