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

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

As of 29.08.2023. See ბოლო ვერსია.

// ==UserScript==
// @name         草榴社区永久vip vip视频无限制观看
// @name:zh-TW   草榴社區永久vip vip視頻無限制觀看
// @namespace    http://tampermonkey.net/
// @version      2.0.6
// @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 () {
    let VipPageData = {
        tabIndex: 0
    }
    if(document.title.includes("草榴社區")) {
        vipPanelInit()
    }
    function vipPanelInit() {
        let style = document.createElement("style")
        style.innerHTML = `
        #vipPanel {
            width: 310px;
            height: 500px;
            box-shadow: 0 0 0 1px rgb(0 0 0 / 5%), 0 2px 4px 1px rgb(0 0 0 / 9%);
            border-left: 1px solid transparent;
            border-right: none;
            border-top: 1px solid transparent;
            border-bottom: 1px solid transparent;
            background-color: #FFFFFF;
            position: fixed;
            left: 6px;
            bottom: 6px;
            z-index: 99999;
        }
        .panelHead {
            display: flex;
            border-bottom: 1px solid #ececec;
        }
        .panelHead>div {
            color: #444;
            font-size: 14px;
            padding: 0 10px;
            height: 40px;
            line-height: 40px;
            box-sizing: border-box;
            user-select: none;
            text-align: center;
            width: 76px;
        }
        .panelHead>div:not(.headDivActive):hover {
            border-bottom: 3px solid #ccc;
            cursor: pointer;
        }
        .headDivActive {
            border-bottom: 3px solid #004c7d;
            color: #444;
            font-weight: bold;
        }
        .searchInput {
            width: 80%;
            border-radius: 24px;
            box-shadow: 0 0 0 1px rgb(0 0 0 / 5%), 0 2px 4px 1px rgb(0 0 0 / 9%);
            height: 40px;
            border-left: 1px solid transparent;
            border-right: none;
            border-top: 1px solid transparent;
            border-bottom: 1px solid transparent;
            margin: 0 auto;
            overflow: hidden;
            margin-top: 40px;
            display: flex;
            padding-right: 10px;
            align-items: center;
        }
        .searchInput:hover {
            border-top-left-radius: 24px;
            box-shadow: 0 0 0 1px rgb(0 0 0 / 10%), 0 2px 4px 1px rgb(0 0 0 / 18%);
            border-left: 1px solid transparent;
            border-right: none;
            border-top: 1px solid transparent;
            border-bottom: 1px solid transparent;
        }
        .searchInput input {
            flex: 1;
            height: 100%;
            border: 0;
            outline: 0;
            font-size: 16px;
            padding-left: 10px;
        }
        .searchInput .userSearchI {

            width: 30px;
            height: 30px;
            text-align: center;
            box-sizing: border-box;
            line-height: 26px;

        }
        .tipContentBox {
            display:flex;
            color: #71777d;
            font-size: 14px;
            margin: 0 auto;
            margin-top: 20px;
            width: 280px;
        }
        #tipContent {
            width: 0;
            flex: 1;
        }
        .getVipA {
            color: #FFFFFF;
            font-weight: bold;
            background-color: #004c7d;
            height: 100px;
            width: 100px;
            border-radius: 50px;
            text-align: center;
            line-height: 100px;
            margin: 20px auto;
            box-shadow: 0 0 0 1px rgb(0 0 0 / 5%), 0 2px 4px 1px rgb(0 0 0 / 9%);
            user-select: none;
        }
        .getVipA:hover {
            cursor: pointer;
            box-shadow: 0 0 0 0 rgb(0 0 0 / 5%), 0 2px 4px 1px rgb(0 0 0 / 18%);
            -webkit-box-shadow: 0 0 0 0 rgb(0 0 0 / 5%), 0 2px 4px 1px rgb(0 0 0 / 18%);
            -moz-box-shadow: 0 0 0 0 rgba(0,0,0,.05),0 2px 4px 1px rgba(0,0,0,.18);
        }

		@keyframes float {
			0% {
				transform: translateY(0px);
			}
			5% {
				transform: translateY(-10px);
			}
			10%,100% {
				transform: translateY(0px);
			}
		}

		.navy_ {
			position: relative;
		}

		.navy_ span {
			position: relative;
			display: inline-block;
			color: white;
			font-size: 2em;
			animation: float 10s ease-in-out infinite;
			animation-delay: 5s;
		}
        .resolvePro {
            color: #71777d;
            font-size: 14px;
            position: absolute;
            bottom: 10px;
            left: 10px;
        }
        .hiddenPanel {
            left: -310px !important;
        }
        .hiddenBtn,.showBtn {
            position: absolute;
            left: 320px;
            bottom: 20px;
            width: 60px;
            height: 40px;
            line-height: 40px;
            color: #004c7d;
            user-select: none;
            background-color: #FFFFFF;
            position: absolute;
            left: 243px;
            bottom: 20px;
        }
        .showBtn {
            left: 320px;
            display: none;
        }
        .hiddenBtn:hover,.showBtn:hover {
            cursor: pointer;
        }
        .panelBody_1 {
            display: none;
        }
        .panelBody_1 p {
            padding: 0 10px;
            font-size: 14px;
            text-indent: 1em;
        }
        .lplogin {
            color: white;
            width: 100px;
            height: 30px;
            display:flex;
            align-items:center;
            justify-content: center;
            cursor: pointer;
            background-color: #004c7d;
            margin: 20px auto;
            border-radius: 30px;
        }
        .newVersionLink {
             text-decoration: underline;
        }
        `
        document.getElementsByTagName("head")[0].appendChild(style)
        let panel = document.createElement("div")
        panel.setAttribute("id", "vipPanel")
        panel.innerHTML = `
            <div class="hiddenBtn">&lt;&lt;隐藏</div>
            <div class="showBtn">&gt;&gt;显示</div>
            <div class="panelMain">
                <div class="panelHead">
                    <div class="headDivActive">获取权限</div>
                    <div>令牌登录</div>
                    <div>使用指南</div>
                    <div>支付</div>
                </div>
                <div class="panelBody panelBody_0">
                    <div class="searchInput">
                        <input id="txm" type="text" placeholder="">
                        <div class="userSearchI getVipBtn"><i class="fa fa-search"></i></div>
                    </div>
                    <div class="tipContentBox">
                        <div style="width:50px;">提示: </div>
                        <div id="tipContent">未获取权限,请输入您的卡密以获取vip权限</div>
                    </div>
                    <div class="getVipBtn getVipA navy_">
                        <span>G</span>
                        <span>O</span>
                        <span>!</span>
                    </div>
                    <div class="resolvePro">
                    <a class="newVersionLink" target="_blank" href="https://sleazyfork.org/zh-CN/scripts/440819-%E8%8D%89%E6%A6%B4%E7%A4%BE%E5%8C%BA%E6%B0%B8%E4%B9%85vip-vip%E8%A7%86%E9%A2%91%E6%97%A0%E9%99%90%E5%88%B6%E8%A7%82%E7%9C%8B">点我去最新版本</a><br/>
                        有问题请骚扰邮箱: <br/>
                        JamJamToday@protonmail.com
                    </div>
                </div>
                <div class="panelBody panelBody_1">
                    <div class="searchInput">
                        <input id="lp" type="text" placeholder="请输入令牌">
                        <div class="userSearchI"><i class="el-icon-search"></i></div>
                    </div>
                    <div style="margin-top:20px;text-align:center;"><a class="newVersionLink" href="https://124.223.114.203:3004/swag.html" target="_blank"  style="color:#71777E;">点此获取令牌</a></div>
                    <div class="lplogin">登录</div>
                </div>
            </div>
        `
        document.body.appendChild(panel)

         let tabs = document.querySelectorAll(".panelHead>div")
         for (let i = 0; i < tabs.length; i++) {
            tabs[i].addEventListener("click", function() {
                if (tabs[i].innerHTML == "最新版本") {
                    toNewVersionF()
                    return
                }
                if (tabs[i].innerHTML == "使用指南") {
                    useMethodF()
                    return
                }
                if (tabs[i].innerHTML == "支付") {
                    toPayPage()
                    return
                }
                for (let ii = 0; ii < tabs.length; ii++) {
                    tabs[ii].className = ""
                }
                tabs[i].className = "headDivActive"
                VipPageData.tabIndex = i
                changeTabF()
            })
        }
        document.querySelector(".hiddenBtn").addEventListener("click", function() {
            hiddenBtnF()
        })
        document.querySelector(".showBtn").addEventListener("click", function() {
            showBtnF()
        })
        document.querySelector(".lplogin").addEventListener("click",function(){
            let lpvalue = document.getElementById("lp").value
            if (lpvalue) {
                linpailogin(lpvalue)
            }

        })
        let gets = document.querySelectorAll(".getVipBtn")
        for (let i = 0; i < gets.length; i++) {
            gets[i].addEventListener("click", function() {
                console.log("11")
                if (getTip() == "获取权限中..." || getTip() == "请先登录....") {
                    return
                }
                if (getTxm()) {
                    getPermissionF(getTxm())
                }
            })
        }


        if (window.localStorage.getItem("txm") != null && window.localStorage.getItem("txm") != "") {
            document.getElementById("txm").value = window.localStorage.getItem("txm")
        }

        if (isSuccess()) {
            setTip("已获取权限,不行就刷新页面或重试")
            document.querySelector(".hiddenBtn").click()
        }
    }
    function toPayPage() {
        window.open("http://158.247.243.65:5123?code=YT0yJmI9NQ%3D%3D");
    }
    function getTxm() {
        console.log("222")
        if (!document.getElementById("txm").value) {
            if (getTip().includes("输入您的卡密 ")) {
                setTip(getTip()+"!!! ")
            } else {
                setTip("输入您的卡密 ")
            }
            if(getTip().includes("!!! !!! !!! !!!")) {
                setTip("输入您的卡密 ")
            }
            return false
        } else {
            return document.getElementById("txm").value
        }
    }
    function changeTabF() {
        let mains = document.querySelectorAll(".panelBody")
        for (let i = 0; i < mains.length; i ++) {
            mains[i].style.display = "none"
        }
        mains[VipPageData.tabIndex].style.display = "block"
    }
    function setTip(str) {
        document.querySelector("#tipContent").innerHTML = str
    }
    function toNewVersionF() {
        window.open("https://sleazyfork.org/zh-CN/scripts/440819-%E8%8D%89%E6%A6%B4%E7%A4%BE%E5%8C%BA%E6%B0%B8%E4%B9%85vip-vip%E8%A7%86%E9%A2%91%E6%97%A0%E9%99%90%E5%88%B6%E8%A7%82%E7%9C%8B")
    }
    function useMethodF() {
        window.open("http://158.247.243.65:3000/jbs.html#%E8%8D%89%E6%A6%B4%E7%A4%BE%E5%8C%BA%E8%84%9A%E6%9C%AC")
    }
    function getPermissionF(t) {
        setTip("获取权限中...")
        window.localStorage.setItem("txm", t)
        let url = ""
        let href = location.href
        if (href.includes("https")) {
            url = "https://124.223.114.203:3007/getPermission/"
        } else {
            url = "http://124.223.114.203:3006/getPermission/"
        }
        fetch(url+""+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 linpailogin(data) {
        let href = location.href
        let cookieArr =JSON.parse(data).cookieHeader
            cookieArr.forEach((item) => {
                let temp = item.split(";")[0]
                let tempArr = temp.split("=")
                if (tempArr[0] == 'user') {
                    setCookie('user', tempArr[1], 1)
                } else {
                    setCookie(tempArr[0], tempArr[1])
                }
            })
            location.reload()
    }
    function hasGetPermissionF() {

    }
    function hiddenBtnF() {
        document.querySelector(".hiddenBtn").style.display = "none"
        document.querySelector("#vipPanel").className = "hiddenPanel"
        document.querySelector(".showBtn").style.display = "block"
    }
    function showBtnF() {
        document.querySelector(".hiddenBtn").style.display = "block"
        document.querySelector("#vipPanel").className = ""
        document.querySelector(".showBtn").style.display = "none"
    }
    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 getTip() {
        return document.querySelector("#tipContent").innerHTML
    }
    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;
    }
})();