屏蔽凯氏卫星历史记录日期输入框的日期选择控件,并对两个日期框做数据同步
// ==UserScript==
// @name 凯氏卫星定位监控系统日期字段同步
// @namespace https://penicillin.github.io/
// @version 0.2.1
// @description 屏蔽凯氏卫星历史记录日期输入框的日期选择控件,并对两个日期框做数据同步
// @author 静夜轻风
// @match http://www.fzksgps.com/Main/Index.html
// @grant none
// @license MIT
// ==/UserScript==
(function() {
var interval = setInterval(function(){
try{
document.getElementsByTagName('iframe')[1].contentWindow.document.getElementById("function").contentWindow.document.getElementsByTagName('iframe')[3].style.display='none';
var iframeDocument=document.getElementsByTagName('iframe')[1].contentWindow.document.getElementById("function").contentWindow.document.getElementById("search").contentWindow.document;
clearInterval(interval);
console.log('OK....');
setInterval(function(){ clock(); }, 3000);
function clock()
{
var leftText=iframeDocument.getElementById("tb_F");
var rightText=iframeDocument.getElementById("tb_G");
if (leftText && rightText !== null){
rightText.value=leftText.value.substring(0,10)+" 20:00:00";
}
}
}catch(err){
console.log('Waitting....');
}
}
, 2000);}
)();