forked from Foundation-19/Foundation-19
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add automatic UTF-8 insertion * Pew * Pew pew * Include mod
- Loading branch information
Showing
7 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
// UTF_8 - Start | ||
#undef show_browser | ||
#define show_browser(target, content, title) to_target(target, browse(add_utf_8_to_html(content), title)) | ||
// UTF_8 - End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
|
||
#### Список PRов: | ||
|
||
- https://github.com/CeladonSS13/Foundation-19/pulls/86 | ||
|
||
## UTF-8 | ||
|
||
ID мода: UTF_8 | ||
|
||
### Описание мода | ||
|
||
Добавляет в любую строку, отправляемую клиенту как браузерное окно необходимый для отображения кириллицы мета-тег. | ||
|
||
### Изменения *кор кода* | ||
|
||
- Отсутствуют | ||
|
||
### Оверрайды | ||
|
||
- Отсутствуют | ||
|
||
### Дефайны | ||
|
||
- `code/__defines/~mods/_master_defines.dm`: `show_browser` | ||
|
||
### Используемые файлы, не содержащиеся в модпаке | ||
|
||
- Отсутствуют | ||
|
||
### Авторы: | ||
|
||
SuhEugene |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/modpack/utf_8 | ||
name = "UTF-8" | ||
desc = "Чинит отображение кириллицы вообще везде, где только может" | ||
author = "SuhEugene" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#ifndef MODPACK_CELADON_UTF_8 | ||
#define MODPACK_CELADON_UTF_8 | ||
|
||
#include "_utf_8.dm" | ||
#include "code/utf_8.dm" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/proc/add_utf_8_to_html(browser_content) | ||
if (isnull(browser_content) || isfile(browser_content)) | ||
return browser_content | ||
else if(findtext(browser_content, "<html>")) | ||
return replacetext(browser_content, "<html>", "<html><meta charset='UTF-8'>") | ||
else | ||
return "<html><meta charset='UTF-8'><body>[browser_content]</body></html>" |