You are reading the English version readme. 點擊此處閱讀中文自述文檔.
- Bind a KV space as
CounterSpace
. - Bind a domain. the domain will became your counter name-space.
- Use it follow down below.
Just add these parameters. (don't do it all in one)
?type=visitor
returns total visitor count.?type=hit
returns total hits count.?type=text&text=...(your encoded words)...
returns a replaced text (encode your words usingbtoa(encodeURI("some s*ck words"))
).?type=MoeCounter
returns a MoeCounter-like counter SVG, need other parameters (please read it down below :3).
@CounterByKoto_Visitors
will replace to total VISITORS count.@CounterByKoto_Hits
will replace to total HITS count.@CounterByKoto_NameSpace
will replace to total NAMESPACE.
a example:
https://project.example.dev/?type=text&text=JUU4JUE4JUFBJUU1JTk1JThGJUU0JUJBJUJBJUU2JTk1JUI4OiUyMEBDb3VudGVyQnlLb3RvX1Zpc2l0b3JzLCUyMCVFOCVBOCVBQSVFNSU5NSU4RiVFNiVBQyVBMSVFNiU5NSVCODolMjBAQ291bnRlckJ5S290b19IaXRzLCUyME5hbWVzcGFjZTolMjBAQ291bnRlckJ5S290b19OYW1lU3BhY2UlMEQlMEE=
fetch it, then you will get a response like 訪問人數: 1, 訪問次數: 3, Namespace: example.dev
other parameters
-
theme=...(themeID)...
you can find all the available theme in Here -
value=
(hit | visitor | JSON)Warn: JSON will return both hit and visitor count SVG (as DataURL, base64 encoded)
a example:
https://project.example.dev/?type=MoeCounter&theme=rule34&value=hit
will get a response like