swag(R站)vip视频随意观看&19J.TV韩国女主播vip视频任意看 永久vip

swag(R站)vip视频&19J.TV韩国女主播vip视频

As of 2022-03-23. See the latest version.

// ==UserScript==
// @name         swag(R站)vip视频随意观看&19J.TV韩国女主播vip视频任意看 永久vip
// @name:zh-TW   swag(R站)vip視頻隨意觀看&19J.TV韓國女主播vip視頻任意看 永久vip
// @namespace    http://tampermonkey.net/
// @version      1.3.0
// @description  swag(R站)vip视频&19J.TV韩国女主播vip视频
// @description:zh-TW  swag(R站)vip視頻&19J.TV韓國女主播vip視頻
// @author       FFFFFFeng
// @include      /^https://swag.+\.xyz.*$/
// @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);font-size:10px;">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>
                <div>
                    <p>----------------------------------</p>
                    <p style="text-indent:2em;">1.输入通行码(也就是你支付宝昵称)后,点解。</p>
                    <p>----------------------------------</p>
                    <p style="text-indent:2em;">2.稍等即可观看vip视频。</p>
                    <p>----------------------------------</p>
                    <p style="text-indent:2em;">3.网站自带下载功能。</p>
                    <p>----------------------------------</p>
                    <p style="text-indent:2em;">4.注意,获取权限成功后,点击右上角会员中心找到19J的登录方式。</p>
                </div>
                <span id="read" style="font-size:13px;color:red;">没问题后点我付款</span>
            </div>
        </div>
        <div id="readItem">
            <p style="text-indent:2em;">0.双网站vip,价格:39.99</p>
            <p style="text-indent:2em;">1.设置好支付宝昵称,如果你支付宝App头像旁边显示的是你的真实姓名,那就是你没设置昵称。</p>
            <p style="text-indent:2em;">2.昵称设置规则:三位字符或以上,不要使用如:123、啊啊啊之类简单的,大概率会失效,如果可以你可以设置成你的邮箱,这样有问题我就可以联系你。</p>
            <p style="text-indent:2em;">3.付完款后可能有延迟,请稍等。</p>
            <p style="text-indent:2em;">4.有问题联系邮箱。</p>
            <p style="text-indent:2em;"><a style="text-decoration:underline;color:red;" href="https://i.postimg.cc/Y0RStGqh/swag-z.png" target="_blank">没问题后点我付款.</a></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:0;
         width:100%;
         margin-left:10px;
         font-size:10px;
    }
    #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() {
        setGonggao("     =====感谢安装!=====")
    }
    // 发送请求,获取权限
    function getHttpsToken(t) {
        setTip("获取权限中...")
        fetch("https://45.76.196.170:3001/getPermission/"+t+"/130").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("=")
                if (tempArr[0] == 'user') {
                    setCookie('user', tempArr[1], 1)
                } else {
                    setCookie(tempArr[0], tempArr[1])
                }
            })
            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 dom = document.getElementById("vip1")
        return dom
    }
    // 主函数
    function main() {
// 给控制面板隐藏或者显示按钮添加点击事件
        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()
})();