디시인사이드 갤러리

갤러리 이슈박스, 최근방문 갤러리

갤러리 본문 영역

좆데 도장

암설갤로그로 이동합니다. 2022.05.28 20:55:30
조회 67 추천 0 댓글 1



javascript: (

    /* ver.1911.1

    https://gall.dcinside.com/m/mobage/4640

    */

    function () {

        var safety = 30;

        var deal = 1000

        var local = {record: 0, use:2}

        var greeting = { use:0, msg:'ありがとうございました!' };

        var energy = [9, 15]

        var home = "http://sp.pf.mbga.jp/12008305/?guid=ON&url=http://mobamas.net/idolmaster/"

        var main = home + "battles/";

        function find(s) { return document.querySelector(s); }

        function text(s, e, x) { return (e ? find(s).textContent.split(e)[x] : find(s).textContent) || ''}

        function number(s, e, x) { return ((e ? text(s).split(e)[x] : text(s)) || '0').replace(/[^0-9]/g, '') * 1 }

        function value(s) { return find(s) ? find(s).value : 0}

        const send = (type, url, request) => {

            const option = request || {}

            const form = new FormData()

            const xhr = new XMLHttpRequest()

            for (param in option.data) { form.append(param, option.data[param]) }

            xhr.open(type, url, option.async != undefined ? option.async : true)

            option.onprogress && (xhr.onprogress = (res) => { option.onprogress(res) })

            option.onload && (xhr.onload = (res) => { option.onload(res.target) })

            xhr.send(form)

            return xhr

        }

        function reload(target, action) {

            $('#top').load(main + target + " h1#JtextLimit, section.bg_gray_s.m-Top5.m-Btm10.m-Top8, form[action *= battle_processing]:eq(0), [value = 回復する], a[href *= 'profile'], table:nth-child(1), table:nth-child(4), form[action *= use_item]:eq(0)", function (response) {

                action && action()

            });

        }

        function index() {

            if (local.record || local.use) {

                var last = localStorage.getItem('vove.dojo.last') || '0000000000'

                var date = new Date()

                var now = [date.getFullYear(), date.getMonth() + 1, date.getDate(), date.getHours()];

                for (i in now) {

                    if (now[i] < 10) {

                        now[i] = "0" + now[i];

                    }

                    now[i] += ''

                }

                var now = now[0] + now[1] + now[2] + now[3]

                var nowdate = 1 * now.slice(0, 8),

                    nowhours = 1 * now.slice(8),

                    lastdate = 1 * last.slice(0, 8),

                    lasthours = 1 * last.slice(8)

                if ((nowdate > lastdate && nowhours >= 5) || (nowdate == lastdate && nowhours >= 5 && lasthours < 5)) {

                    console.log('reset')

                    if (local.use == 2) {

                        send("GET", "https://imcg.pink-check.school/api/v1/dojo?minLevel=300", {

                            async: false,

                            onload: (res) => {

                                const api = JSON.parse(res.response)

                                api.forEach((apiDojo) => {

                                    let found = DJ.some((localDojo) => {

                                        if (localDojo.id * 1 == apiDojo.mobageId * 1) {

                                            localDojo.lv = apiDojo.level

                                            localDojo.title = apiDojo.unitName

                                            return true

                                        }

                                    })

                                    if (!found) {

                                        DJ.push({ enable: 1, failed: 0, id: apiDojo.mobageId, lv: apiDojo.level, title: apiDojo.unitName })

                                    }

                                })

                                console.log(DJ)

                            }

                        })


                    }

                    for (var i = 0; i < DJ.length; i++) {

                        if (!DJ[i].id) {

                            DJ.splice(i, 1)

                        }

                        for (var j = i + 1; j < DJ.length; j++) {

                            if (DJ[i].id === DJ[j].id) {

                                DJ[i].failed > DJ[j].failed ? DJ.splice(j, 1) : DJ.splice(i, 1)

                            }

                        }

                    }

                    for (i = 0; i < DJ.length; i++) {

                        DJ[i].enable = 1

                    }

                    DJ.sort((a, b) => { return b.enable - a.enable || b.lv - a.lv || a.failed - b.failed });

                    localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                }

                localStorage.setItem('vove.dojo.last', now)

            }

            var index = - 1

            for (i = 0; i < DJ.length; i++) {

                if (DJ[i].id == id) {

                    var index = i

                    break

                }

            }

            return index

        }

        function next(index, failed) {

            document.title = ">>>>"

            if (failed || local.record == 2) {

                if (index == - 1) {

                    DJ.push({ enable: 0, lv: level, id: id, failed: failed, title: title })

                    localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                    var index = DJ.length - 1

                }

                if (index + 1) {

                    if (DJ[index].failed < failed) {

                        DJ[index].failed = failed

                    }

                    DJ[index].lv = level

                    DJ[index].title = title

                }

            }

            if (index + 1) {

                DJ[index].enable = 0

            }

            if (local.use) {

                DJ.sort((a, b) => { return b.enable - a.enable || b.lv - a.lv || a.failed - b.failed });

                localStorage.setItem('vove.dojo', JSON.stringify(DJ))

                for (i = 0; i < DJ.length; i++) {

                    if (DJ[i].enable && DJ[i].failed < deal) {

                        $('<input/>', { value: '送信中' }).appendTo('#top');

                        reload('battle_check/' + DJ[i].id, function () { document.title = "Ready" })

                        return

                    }

                }

                alert('모든 로컬 도장을 사용했습니다.')

            }

            window.close()

        }

        if (document.title == ">>>>" || find("[value = 送信中]") || document.readyState != 'complete') {

            return

        }

        if (find("#dojos")) {

            find("#dojos > div:nth-child(1) > a").click();

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

        } else if (find("#dojoList")) {

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

            document.querySelectorAll('#dojoList > tbody')[1].querySelector('a').click()

            document.querySelectorAll('#dojoList > tbody')[1].remove()

        } else if (find('div[onclick ^= navigateToDojo]')) {

            document.title = ">>>>";

            setTimeout(() => { document.title = "Ready" }, 200);

            find('div[onclick ^= navigateToDojo]').click();

        }else if (find("h1#JtextLimit")) {

            var DJ = JSON.parse(localStorage.getItem('vove.dojo') || '[]')

            if (find("a[href *= 'profile']")) {

                var id = decodeURIComponent(find("a[href *= 'profile']").href).split(/[/?]/)[11]

                find('#mbga-pf-footer').innerText = id

                var myLevel = number("td[align='left']", '\n', 2)

                var level = number("td[align='right']", '\n', 2)

                var title = text("td[align='right']", '\n', 1)

            }

            if (find("[value = LIVEバトル開始]")) {

                if (safety) {

                    if (value("[name = my_param_attack]") * 1 - number(".t-Cnt > div > span.red_mild") > safety) {

                        alert("[Safety] 사용 코스트가 " + safety + "를 초과했습니다.");

                        return

                    }

                }

                var gap = level / myLevel

                if (first = !(document.title * 1)) {

                    var index = index()

                    if (gap < 0.7 || /休業/.test(title) || /休止/.test(title) || ((index + 1) && (DJ[index].failed > deal))) {

                        next(index, 0)

                        return

                    }

                    document.title = id

                }

                find("[value = LIVEバトル開始]").value = '送信中';

                let failed = 0

                send('POST', main + "battle_processing", {

                    async: first && local.record ? false : true,

                    data: {

                        'enemy_id': value("[name = 'enemy_id']"),

                        'csrf_test_name': value("[name = 'csrf_test_name']")

                    },

                    onload: () => {

                        if (first && local.record) {

                            if (/start_lose/.test(send('GET', main + "win_or_lose?enemy_id=" + id, { async: false }).response) ? 1 : 0) {

                                document.title == "패배한 도장을 기록합니다."

                                failed = send('GET', main + "flash?enemy_id=" + id, { async: false }).response.split('self')[2].replace(/[^0-9]/g, "") * 1

                                next(index, failed)

                                throw new Error('this is not dojo. failed deal: ' + failed)

                                return

                            }

                        }

                    }

                })

                failed || reload("battle_check/" + id);

                return

            } else if (find("[value = 回復する]")) {

                find("[value = 回復する]").value = '送信中';

                for (i of energy) {

                    if (csrf = $(send('GET', home + 'item/check/' + i, { async: false }).response).find("[name = csrf_test_name]").val()) {

                        send('POST', home + 'item/use_item', {

                            async: false,

                            data: {

                                'item_id': i,

                                'csrf_test_name': csrf

                            },

                            onload: () => {

                                setTimeout(() => { reload('battle_check/' + find('#mbga-pf-footer').innerText) }, 100)

                            }

                        })

                        return

                    }

                }

                alert('공격 코스트 회복 아이템이 없어 보입니다.')

            }

            if ((document.title * 1) && greeting.use) {

                document.title = 'Now greeting...';

                find("#top").innerText = '';

                send('POST', home + "cheer/send_check", {

                    async: false,

                    data: {

                        'to_viewer_id': id,

                        'message': greeting.msg

                    }

                })

            }

            next(index(), 0)

            return

        }

    }

)();

