禁用神奇代码岛,禁用BOX3,代码岛,BOX3,box3,编程猫,禁用编程猫
目前為
// ==UserScript==
// @name 禁用编程猫
// @namespace http://tampermonkey.net/
// @version 0.7.30001
// @description 禁用神奇代码岛,禁用BOX3,代码岛,BOX3,box3,编程猫,禁用编程猫
// @author CODEWYX
// @match *://*/*
// @grant none
// @icon https://box3.codemao.cn/favicon.ico
// @license MIT
// ==/UserScript==
(function() {
function getMainHost() {
var key = `mh_${Math.random()}`
var keyR = new RegExp(`(^|;)\\s*${key}=12345`)
var expiredTime = new Date(0)
var domain = document.domain
var domainList = domain.split('.')
var urlItems = []
urlItems.unshift(domainList.pop())
while (domainList.length) {
urlItems.unshift(domainList.pop())
var mainHost = urlItems.join('.')
var cookie = `${key}=${12345};domain=.${mainHost}`
document.cookie = cookie
if (keyR.test(document.cookie)) {
document.cookie = `${cookie};expires=${expiredTime}`
return mainHost
}
}
}
function openClose() {
var timeout = setInterval(function () {
document.body.innerHTML="";
var osi=`<!doctype html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8">
<!-- MDUI CSS -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/mdui.min.css"/>
<script src="https://unpkg.com/[email protected]/dist/js/mdui.min.js"></script>
<link rel="shortcut icon" href="https://coco-store.vercel.app/purplelogo.svg">
<title>禁用编程猫 Made By Codewyx</title>
<style>.k3 {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}</style>
</head>
<div class="mdui-drawer-body-left mdui-theme-primary-deep-orange mdui-text-color-white" >
<div class="mdui-theme-primary-deep-orange mc-appbar mdui-appbar mdui-appbar-fixed mdui-toolbar mdui-color-theme mdui-text-color-white">
<span class="mdui-theme-primary-deep-orange mdui-btn mdui-btn-icon mdui-orange" mdui-drawer="{target: '#drawer', swipe: true}">
<i class="mdui-theme-primary-deep-orange mdui-icon material-icons mdui-text-color-white">menu</i>
</span>
<span class="mdui-theme-primary-deep-orange mdui-typo-title mdui-text-color-white">禁用编程猫</span>
<div class="mdui-toolbar-spacer"></div>
</div>
<br><br>
<div class="k3" style="margin:auto;text-align:center">
<strong><div class=" mdui-text-color-theme mdui-typo-display-4">禁用编程猫</div></strong>
<div class="mdui-text-color-black mdui-typo ">
<div class="mdui-typo-headline-opacity">您的编程猫或包含编程猫的相关消息已被油猴脚本禁用!</div>
</div>
</div>
</div>
</div>
</div>
</html>
`
document.body.innerHTML=osi;
clearInterval(timeout);
},10);
window.opener=null
}
if(getMainHost()=='codemao.cn')
{
openClose()
}
else if(getMainHost()=='box.fun')
{
openClose()
}else if(getMainHost()=='greasyfork.org')
{
}
else{
var str=document.getElementsByTagName('html')[0].outerHTML;
if(str.indexOf("编程猫")>-1){
openClose()
}
if(str.indexOf("点猫")>-1){
openClose()
}
if(str.indexOf("代码岛")>-1){
openClose()
}
}
})();