1
0
mirror of https://github.com/fumiama/CMoe-Counter.git synced 2024-11-27 23:20:49 +01:00
CMoe-Counter/assets/index.html

105 lines
5.3 KiB
HTML
Raw Normal View History

2021-06-07 15:18:19 +02:00
<html>
<head>
<title>Moe Counter!</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="icon" type="image/png" href="favicon.png"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/light.min.css"/>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h3>How to use:</h3>
<h5>SVG address</h5>
2021-08-01 15:15:01 +02:00
<code>http://sayuri.fumiama.top/cmoe?name=yourname</code>
2021-06-07 15:18:19 +02:00
<h5>Img tag</h5>
2021-08-01 15:15:01 +02:00
<code>&lt;img src="http://sayuri.fumiama.top/cmoe?name=yourname" alt="yourname" /></code>
2021-06-07 15:18:19 +02:00
<h5>Markdown</h5>
2021-08-01 15:15:01 +02:00
<code>![yourname](http://sayuri.fumiama.top/cmoe?name=yourname)</code>
2021-06-07 15:18:19 +02:00
<h3>
2021-06-08 12:04:52 +02:00
eg:<img src="/cmoe?name=index" alt="Moe Count!"/>
2021-06-07 15:18:19 +02:00
</h3>
<i>
Data can access by anyone, please<span style="color: #ff4500;">DO NOT</span>
enter personal information
</i>
<details>
<summary style="display: inline-block;" onclick="_evt_push(&quot;click&quot;, &quot;normal&quot;, &quot;more_theme&quot;)">
<h3 style="display: inline-block; cursor: pointer;">More theme</h3>
</summary>
<p style="margin: 0;">
Just use the query parameters <code>theme</code>
2021-06-08 12:04:52 +02:00
, like this: <code>/cmoe?name=yourname&theme=mb</code>
2021-06-07 15:18:19 +02:00
</p>
2021-06-08 12:04:52 +02:00
<h5>moebooru(mb)</h5>
2021-06-07 15:18:19 +02:00
<img src="https://count.getloli.com/get/@demo?theme=moebooru" alt="Moebooru"/>
2021-06-08 12:04:52 +02:00
<h5>moebooru-h(mbh)</h5>
2021-06-07 15:18:19 +02:00
<img src="https://count.getloli.com/get/@demo?theme=moebooru-h" alt="Moebooru-Hentai"/>
2021-06-08 12:04:52 +02:00
<h5>rule34(r34)</h5>
2021-06-07 15:18:19 +02:00
<img src="https://count.getloli.com/get/@demo?theme=rule34" alt="Rule34"/>
2021-06-08 12:04:52 +02:00
<h5>gelbooru(gb)</h5>
2021-06-07 15:18:19 +02:00
<img src="https://count.getloli.com/get/@demo?theme=gelbooru" alt="Gelbooru"/>
2021-06-08 12:04:52 +02:00
<h5>gelbooru-h(gbh)</h5>
2021-06-07 15:18:19 +02:00
<img src="https://count.getloli.com/get/@demo?theme=gelbooru-h" alt="Gelbooru-Hentai"/>
</details>
<h3>Credits</h3>
<ul>
<li>
<a href="https://repl.it/" target="_blank" rel="nofollow">repl.it</a>
</li>
<li>
<a href="https://github.com/moebooru/moebooru" target="_blank" rel="nofollow">moebooru</a>
</li>
<li>
<a href="javascript:alert(&quot;!!! NSFW LINK !!!\nPlease enter the url manually&quot;)">rule34.xxx</a>
NSFW
</li>
<li>
<a href="javascript:alert(&quot;!!! NSFW LINK !!!\nPlease enter the url manually&quot;)">gelbooru.com</a>
NSFW
</li>
<li>
<a href="https://icons8.com/icons/set/star" target="_blank" rel="nofollow">Icons8</a>
</li>
</ul>
<h3>Tool</h3>
<div class="tool">
2021-08-01 15:15:01 +02:00
<code>http://sayuri.fumiama.top/cmoe?name=</code>
2021-06-08 12:04:52 +02:00
<input id="name" type="text" placeholder="name" style="display: inline-block; width: 80px; height: 1.4em; line-height: 1.4em; margin: 0 4px; vertical-align: middle;"/>
<code>&theme=</code>
2021-06-07 15:18:19 +02:00
<select id="theme" style="display: inline-block; height: 1.6em; line-height: 1.6em; font-size: 14px; margin: 0 4px; padding: 0 4px; vertical-align: middle;">
2021-06-08 12:04:52 +02:00
<option value="mb">moebooru</option>
<option value="mbh">moebooru-h</option>
<option value="r34">rule34</option>
<option value="gb">gelbooru</option>
<option value="gbh">gelbooru-h</option>
2021-06-07 15:18:19 +02:00
</select>
<button id="get" style="margin: 10px 0;" onclick="_evt_push(&quot;click&quot;, &quot;normal&quot;, &quot;get_counter&quot;)">Get</button>
<img id="result" style="display: block;"/>
<script>
2021-06-08 12:04:52 +02:00
function get_data(url, recv_fun) {
var httpRequest = new XMLHttpRequest(); //第一步:建立所需的对象
httpRequest.open('GET', url, true); //第二步:打开连接,将请求参数写在url中
httpRequest.send(); //第三步:发送请求
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
recv_fun(httpRequest.responseText);
}
};
}
var btn = document.getElementById('get'), img = document.getElementById('result')
2021-06-07 15:18:19 +02:00
btn.addEventListener('click', function() {
2021-06-08 12:04:52 +02:00
var name = document.getElementById('name'), themeEl = document.getElementById('theme')
2021-06-07 15:18:19 +02:00
var text = name.value ? name.value.trim() : ''
2021-06-08 12:04:52 +02:00
var theme = themeEl.value || 'mb'
if (!text) alert('Please input counter name.');
else get_data('/cmoe?name=' + text + '&reg=fumiama', function(t) {
img.src = '/cmoe?name=' + text + '&theme=' + theme;
});
2021-06-07 15:18:19 +02:00
})
</script>
</div>
<p class="copy">
2021-06-08 12:04:52 +02:00
<a href="https://github.com/fumiama/CMoe-Counter" target="_blank" onclick="_evt_push(&quot;click&quot;, &quot;normal&quot;, &quot;go_github&quot;)">source code</a>
2021-06-07 15:18:19 +02:00
</p>
</body>
</html>