-
Notifications
You must be signed in to change notification settings - Fork 0
/
acceptance
137 lines (137 loc) · 9.57 KB
/
acceptance
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<!-- 엘샤#2343 -->
<html lang="en">
<head>
<title>NAgitan</title>
<link rel="icon" href="/favicon.ico" />
<meta property="og:title" content="NAgitan" />
<meta property="og:image" content="/magireco/NAgitan/img/Oh.png" />
<meta property="og:description" content="acceptance" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="150" />
<meta charset="utf-8" />
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
<script src="/magireco/NAgitan/js/FileSaver.min.js" integrity="sha512-gy9z2vZ4BOk5z8nUlu92vYoibU+O5/J1vpQE4Mg7I0FFqg6Vlck40eouIZNuU4L1F9Osmwzbng3nRQW/wBl7EQ=="></script>
<script src="/magireco/NAgitan/js/jszip.min.js" integrity="sha512-xQBQYt9UcgblF6aCMrwU1NkVA7HCXaSN2oq0so80KO+y68M+n64FOcqgav4igHe6D5ObBLIf68DWv+gfBowczg=="></script>
<link href="https://magica-us.com/qb/step.css" integrity="sha512-BdDgPDg3Sk8Dtb4rTsQotu9RQul00bFh5wPdbuNAqcqxIQzpZj4DMwUENaI7hgjNMzlLnr8Aefzw1CJaYLUDpA==" crossorigin="anonymous" rel="stylesheet" />
<script src="https://magica-us.com/qb/step.js" integrity="sha512-tDDGV8c1stMEeq4LRDb6IQbHCb+34/a0pOX19iUStetdyhCJHqLS44bDS3x3n83tjqYZiSBDwZUgTNczPcPczA==" crossorigin="anonymous" defer></script>
<script>"use strict";
function play_happy_sound() {
const mumi_why = document.getElementById("mumiwhy").classList;if (
mumi_why.contains("rikahappy")) return false;
mumi_why.add("rikahappy");
const rika_happy_laugh = new Audio('/magireco/NAgitan/sound/rika_happy_laugh.mp3');
rika_happy_laugh.play();
rika_happy_laugh.addEventListener("ended", () => mumi_why.remove("rikahappy"));
return true;
}
const z0y ={[Symbol.toPrimitive]:$=>'z'+($=>['Seconds','Minutes','Hours','Day','Month','FullYear'].reduce
((z,y)=>{y=$['getUTC'+y]();do z='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx'[y%60]+
z,y/=60;while(y|=0);return z},'y'+($.getUTCMilliseconds()+'').padStart(3,'0')))(new Date)};// ㅇㅅㅇ
const _ = {
userdata: {
user:{},
gameUser:{},
userCharaList:[],
userCardList:[],
userFollowList:[]
},
gallery: {data:{}},
log: (txt, lvl = 'info') => ($('<div/>',{"class":lvl,text:z0y+' | '+JSON.stringify(txt)}).appendTo('#log'), console[lvl](txt), false),
progress: (e = null, a = false) => ($('body').toggleClass(["connecting"], a), e == null || _.log(e, a ? 'warn' : 'error')),
success: () => ($('body').addClass("success"), null),
drag_soul: {
dragenter: () => _.progress(null, true),
dragleave: () => _.progress()
},
drop_soul: {
change: ({target:{files:[u]}}) => (_.progress("got file", true), u == null ? _.progress("bad file") : JSZip.loadAsync(u)
.then(z => Promise.all(Object.keys(_.userdata).map(n => (f => f == null ? _.progress("file not found: "+n) : (_.log("extracting "+n), f.async("string")))(z.file("user/"+n+".json")))))
.then(d => _.progress(Object.keys(_.userdata).every((f, n) => d[n] ? (_.log("parsing "+f), _.userdata[f] = JSON.parse(d[n])) : _.progress(f+" is mandatory")) ? (_.log("exhuming M-girls", 'warn'),
['country', 'createdAt', 'loginName'].forEach(ㅇ => $('#user_'+ㅇ+'>.v').text(_.userdata.user[ㅇ])),
['inviteCode', 'level', 'comment'].forEach(ㅇ => $('#gameuser_'+ㅇ+'>.v').text(_.userdata.gameUser[ㅇ])),
_.userdata.userCharaList .forEach(ㅇ => $('<div/>',{"class":"mgirl bonds-"+ㅇ.bondsTotalPt,"data-mgirl-id":ㅇ.chara.id,on:{click:()=>alert(ㅇ.chara.charaMessageList[ㅇ.chara.charaMessageList.length*Math.random()|0].message.replace('<br>','\n'))},append:$('<img/>',{src:"/magireco/NAgitan/img/chara/"+ㅇ.chara.defaultCardId+".png",alt:ㅇ.chara.name,title:ㅇ.chara.name.replace('Sana','Snaa').replace('Kanagi Izumi','Oh?')})}).appendTo('#mgirls')),
_.userdata.userFollowList.forEach(ㅇ => $('<div/>',{"class":"follow "+(ㅇ.follower?"is":"not")+"_follower "+(ㅇ.follow?"is":"not")+"_following",on:{click:()=>alert(ㅇ.comment)},append:[$('<span/>',{"class":"follow_name",text:ㅇ.userName}),$('<img/>',{src:"/magireco/NAgitan/img/chara/"+ㅇ.displayCardId+".png",alt:ㅇ.charaName,title:ㅇ.charaName}),$('<span/>',{"class":"follow_date",text:ㅇ.createdAt}),$('<span/>',{"class":"follow_qbcode",text:ㅇ.inviteCode})]}).appendTo('#follows')),
_.userdata.userCardList .forEach(({card}) => (ㅇ => _.gallery.data[ㅇ]=[''+card.cardId,...(_.gallery.data[ㅇ]||[])])(''+card.charaNo)),
_.success()) : "bad data, aborting"), e => _.progress("error reading "+u.name+" as zip"))
.catch(({name}) => _.progress(name == "SyntaxError" ? "error parsing file as json": "do not throw souls")))
},
throw_soul: {
click: soul => saveAs(new File([JSON.stringify(_.gallery)],"todestrieb.json",{type:"text/json;charset=utf-8"}))
}
};
$(() => (
$('#nagi_soul').on(_.drag_soul).
find('#nagi_gem').on(_.drop_soul),
$('#mumiwhy').on(_.throw_soul)
));
</script>
<style>
@font-face {font-family:Meguca;src:url("/magireco/data/static/font.ttf")}
@font-face {font-family:Koruri;src:url(//cdn.plusminus.io/font/webkoruri/20140628/WebKoruri.eot);src:url(//cdn.plusminus.io/font/webkoruri/20140628/WebKoruri.woff) format('woff'),url(//cdn.plusminus.io/font/webkoruri/20140628/WebKoruri.ttf) format('truetype')}
body {background:#eee;color:#000;font-size:14px;font-family:Koruri,Sans-Serif}
::selection {background:transparent}
a {color:inherit;text-decoration:inherit}
#wrapper {display:flex;justify-content:center;align-items:center;height:400px}
#connecting {position:fixed;right:0;bottom:20px;width:334px;height:54px;background:url("/magireco/NAgitan/img/connecting.png") left top no-repeat;opacity:0;transition:opacity 0.4s}
#mumiwhy {position:fixed;right:0;bottom:0;width:128px;height:128px;cursor:not-allowed;background:url("/magireco/NAgitan/img/mumiwhy.png");opacity:0;transition:opacity 8s}
.success #mumiwhy {cursor:copy;opacity:.1}
.success #mumiwhy.rikahappy {opacity:1}
.connecting #connecting {opacity:1}
#log {position:absolute;top:0;left:0;color:#ddd;font-size:10px;opacity:0.1;z-index:1;cursor:vertical-text}
#log:hover {opacity:1}
#log > .info {transform:scaleY(-1)}
#log > .warn {color:blue}
#log > .error {color:red}
#nagi_soul {position:relative;z-index:50}
#nagi_soul > div, #nagi_soul > label {display:block;width:220px;height:56px;box-sizing:border-box;margin:4px 0;padding:0 4px;line-height:56px;border-radius:16px;font-size:24px}
#nagi_soul > input:focus {outline:none}
#nagi_gem {cursor:alias;position:absolute;opacity:0;top:0;right:0;bottom:0;left:0}
#nagi_label {text-align:center;color:#000;background:url("/magireco/NAgitan/img/btn_bg00.png");text-shadow:0 0 4px #800;border:none;outline:none;transition:color 5s, text-shadow 1s}
#nagi_label:hover {color:#f00;text-shadow:0 0 4px #f00}
#nagi_label:active {font-family:Meguca}
.connecting #nagi_label {font-family:Meguca;color:#800}
.success #wrapper {opacity:0;display:none}
#acceptance {opacity:0;transition:opacity 1s;display:block;margin:0 auto;justify-content:center;align-items:center;max-width:475px;height:0}
.success #acceptance {opacity:1;height:auto}
#userinfo > div {height:20px;line-height:20px;overflow:hidden}
#userinfo > #gameuser_inviteCode > .v {font-family:Meguca;cursor:zoom-in}
#userinfo .h {display:inline-block;width:160px;text-align:right;margin-right:4px}
#userinfo .h::after {content:": "}
#mgirls {border-bottom:dashed 1px #000;border-top:dashed 1px #000;padding:4px 0;margin:4px 0}
#mgirls > .mgirl {display:inline-block;cursor:cell;vertical-align:top;height:25px;box-shadow:0 0 4px 4px rgba(128, 96, 96, 0.2) inset}
#mgirls > .mgirl > img {opacity:0.6;transition:opacity 1s;width:25px;height:25px}
#mgirls > .mgirl.bonds-0 {box-shadow:0 0 4px 4px rgba(0, 0, 0, 0.2) inset}
#mgirls > .mgirl.bonds-0 > img {opacity:0.2}
#mgirls > .mgirl.bonds-64000 {box-shadow:0 0 4px 4px rgba(255, 192, 192, 0.2) inset}
#mgirls > .mgirl.bonds-64000 > img {opacity:1}
#mgirls > .mgirl:hover > img {opacity:1}
#follows > .follow {height:20px;line-height:20px;vertical-align:top;cursor:help;filter:grayscale(.6)}
#follows > .follow:hover {filter:grayscale(0);background:rgba(0.5, 0.5, 0.5, 0.1)}
#follows > .follow > span {vertical-align:top;overflow:hidden}
#follows > .follow > .follow_name {display:inline-block;width:160px;text-align:right;margin-right:4px}
#follows > .follow > img {width:20px;height:20px;transform:scaleX(-1)}
#follows > .follow > .follow_date {display:inline-block;width:160px;text-align:center;overflow:hidden;font-size:0.75em}
#follows > .follow > .follow_qbcode {display:inline-block;font-family:Meguca;transform:scaleY(-1)}
#follows > .follow.is_follower > .follow_qbcode {color:#004}
#follows > .follow.is_following > .follow_qbcode {color:#400}
#follows > .follow.is_follower.is_following > .follow_qbcode {color:#040}
</style>
</head>
<body>
<div id="all">
<div id="wrapper">
<form id="nagi_soul"><input type="file" id="nagi_gem" name="nagi_gem" /><label id="nagi_label" for="nagi_gem">user.zip</label></form>
</div>
<div id="acceptance">
<div id="userinfo"><div id="user_loginName"><span class="h">name</span><span class="v"></span></div><div id="user_country"><span class="h">country</span><span class="v"></span></div><div id="user_createdAt"><span class="h">contracted</span><span class="v"></span></div><div id="gameuser_inviteCode"><span class="h">QBcode</span><a onclick="play_happy_sound()" class="v"></a></div><div id="gameuser_level"><span class="h">level</span><span class="v"></span></div><div id="gameuser_comment"><span class="h">text</span><span class="v"></span></div></div>
<div id="mgirls"></div>
<div id="mems"></div>
<div id="follows"></div>
</div>
</div>
<div id="connecting"></div>
<div id="mumiwhy" title="export to Gallery Mode"></div>
<div id="log"></div>
</body>
</html>