Greasy Fork

Greasy Fork is available in English.

禁用编程猫

禁用神奇代码岛,禁用BOX3,代码岛,BOX3,box3,编程猫,禁用编程猫

当前为 2022-07-04 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         禁用编程猫
// @namespace    http://tampermonkey.net/
// @version      0.7.21004
// @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://coco-store.vercel.app/css/mdui.min.css"/>
<link rel="stylesheet" href="https://coco-store.vercel.app/md.css">
<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()

    }
}
})();