추천 비추천

0

고정닉 0

0

댓글 영역

전체 댓글 0
본문 보기

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 리스트
번호 제목 글쓴이 작성일 조회 추천
설문 실제 모습일지 궁금한 미담 제조기 스타는? 운영자 25/05/05 - -
공지 갤러리 댓글 기능 개선(멘션 기능) 안내 운영자 25/05/08 - -
2080039 엘레오노라 천국간거보니 드래곤볼 데브라 생각남 로야우갤로그로 이동합니다. 22.08.05 25 0
2080038 메구미가 남장여자고 토모카가 남자였네 ㅇㅇ(221.151) 22.08.05 44 0
2080036 카톡도 좋아요 생기네 백죠갤로그로 이동합니다. 22.08.05 45 0
2080035 커멸은 다키가 낳던데 [2] 허니갤로그로 이동합니다. 22.08.05 39 0
2080033 크크루 루삥뽕 크크루삥뽕~ 정신나간정신병자갤로그로 이동합니다. 22.08.05 22 0
2080032 [핫산]하늘색의 아스테리즘 6화7 『들어줬으면 해』 [20] 맑텗핡궭갤로그로 이동합니다. 22.08.05 789 23
2080031 뭔데 씨발ㅋㅋㅋ 유코갤로그로 이동합니다. 22.08.05 50 0
2080030 엘레오노라 천국가서 계왕이랑 수련했다더라 Tickin갤로그로 이동합니다. 22.08.05 25 0
2080028 야요이짤 차분 머임 [2] 하기와라갤로그로 이동합니다. 22.08.05 44 0
2080025 우주명곡 [2] 체리푸딩갤로그로 이동합니다. 22.08.05 25 0
2080023 커멸 얘가 젤 이쁘던데 [7] INTERNET_OVERDOSE갤로그로 이동합니다. 22.08.05 71 0
2080022 집가면 술좆목 밀어야돼 혁명설탕갤로그로 이동합니다. 22.08.05 23 0
2080021 6천원 할일받은 치킨 존-내 맛있네 ㅋㅋㅋ [2] 정신나간정신병자갤로그로 이동합니다. 22.08.05 41 0
2080020 오타니라고 쓰면뭔가 이상함 [1] 제리에갤로그로 이동합니다. 22.08.05 38 0
2080016 (나도 코노미언니만한 시절이 있었지...) ㅇㅇ(221.151) 22.08.05 26 0
2080015 개좆마스 픽시브짤 젤 많은 애는 누구지 [6] 하기와라갤로그로 이동합니다. 22.08.05 55 0
2080012 기분 귀멸의칼날 최고의 미모를 가진 캐릭터 같네 [2] 맨발의성녀갤로그로 이동합니다. 22.08.05 53 0
2080007 갑자기 씹레 접속이 개같이 먹통인데 아이코황제갤로그로 이동합니다. 22.08.05 54 0
2080005 오 다다음주 휴가입갤... [1] 텐토목갤로그로 이동합니다. 22.08.05 46 0
2080002 노노 다람쥐분장시키고 비닐하우스 알바시키기 [2] 혁명설탕갤로그로 이동합니다. 22.08.05 36 0
2080001 저 아이큐 검사 124나왔음 [2] 제리에갤로그로 이동합니다. 22.08.05 32 0
2079999 엘레오노라 걔 아무거나 막 주워먹던데 [1] ㅇㅇ(221.151) 22.08.05 42 0
2079998 6시 되니간 귀신같이 배고파지네 [2] 하기와라갤로그로 이동합니다. 22.08.05 27 0
2079997 보이는 쇼코짤 미키나노갤로그로 이동합니다. 22.08.05 33 0
2079995 개가 헛기침 자주하길래 동물 병원 데려갔는데 꾀병이래 [1] ㅇㅇ(112.140) 22.08.05 44 0
2079994 하루카 진심 개꼴리는데 어카냐.... [2] 루카오스갤로그로 이동합니다. 22.08.05 64 0
2079993 아니 씨발아 [3] 필어먹을갤로그로 이동합니다. 22.08.05 65 0
2079992 좆피스 이제 아오키지가 나오나? [1] ㅇㅇ갤로그로 이동합니다. 22.08.05 41 0
2079989 와 엔젤스 오타니가2개에 팀합쳐서홈런7개쳤네 ㅋㅋㅋㅋ [5] 뭉눅움갤로그로 이동합니다. 22.08.05 65 0
2079987 뭘 추가했다고? 훔미카갤로그로 이동합니다. 22.08.05 24 0
2079986 키무라의 말은 믿지마라 회색체리갤로그로 이동합니다. 22.08.05 30 0
2079984 기분 변경백 부인 엘레오노라 같네 [3] 흑단갤로그로 이동합니다. 22.08.05 44 0
2079982 저 중딩 때 알던 애가 딱 초코 체형이엇음 [5] ㅇㅇ(59.31) 22.08.05 61 0
2079981 뭐 뭐 뭐꼬... [1] ㅇㅇ(221.151) 22.08.05 37 0
2079979 LGBT 유이 [10] 도쿄당고갤로그로 이동합니다. 22.08.05 88 0
2079978 얘 좀 맘에 드네 [2] INTERNET_OVERDOSE갤로그로 이동합니다. 22.08.05 47 0
2079977 이게 오세훈 사진이었네 [3] ㅇㅇ(121.181) 22.08.05 82 0
2079976 이치방노 링고와 나니링고? [2] 병신갤로그로 이동합니다. 22.08.05 38 0
2079975 예림이 그패봐봐 장이여? [1] 맑텗핡궭갤로그로 이동합니다. 22.08.05 25 0
2079974 갤놈들이 아는게 많은 이유.jpg [1] 타임세이버갤로그로 이동합니다. 22.08.05 63 0
2079973 습기습기습기습기 [2] 아이올라이트갤로그로 이동합니다. 22.08.05 30 0
2079971 움짤만드는 사람인데 그림 귀엽네 [1] 참참갤로그로 이동합니다. 22.08.05 41 0
2079970 앞으로 디시에 그림올릴땐 홍보도 같이 해야겠음 [10] 제리에갤로그로 이동합니다. 22.08.05 70 0
2079969 선착순한명 [5] 박하일생갤로그로 이동합니다. 22.08.05 51 0
2079968 초밥 2만원짜리 vs 2만 6천원짜리 ㅇㄷ?? [2] 루카오스갤로그로 이동합니다. 22.08.05 45 0
2079966 후유코의 말은 믿지 마라 ㅇㅇ(221.151) 22.08.05 37 0
2079965 개같이 더운 벌새갤로그로 이동합니다. 22.08.05 22 0
2079963 오늘 씻기 귀찮아서 그냥 나갈까 했는데 안그러길 잘했다 [3] ㅅㅁㅅㅇ(223.33) 22.08.05 34 0
2079962 농가 매출의 20%를 책임지는것은? ㅋㅋㅋㅋㅋ [3] 책상다람쥐갤로그로 이동합니다. 22.08.05 73 0
2079960 이런 패션을 한 눈나가잇어요 [2] 도쿄당고갤로그로 이동합니다. 22.08.05 44 0
뉴스 이정현, 복덩이 둘째 딸 최초 공개…”벌써 100일” (‘편스토랑’) 디시트렌드 10:00
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2