在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):FoxInFlame/MinecraftColorCodes开源软件地址(OpenSource Url):https://github.com/FoxInFlame/MinecraftColorCodes开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):MinecraftColorCodesMinecraft has it's own Color Code system, in which they use § characters. This JS library I made will translate all color codes into HTML, so you can insert it in your website. ##Installation
Download this as a zip, and open the zip.
Place MinecraftColorCodes.js in the directory you want.
In the webpage you have the string want to translate, link the JS file in your
You can also link the JS file at the bottom of the webpage, right before the Now you can use it! ##Usage Example:
Simple enough. Get your string, attach the function at the end (Don't forget the brackets, they are essential) and voila! You can then do whatever you like with it! ##Extras You might want to get your server's MOTD, but you don't know how to access the server from your website? Use this code! (jQuery needed)
https://mcapi.us provides JSON responses from the server provided in the URL. By using this, you can parse the JSON, and get your desired information! Visit http://mcapi.us for more information on the JSON format. ##Bugs / ToDo
If you find one, please submit an issue ticket or a pull request.
##Updates v1.0 - Created this file, added replacements for color codes v1.1 - Added formatting replacements (e.g. §l) v1.2 - Added support for multiple occurence of one color code in a string v1.3 - Added support for New Line, and Spaces because spaces were buggy. The v2.0 - A complete recode. Now fixed Bug #2, 'Having multiple formatting codes does not work'. New line and spaces was removed. v3.0 - Added §k, §r, and \n support. Now also requires the output element ID. v3.1 - Finally! Support for class names too! v3.5 - Fixed Bug #3, 'Spaces dissappear', by adding a CSS property to the output element.' v3.7 - Fixed Bug #4, put everything in a huge ##Legal You can modify this file in any way, but if you want, create a pull request so I can have a look. Also, try not sell this file/work for a price. I mean come on, if you really want money, go get a proper job. Thirdly and lastly, you can not give away this file/work without giving credit to me, and possibly giving the URL to this Github page. Due to the informality of this piece of text, you could ignore this if you want to. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论