草榴社区永久vip vip视频无限制观看

草榴社区永久vip vip视频随意观看

Tính đến 23-05-2022. Xem phiên bản mới nhất.

// ==UserScript==
// @name         草榴社区永久vip vip视频无限制观看
// @name:zh-TW   草榴社區永久vip vip視頻無限制觀看
// @namespace    http://tampermonkey.net/
// @version      1.2.5
// @description  草榴社区永久vip vip视频随意观看
// @description:zh-TW  草榴社區永久vip vip視頻隨意觀看
// @author       FFFFFFeng
// @include      /^.+://.*cl.*\..*$/
// @icon         https://www.google.com/s2/favicons?domain=swag555.xyz
// @grant        none
// @antifeature payment
// ==/UserScript==
(function () {
    // /localStorage isGetPermission
    // localStorage getTokenTime
    let div = document.createElement("div")
    div.setAttribute("id", "inserted")
    div.innerHTML = `
    <div id="myPanel">
        <div class="panelItem">
            <div style="padding:5px;">
                提示:
                <span class="tipContent">请稍等...</span>
            </div>
            <div class="getPermission">解</div>
            <p style="transform:translate(10px,40px)">邮箱:JamJamToday@protonmail.com</p>
            <input id="txm" type="text" placeholder="请输入通行码" />
        </div>
        <div class="panelItem">
            <div class="money">
                <div>
                    <div class="gonggaoBox"><div class="gonggao">暂无脚本公告!</div></div>
                </div>
                <img style="width: 80%;margin: 10px auto 0;" src="https://s1.328888.xyz/2022/03/26/JQKzR.png"/>
                <span id="read">支付前请点我查看注意事项!!!(这很重要)</span>
            </div>
        </div>
        <div id="readItem">
            <p>0.草榴社区值得你拥有,定价:34.99</p>
            <p>1.请一定要设置好自己的支付宝昵称,不要一个字的昵称,不要有特殊字符</p>
            <p>3.购买成功后通行码就是你的支付宝昵称(永久)</p>
            <p>4.仔细阅读脚本安装页面的介绍,里面有操作步骤。</p>
            <p>5.一定要先安装另外一个浏览器插件配合使用,脚本安装页面有操作步骤。</p>
            <span id="closeRead">关闭</span>
        </div>
        <span class="bottomBtn">获取权限</span>
        <span class="bottomBtn">获取通行码</span>
    </div>
    <div id="hiddenBtn" class="show" style="width:80px;height:50px;line-height:50px;color:red;position:absolute;right:-90px;top:270px;font-size:20px;"><< 隐藏</div>
    `
    let style = document.createElement("style")
    style.innerHTML = `
    .getPermission {
    font-size:20px;
        background-color:#990033;
        width:100px;
        height:100px;
        border-radius:50px;
        text-align:center;
        line-height:100px;
        margin:0 auto;
        transform:translateY(15px);
        cursor:pointer;
    }
    @keyframes myfirst
    {
        from {transform: translateX(0%);}
        to {transform: translateX(-100%);}
    }
    .gonggaoBox {
        width:100%;
        height:1.5em;
        overflow:hidden;
    }
    .gonggao {
        animation: myfirst 10s linear 2s infinite;
        word-break:keep-all;      /* 不换行 */
        white-space:nowrap;       /* 不换行 */
        overflow:hidden;          /* 内容超出宽度时隐藏超出部分的内容 */
        display:inline-block;
    }
    #hiddenBtn {
        cursor:pointer;
    }
    #read {
       font-size:14px;
       margin-top:5px;
       cursor:pointer;
    }
    #closeRead {
    cursor:pointer;
        color:red;
        position:absolute;
        right:0;
        top:0;
        font-size:14px;
    }
    #readItem>p {
        margin-top:10px;
    }
    #readItem {
        position:absolute;
        width:200px;
        height:300px;
        background-color:black;
        z-index:-1;
        color:white;
    }
    #txm {
         position:absolute;
         left:0;
         bottom:60px;
         z-index:1000;
         margin-left:20px;
         background-color:black;
         color:white;
         border:1px solid white;
width:85%;
    }
    #myPanel {
font-size:12px;
            width: 200px;
            height: 300px;
            overflow: hidden;
            position: relative;
            background-color: black;
            border-radius: 12px;
            box-shadow: 0px 0px 10px 2px #990033;
        }
        .panelItem {
            border-radius: 10px;
            background-color: black;
            color: white;
            width: 200px;
            height: 300px;
            display: inline-block;
            position: absolute;
            left: 0;
            top: 0;
            transition: all .6s cubic-bezier(.17,.67,.63,1.59);
        }
        #myPanel>:nth-child(2) {
            transform: translateX(100%);
        }
        #myPanel>span {
            position: absolute;
            bottom: 0;
            width: 99px;
            background-color: black;
            text-align: center;
            height: 40px;
            display: inline-block;
            line-height: 40px;
            font-size: 17px;
            color: white;
            cursor: pointer;
        }
        #myPanel>span:nth-child(3) {
            left: 0;
            border-radius:0 0 0 10px;
        }
        #myPanel>span:last-child {
            right: 0;
            border-radius:0 0 10px 0;
        }
        .grayBg {
            background-color: #990033 !important;
        }
        .money {
            padding: 10px;
            display: flex;
            flex-direction: column;
            overflow:hidden;
        }


.kai {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    color: white;
}
#inserted {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 1000;
}
    `
    document.getElementsByTagName("head")[0].appendChild(style)
    document.getElementsByTagName("body")[0].appendChild(div)
    // 控制那个按钮处于激活状态
    let currentButton = 0
    let btns = document.getElementsByClassName("bottomBtn")
    let tabs = document.getElementsByClassName("panelItem")
    // 更改按钮颜色,并切换页面
    function changeActiveBtn() {
        if (currentButton === 0) {
            btns[1].className = "bottomBtn"
            btns[0].className = "bottomBtn  grayBg"
            translateToRight()
        } else {
            btns[0].className = "bottomBtn"
            btns[1].className = "bottomBtn  grayBg"
            translateToLeft()
        }
    }
    // 页面往左滑
    function translateToLeft() {
        tabs[0].style.transform = "translateX(-100%)"
        tabs[1].style.transform = "translateX(0%)"
    }
    // 页面往右滑
    function translateToRight() {
        tabs[0].style.transform = "translateX(0%)"
        tabs[1].style.transform = "translateX(100%)"
    }
    // 更改提示信息
    function setTip(str) {
        document.getElementsByClassName("tipContent")[0].innerHTML = str
    }
    // 获取提示信息
    function getTip() {
        return document.getElementsByClassName("tipContent")[0].innerHTML
    }
    // 设置公告
    function setGonggao(str) {
        document.getElementsByClassName("gonggao")[0].innerHTML = str
    }
    // 获取服务器公告
    function httpsGonggao() {
        let xmlhttp = new XMLHttpRequest()
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                let res = JSON.parse(xmlhttp.response)
                console.log("服务器返回的数据:",res)
                setGonggao(res.msg)
            } else if (xmlhttp.readyState == 4 && xmlhttp.status != 200) {
                console.log("服务器出错")
            }
        }
        var url = "https://66.42.117.77:3002/getGonggao"
        xmlhttp.open("GET", url, true)
        xmlhttp.send()
    }
    function setCookie(cname, cvalue, exdays) {
        var d = new Date();
        d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
        var expires = "expires=" + d.toGMTString();
        document.cookie = cname + "=" + cvalue + "; " + expires;
    }
    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i].trim();
            if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
        }
        return "";
    }
    // 发送请求,获取权限
    function getHttpsToken(t) {
        setTip("获取权限中...")
        fetch("https://66.42.117.77:3007/getPermission/"+t+"/0523").then(async function(result) {
            let res = await result.json()
            console.log("服务器返回数据", res)
            if (res.code == 300) {
                setTip(res.msg)
                return
            }
            let cookieArr = res.data.cookieHeader
            cookieArr.forEach((item) => {
                let temp = item.split(";")[0]
                let tempArr = temp.split("=")
                setCookie(tempArr[0], tempArr[1], 359)
            })
            location.reload()
        }).catch(function(e) {
            console.log(e)
setTip("网络异常尝试手机开热点给电脑,成功后关闭,或者换浏览器,或者换设备,或者弄个梯子,有梯子的换个节点,或者切换网络环境(如:移动切联通)。")
        })
    }
    // 获取权限函数
    function getPermission() {
        if (document.getElementById("txm").value == "") {
            setTip("请输入通行码")
            return
        }
        window.localStorage.setItem("txm", document.getElementById("txm").value)
        getHttpsToken(document.getElementById("txm").value)
    }
    // 隐藏面板
    function hiddenOrShow(e) {
        console.log(e.target.className)
        if (e.target.className == "show") {
            e.target.className = "hidden"
            document.getElementById("inserted").style.transform = "translateX(-220px)"
            e.target.innerHTML = ">> 显示"
        } else {
            e.target.className = "show"
            document.getElementById("inserted").style.transform = "translateX(0px)"
            e.target.innerHTML = "<< 隐藏"
        }
    }
    function isSuccess() {
        let account = document.querySelectorAll("[style='font-weight:bold']")
        if (account.length == 0) {
            return false
        }
        for (let i = 0; i < account.length; i++) {
            if (account[i].innerHTML == "cl20220227") {
                return true;
            }
        }
    }
    // 主函数
    function main() {

        if (document.querySelectorAll(".my_wrap")[0]) {
            document.querySelectorAll(".my_wrap")[0].style = "display:none;"
        }
if (document.querySelectorAll("#vediobox").length != 0) {
            document.querySelectorAll("#myPanel")[0].style.display = "none"
            document.querySelectorAll("#hiddenBtn")[0].style.display = "none"
        }
        // 给控制面板隐藏或者显示按钮添加点击事件
        document.getElementById("hiddenBtn").addEventListener("click", hiddenOrShow)

        // 给支付前必看按钮添加点击事件
        document.getElementById("read").addEventListener("click", function() {
            document.getElementById("readItem").style.zIndex = 1000
        })

        document.getElementById("closeRead").addEventListener("click", function() {
            document.getElementById("readItem").style.zIndex = -1
        })
        if (isSuccess()) {
            setTip("已获取权限,不行就刷新页面")
            document.getElementById("hiddenBtn").click()
        } else {
            setTip("未获取权限")
        }
        // 读取本地是否有通行码
        if (window.localStorage.getItem("txm") != null && window.localStorage.getItem("txm") != "") {
            document.getElementById("txm").value = window.localStorage.getItem("txm")
        }
        // 给按钮添加点击事件
        for (let i = 0; i < 2; i++) {
            btns[i].addEventListener("click", function (e) {
                currentButton = i
                changeActiveBtn()
            })
        }
        // 获取权限按钮,添加点击事件
        document.getElementsByClassName("getPermission")[0].addEventListener("click", function() {
            if (getTip() == "获取权限中..." || getTip() == "请先登录....") {
                return
            }
            getPermission()
        })
        // 修改按钮颜色状态
        changeActiveBtn()
        // 获取公告信息
        httpsGonggao()
        //ggAnimate()
    }
    main()
})();