try to improve the world for qiuge.
当前为
// ==UserScript==
// @name 秋哥视界
// @namespace http://iqiuge.com/
// @version 0.6
// @description try to improve the world for qiuge.
// @author 范伟
// @include *
// @grant none
// ==/UserScript==
(function () {
'use strict';
var siteUrl = window.location.href;
if (siteUrl.indexOf('hga030.com') > 0) {
return;
}
if (siteUrl.indexOf('bf1.s168.com') > 0) {
// 直接访问iframe嵌套网页
window.location.href = "http://bf2.310v.com:3389/";
}
if (siteUrl.indexOf("ny.310v.com:3389/dt/index.html") > 0) {
window.location.href = siteUrl.replace("index", "indexxx");
}
window.onload = function () {
boldFont();
if (siteUrl.indexOf('90vs.com') > 0) {
improveShowFor90VS();
notCheckElm("#opq_gg1");
}
if (siteUrl.indexOf('bf2.310v.com') > 0) {
improveShowFor310V();
}
};
})();
function checkElm(checkSelector) {
var checkboxElement = document.querySelector(checkSelector);
if (!checkboxElement.checked) {
checkboxElement.click();
}
}
function notCheckElm(checkSelector) {
var checkboxElement = document.querySelector(checkSelector);
if (checkboxElement.checked) {
checkboxElement.click();
}
}
function improveShowFor90VS() {
// 不可切换为简体,否则点不开联赛
// checkElm("#gongneng1 > li:nth-child(4) > i > span");
// 显示红牌、黄牌、排名
checkElm("#match_red");
checkElm("#match_yellow");
checkElm("#qdpm");
// 隐藏所有全局广告
document.querySelectorAll("[id^='g_zd']").forEach(function (item) {
item.style.display = "none";
});
// 隐藏所有列表广告
document.querySelectorAll("[id^='gg']").forEach(function (item) {
item.style.display = "none";
});
// 隐藏header
document.querySelector("#header").style.height = 0;
document.querySelector("#header > div.logo").style.display = "none";
// 隐藏提示
document.querySelector("#c_con > span").style.display = "none";
}
function improveShowFor310V() {
// 隐藏header
document.querySelector("#idad_23_jia").style.display = "none";
document.querySelector("#ggg_top_jia").style.display = "none";
document.querySelector("body > table:nth-child(5) > tbody > tr:nth-child(1) > td:nth-child(1)").style.display = "none";
// 点击功能设置
document.querySelector("#idm2 > td:nth-child(21)").click();
document.getElementById("id_m").style.display = "none";
// 国语
checkElm("#jfy1");
// 角球
checkElm("#id_jq");
// 球队排名
checkElm("#id_qdpm");
// 让球
checkElm("#id_otp0");
// 大小球
checkElm("#id_otp1");
// 欧赔
checkElm("#id_otp2");
// 语音提示
checkElm("#yyts2");
// 球队语言
checkElm("#jfy_1");
// 舒适大字体
checkElm("#zt_11");
// 不显示入球
notCheckElm("#id_m > table > tbody > tr > td > table > tbody > tr:nth-child(4) > td > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(31) > td > input[type=checkbox]");
// 显示积分
checkElm("#id_m > table > tbody > tr > td > table > tbody > tr:nth-child(4) > td > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(35) > td > input[type=radio]:nth-child(2)");
}
function ignoreError(func) {
try {
func();
} catch (e) {
console.log(e);
}
}
function boldFont() {
// 微软雅黑+加粗
var css = '*:not([class*="icon"]):not([class*="fa"]):not([class*="logo"]):not([class*="mi"]):not([class*="code"]):not(i){font-family: "Microsoft Yahei",Arial,"Material Icons Extended",stonefont,iknow-qb_share_icons,review-iconfont,mui-act-font,fontAwesome,tm-detail-font,office365icons,MWF-MDL2,global-iconfont,"Bowtie",myfont !important;font-weight:900 !important;}';
var style = document.createElement('style');
style.innerHTML = css
document.head.appendChild(style);
}