text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: SetTimer
description: Sets a 'timer' to call a function after some time.
tags: []
---
## คำอธิบาย
Sets a 'timer' to call a function after some time. Can be set to repeat.
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/SetTimer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetTimer.md",
"repo_id": "openmultiplayer",
"token_count": 764
} | 445 |
---
title: ShowMenuForPlayer
description: Shows a previously created menu for a player.
tags: ["player", "menu"]
---
## คำอธิบาย
Shows a previously created menu for a player.
| Name | Description |
| -------- | ---------------------------------------------------- |
| menu... | openmultiplayer/web/docs/translations/th/scripting/functions/ShowMenuForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/ShowMenuForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 608
} | 446 |
---
title: TextDrawCreate
description: Creates a textdraw.
tags: ["textdraw"]
---
## คำอธิบาย
Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. See this page for extensive info... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawCreate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawCreate.md",
"repo_id": "openmultiplayer",
"token_count": 1192
} | 447 |
---
title: TextDrawTextSize
description: Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable).
tags: ["textdraw"]
---
## คำอธิบาย
Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectabl... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawTextSize.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawTextSize.md",
"repo_id": "openmultiplayer",
"token_count": 1247
} | 448 |
---
title: clamp
description: Force a value to be inside a range.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Force a value to be inside a range.
| Name | Description |
| ----- | ------------------------------ |
| value | The value to force in a range. |... | openmultiplayer/web/docs/translations/th/scripting/functions/clamp.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/clamp.md",
"repo_id": "openmultiplayer",
"token_count": 423
} | 449 |
---
title: db_num_rows
description: Returns the number of rows from a db_query.
tags: ["sqlite"]
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Returns the number of rows from a db_query
| Name | Description |
| ----------------- | ---------------------- |
| DBR... | openmultiplayer/web/docs/translations/th/scripting/functions/db_num_rows.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/db_num_rows.md",
"repo_id": "openmultiplayer",
"token_count": 924
} | 450 |
---
title: floatdiv
description: Divide one float by another one.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Divide one float by another one. Redundant as the division operator (/) does the same thing.
| Name | Description |
| ------... | openmultiplayer/web/docs/translations/th/scripting/functions/floatdiv.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/floatdiv.md",
"repo_id": "openmultiplayer",
"token_count": 505
} | 451 |
---
title: fremove
description: Delete a file.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Delete a file.
| Name | Description |
| ------ | --------------------------------------------------------- |
| name[] | The path of the... | openmultiplayer/web/docs/translations/th/scripting/functions/fremove.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/fremove.md",
"repo_id": "openmultiplayer",
"token_count": 636
} | 452 |
---
title: print
description: Prints a string to the server console (not in-game chat) and logs (server_log.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Prints a string to the server console (not in-game chat) and logs (server_log.txt).
| Name | Description |
|... | openmultiplayer/web/docs/translations/th/scripting/functions/print.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/print.md",
"repo_id": "openmultiplayer",
"token_count": 295
} | 453 |
---
title: strval
description: Convert a string to an integer.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Convert a string to an integer.
| Name | Description |
| -------------- | --------------------------------------------- |
|... | openmultiplayer/web/docs/translations/th/scripting/functions/strval.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/strval.md",
"repo_id": "openmultiplayer",
"token_count": 414
} | 454 |
---
title: Fighting Styles
---
## คำอธิบาย
Fighting Styles to be used with [SetPlayerFightingStyle](../functions/SetPlayerFightingStyle.md) and [GetPlayerFightingStyle](../functions/GetPlayerFightingStyle.md).
## Fighting Styles
```c
4 - FIGHT_STYLE_NORMAL
5 - FIGHT_STYLE_BOXING
6 - FIGHT_STYLE_KUNGFU
7 - FIGHT_STY... | openmultiplayer/web/docs/translations/th/scripting/resources/fightingstyles.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/fightingstyles.md",
"repo_id": "openmultiplayer",
"token_count": 158
} | 455 |
---
title: "Pickup IDs"
---
:::note
ANY valid object model can be used for [pickups](../functions/CreatePickup). This page just lists some common object models that are around the right size to be used as a pickup.
:::
## Pickup model IDs
| ID | Icon | Description ... | openmultiplayer/web/docs/translations/th/scripting/resources/pickupids.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/pickupids.md",
"repo_id": "openmultiplayer",
"token_count": 4059
} | 456 |
---
title: Tire States
description: Information about byte size and its corresponding tire state bits.
---
:::note
To be used with [UpdateVehicleDamageStatus](../functions/UpdateVehicleDamageStatus) and [GetVehicleDamageStatus](../functions/GetVehicleDamageStatus).
Even vehicles with more than 4 wheels (e.g. trucks... | openmultiplayer/web/docs/translations/th/scripting/resources/tirestates.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/tirestates.md",
"repo_id": "openmultiplayer",
"token_count": 1093
} | 457 |
---
title: Server variable system
description: The server variable system (put short, SVar) is a new way of creating server variables in an efficient dynamically created method globally, meaning they can be used in server's gamemode and filterscripts at the same time.
---
The **server variable system** (put short, **... | openmultiplayer/web/docs/translations/th/tutorials/servervariablesystem.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/tutorials/servervariablesystem.md",
"repo_id": "openmultiplayer",
"token_count": 640
} | 458 |
---
title: OnGameModeExit
description: Bu callback oyun modu sonlandığında, gmx komutu kullanıldığında, sunucu ani kapatıldığında veya GameModeExit kullanıldığında tetiklenir.
tags: []
---
## Açıklama
Bu callback oyun modu sonlandığında, gmx komutu kullanıldığında, sunucu ani kapatıldığında veya GameModeExit kullanıl... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnGameModeExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnGameModeExit.md",
"repo_id": "openmultiplayer",
"token_count": 476
} | 459 |
---
title: OnPlayerEnterVehicle
description: Bu callback, bir oyuncu bir araca binmeye başladığında çağırılır, oyuncu araca bindiğinde çağırılmaz, binmeye başladığında (araca doğru yürüme/koşma animasyonu başladığında) çağırılır.
tags: ["player", "vehicle"]
---
## Açıklama
Bu callback, bir oyuncu bir araca binmeye ba... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEnterVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEnterVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 798
} | 460 |
---
title: OnPlayerSelectedMenuRow
description: Bu fonksiyon, bir oyuncu menüden bir öğe seçtiğinde (ShowMenuForPlayer) çağrılır.
tags: ["player", "menu"]
---
## Açıklama
Bu fonksiyon, bir oyuncu menüden bir öğe seçtiğinde (ShowMenuForPlayer) çağrılır.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerSelectedMenuRow.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerSelectedMenuRow.md",
"repo_id": "openmultiplayer",
"token_count": 800
} | 461 |
---
title: OnVehiclePaintjob
description: Fonksiyon, oyuncu bulunduğu araca kaplama uygulandığında çağrılır.
tags: ["vehicle"]
---
## Açıklama
Fonksiyon, oyuncu bulunduğu araca kaplama uygulandığında çağrılır. Dikkat edin, bu fonksiyon kişi kaplamayı satın aldığında çağrılmaz.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehiclePaintjob.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehiclePaintjob.md",
"repo_id": "openmultiplayer",
"token_count": 848
} | 462 |
---
title: AddVehicleComponent
description: Girilen araç idsine modifikasyon yapar.
tags: []
---
## Açıklama
Girilen araç ID'sine uygun şekilde modifikasyon yapmanızı sağlar.
| İsim | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddVehicleComponent.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddVehicleComponent.md",
"repo_id": "openmultiplayer",
"token_count": 1126
} | 463 |
---
title: BlockIpAddress
description: IP adresini sunucu üzerinden bloklama. (with wildcards allowed).
tags: []
---
## Açıklama
IP adresini sunucudan bloklar. Belirtilen oyuncu girmeye çalıştığında sunucudan bloklandığına dair mesaj alır ve giremez. Belirtilen IP'ye sahip birisi eğer sunucu üzerinde aktifse bir kaç ... | openmultiplayer/web/docs/translations/tr/scripting/functions/BlockIpAddress.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/BlockIpAddress.md",
"repo_id": "openmultiplayer",
"token_count": 915
} | 464 |
---
title: GetActorHealth
description: Aktörün can değerini kontrol etme.
tags: ["actor"]
---
<VersionWarnTR version='SA-MP 0.3.7' />
## Açıklama
Aktörün can değerini çekin.
| Parametre | Açıklama |
| ------------- | ------------------------... | openmultiplayer/web/docs/translations/tr/scripting/functions/GetActorHealth.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/GetActorHealth.md",
"repo_id": "openmultiplayer",
"token_count": 860
} | 465 |
---
title: "Scripting: Etiketler (Tags)"
description: Etiketlerin, Pawn dilinde farklı niyet değerleriyle çalışmak için güvenlik özellikleri sağlayan bir tür özellik olduğu bir rehber.
---
## Giriş
Bir etiket, değişkenin belirli durumlar altında özel olarak işlenmesini sağlayan bir önektir. Örneğin, bir değişkenin ne... | openmultiplayer/web/docs/translations/tr/scripting/language/Tags.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Tags.md",
"repo_id": "openmultiplayer",
"token_count": 3797
} | 466 |
---
title: OnIncomingConnection
description: 当IP地址尝试连接到服务器时,将调用这个回调函数。要阻止传入的连接,使用BlockIpAddress函数。
tags: []
---
## 描述
当 IP 地址尝试连接到服务器时,将调用这个回调函数。要阻止传入的连接,请使用 BlockIpAddress 函数。
| 参数名 | 描述 |
| ------------ | ------------------------ |
| playerid | 试图连接的玩家的 ID |
| ip_address[] | 试图连接... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnIncomingConnection.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnIncomingConnection.md",
"repo_id": "openmultiplayer",
"token_count": 689
} | 467 |
---
title: OnPlayerDisconnect
description: 当玩家从服务器断开连接时,这个回调函数被调用。
tags: ["player"]
---
## 描述
当玩家从服务器断开连接时,这个回调函数被调用。
| 参数名 | 描述 |
| -------- | ------------------------------- |
| playerid | 从服务器断开连接的该玩家的 ID。 |
| reason | 断开连接的原因。见下表。 |
## 返回值
0 - 将阻止其他过滤脚本接收到这个回调。
1 - 表示这个回调... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerDisconnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerDisconnect.md",
"repo_id": "openmultiplayer",
"token_count": 823
} | 468 |
---
title: OnPlayerPickUpPickup
description: 当玩家拿到通过拾取器创建的拾取时调用。
tags: ["player"]
---
## 描述
当玩家拿到通过拾取器创建的拾取时调用。
| 参数名 | 描述 |
| -------- | --------------------------------- |
| playerid | 拿到拾取信息的玩家的 ID。 |
| pickupid | 拿到的 ID,由 CreatePickup 返回。 |
## 返回值
它在游戏模式中总是先被调用。
## 案例
`... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerPickUpPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerPickUpPickup.md",
"repo_id": "openmultiplayer",
"token_count": 567
} | 469 |
---
title: OnRecordingPlaybackEnd
description: 当使用NPC:StartRecordingPlayback复制的录制文件到达其末尾时,将调用此回调。
tags: []
---
:::warning
:::
## 描述
当使用 NPC:StartRecordingPlayback 复制的录制文件到达其末尾时,将调用此回调。
## 案例
```c
public OnRecordingPlaybackEnd()
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER, "all_around_lv_bus"); //这将在... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnRecordingPlaybackEnd.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnRecordingPlaybackEnd.md",
"repo_id": "openmultiplayer",
"token_count": 247
} | 470 |
---
title: AddSimpleModel
description: 添加新的自定义简单物体模型以供下载。
tags: []
---
<VersionWarnCN version='SA-MP 0.3.DL R1' />
## 描述
添加新的自定义简单物体模型以供下载。模型文件将以 .CRC 格式存储在玩家的 Documents\GTA San Andreas User Files\SAMP\cache 的服务器 IP 和端口的文件夹中。
| 参数名 | 说明 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddSimpleModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddSimpleModel.md",
"repo_id": "openmultiplayer",
"token_count": 1407
} | 471 |
---
title: BanEx
description: 以某个原因封禁玩家。
tags: ["管理员"]
---
## 描述
以某个原因封禁玩家。
| 参数名 | 说明 |
| -------- | ----------------- |
| playerid | 要封禁的玩家 ID。 |
| reason | 要封禁的原因。 |
## 返回值
该函数不返回任何特定的值。
## 案例
```c
public OnPlayerCommandText( playerid, cmdtext[] )
{
if (!strcmp(cmdtext, "/banme", true)... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/BanEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/BanEx.md",
"repo_id": "openmultiplayer",
"token_count": 1036
} | 472 |
---
title: InterpolateCameraPos
description: 在设定的时间内,将玩家的视角从一个位置移动到另一个位置。
tags: []
---
## 描述
在设定的时间内,将玩家的视角从一个位置移动到另一个位置。
| 参数名 | 说明 |
| ----------- | ----------------------------------------------------------------... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/InterpolateCameraPos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/InterpolateCameraPos.md",
"repo_id": "openmultiplayer",
"token_count": 1790
} | 473 |
---
title: "控制服务器"
description: 用于控制服务器的十分有效的命令.
---
## 更改游戏模式
### 运行自定义/下载的游戏模式
- 打开您安装服务器的目录 (例如:/Rockstar Games/GTA San Andreas/server)
- 获取下载/编译的 .amx 文件并将其放在服务器的 gamemodes 文件夹中
- 使用 RCON 更改模式,如上所述 (2.1)
- 或者,您可以将新模式添加到循环中,也如上所述(2.3)
### 使用脚本
与运行自定义游戏模式相同,除了:
- 将 .amx 放在名为`filterscripts`的文件夹中
- 将以下内容添加到 ser... | openmultiplayer/web/docs/translations/zh-cn/server/ControllingServer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/server/ControllingServer.md",
"repo_id": "openmultiplayer",
"token_count": 5960
} | 474 |
---
title: Port Forwarding
description: Server port forwarding tutorial.
---
**Welcome to the Port Forward tutorial!**
So, you have arrived to the Port Forward tutorial, made by Leopard.
All you need is a samp-server or omp-server and a router. If you have not a router, then you don't need to port forward!
## The S... | openmultiplayer/web/docs/tutorials/PortForwarding.md/0 | {
"file_path": "openmultiplayer/web/docs/tutorials/PortForwarding.md",
"repo_id": "openmultiplayer",
"token_count": 823
} | 475 |
---
title: 10,000 Članova!
date: "2021-07-16T02:51:00"
author: Potassium
---
Zdravo svima!
U skorije vrijeme smo stigli do jedne prekretnice: zvanično smo dostigli 10,000 članova na našem Discord serveru! 🥳🔟🥳
Mislili smo da ćemo iskoristiti ovu priliku da damo malo ažuriranje jer znamo da je prošlo dosta vremena ... | openmultiplayer/web/frontend/content/bs/blog/10k-members.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/bs/blog/10k-members.mdx",
"repo_id": "openmultiplayer",
"token_count": 1093
} | 476 |
# Open Multiplayer
Μια επερχόμενη λειτουργία για πολλους παικτες για το _Grand Theft Auto: San Andreas_ που θα είναι πλήρως συμβατή με την υπάρχον λειτουργία ονόματι _San Andreas Multiplayer._
<br />
Αυτό σημαίνει ότι ο **υπάρχων διαχειριστής SA:MP και όλα τα υπάρχοντα SA:MP scripts θα λειτουργούν με το open.mp** κα... | openmultiplayer/web/frontend/content/el/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/el/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 594
} | 477 |
# Open Multiplayer
A multiplayer mod for _Grand Theft Auto: San Andreas_ that is fully backwards compatible with the existing multiplayer mod _San Andreas Multiplayer._
<br />
This means **the existing SA:MP client and all existing SA:MP scripts work with open.mp** and, in addition to this, many bugs are also be fix... | openmultiplayer/web/frontend/content/en/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 148
} | 478 |
# Open Multiplayer
Nadchodzący multiplayer do _Grand Theft Auto: San Andreas_, który będzie w pełni kompatybilny z aktualnie istniejącym _San Andreas Multiplayer._
<br />
Oznacza to, **że aktualny klient SA:MP i wszystkie skrypty SA:MP będą działały na open.mp**, a dodatkowo wiele błędów zostanie naprawionych bez ko... | openmultiplayer/web/frontend/content/pl/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/pl/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 307
} | 479 |
# Open Multiplayer
เป็น Mod สำหรับการเล่นหลายคนที่กำลังจะมาถึงสำหรับ _Grand Theft Auto: San Andreas_ ที่จะเข้ากันได้กับ Mod ตัวเดิมที่มีอยู่นั้นคือ _San Andreas Multiplayer_
<br />
ซึ่งหมายความว่า **ไคลเอนต์ SA:MP ที่มีอยู่รวมถึงสคริปต์ทั้งหมดจาก SA:MP จะสามารถใช้กับ open.mp ได้** และนอกจากนี้บั๊กจำนวนมากจะถูกแก้ไข ... | openmultiplayer/web/frontend/content/th/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/th/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 829
} | 480 |
# FAQ
<hr />
## Що таке open.mp?
open.mp (Open Multiplayer, OMP) — мультиплеєрний мод, що розробляється як заміна San Andreas Multiplayer. створений у відповідь на проблеми з оновленнями та розробкою SA:MP. Він повністю сумісний, що дозволяє теперішнім гравцям з клієнтом SA:MP грати на серверах OMP разом з гравцями,... | openmultiplayer/web/frontend/content/uk/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 6346
} | 481 |
<h1>問答集</h1>
<hr />
<h2>什麼是 open.mp?</h2>
open.mp (Open Multiplayer, OMP) 是一個聖安地列斯的多人連線模組,目的是為了代替在開發上問題不斷累積,
以及幾乎停止更新的 SA:MP。最初的發布版本只會取代伺服器端,因此現有的客戶端一樣可以連線至伺服器。 在
未來,新的 open.mp 客戶端也將會被發布,屆時會有更多討人喜歡的更新。
<hr />
<h2>這是一個分支嗎?</h2>
非也。 這將是利用我們長年累積的經驗,從零開始進行重寫。過去曾有 SA:MP 的分支,但是使用分支會存在以下
兩個問題:
<ol>
<li>
那些所使用的是非正途開源的洩漏SA... | openmultiplayer/web/frontend/content/zh-tw/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-tw/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 4166
} | 482 |
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50... | openmultiplayer/web/frontend/public/images/assets/twitch.svg/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/twitch.svg",
"repo_id": "openmultiplayer",
"token_count": 279
} | 483 |
import { Box, Flex, FlexProps } from "@chakra-ui/layout";
import React, { ReactElement, VFC } from "react";
import { AnimateSharedLayout, AnimatePresence, motion } from "framer-motion";
import { SystemStyleObject } from "@chakra-ui/styled-system";
import { As } from "@chakra-ui/system";
interface ChildProps {
sx: Sy... | openmultiplayer/web/frontend/src/components/generic/CardList.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/generic/CardList.tsx",
"repo_id": "openmultiplayer",
"token_count": 1174
} | 484 |
import { Box, Heading, Text, useColorModeValue } from "@chakra-ui/react";
import React, { FC } from "react";
const Announcement: FC = () => {
return (
<Box maxWidth="48em" mx="auto" px="0.5em">
<Box
padding="0.8em"
borderColor={useColorModeValue("blackAlpha.100", "gray.700")}
border... | openmultiplayer/web/frontend/src/components/site/Announcement.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/site/Announcement.tsx",
"repo_id": "openmultiplayer",
"token_count": 490
} | 485 |
import Admonition from "../../../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>Este callback también puede ser llamado por un NPC.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/es/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/es/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 84
} | 486 |
import { formatDistanceToNow } from "date-fns";
import { GetServerSidePropsContext } from "next";
import { API_ADDRESS } from "src/config";
import { APIError, APIErrorSchema } from "src/types/_generated_Error";
import { niceDate } from "src/utils/dates";
import { z, ZodSchema } from "zod";
const DEFAULT_HEADERS = {
... | openmultiplayer/web/frontend/src/fetcher/fetcher.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/fetcher/fetcher.ts",
"repo_id": "openmultiplayer",
"token_count": 3577
} | 487 |
import { GetServerSidePropsContext, GetServerSidePropsResult } from "next";
import React, { FC } from "react";
import ErrorBanner from "src/components/ErrorBanner";
import { deriveError, oauth } from "src/fetcher/fetcher";
import { APIError } from "src/types/_generated_Error";
type Props = {
error?: APIError;
};
co... | openmultiplayer/web/frontend/src/pages/auth/discord.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/auth/discord.tsx",
"repo_id": "openmultiplayer",
"token_count": 292
} | 488 |
import { Box } from "@chakra-ui/react";
import { randomBytes } from "crypto";
import { GetServerSideProps, NextPage } from "next";
import { NextSeo } from "next-seo";
import { VFC } from "react";
const UID: VFC<Props> = ({ serialised }) => {
return (
<Box as="section" maxWidth="50em" margin="auto" padding="1em 2... | openmultiplayer/web/frontend/src/pages/uid.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/uid.tsx",
"repo_id": "openmultiplayer",
"token_count": 757
} | 489 |
declare module "react-nextjs-toast" {
export interface ToastContainerProps {
align?: "left" | "center" | "right";
position?: "top" | "bottom";
id?: string;
}
declare class ToastContainer extends React.Component<
ToastContainerProps,
any
> {}
export interface ToastOptions {
duration?:... | openmultiplayer/web/frontend/src/types/missing.d.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/types/missing.d.ts",
"repo_id": "openmultiplayer",
"token_count": 579
} | 490 |
package config
import (
"time"
"github.com/kelseyhightower/envconfig"
"go.uber.org/zap/zapcore"
)
// Config represents environment variable configuration parameters
type Config struct {
Production bool `envconfig:"PRODUCTION" default:"false"`
LogLevel zapcore.Level `envconfig:"LOG_LEVEL" default:"in... | openmultiplayer/web/internal/config/config.go/0 | {
"file_path": "openmultiplayer/web/internal/config/config.go",
"repo_id": "openmultiplayer",
"token_count": 1224
} | 491 |
generator client {
provider = "go run github.com/steebchen/prisma-client-go"
output = "../internal/bs"
binaryTargets = ["native"]
package = "bs"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL_BS")
}
/// The underlying table does not contain a valid unique identifi... | openmultiplayer/web/prisma/burgershot.prisma/0 | {
"file_path": "openmultiplayer/web/prisma/burgershot.prisma",
"repo_id": "openmultiplayer",
"token_count": 19621
} | 492 |
package main
import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/Southclaws/supervillain"
"github.com/openmultiplayer/web/app/resources/server"
"github.com/openmultiplayer/web/app/resources/user"
"github.com/openmultiplayer/web/app/services/docsindex"
"github.com/openmultiplayer/web/app/transports/api/aut... | openmultiplayer/web/types.go/0 | {
"file_path": "openmultiplayer/web/types.go",
"repo_id": "openmultiplayer",
"token_count": 560
} | 493 |
DOCKER_COMPOSE_FLAGS ?= -f docker-compose.yml --log-level ERROR
BUILD_NUMBER ?= local
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
PROJECT_NAME = web
BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]')
export SHARELATEX_CONFIG ?= /app/test/acceptance/config/settings.test.saas.js
expor... | overleaf/web/Makefile/0 | {
"file_path": "overleaf/web/Makefile",
"repo_id": "overleaf",
"token_count": 7307
} | 494 |
const PrivilegeLevels = {
NONE: false,
READ_ONLY: 'readOnly',
READ_AND_WRITE: 'readAndWrite',
OWNER: 'owner',
}
module.exports = PrivilegeLevels
| overleaf/web/app/src/Features/Authorization/PrivilegeLevels.js/0 | {
"file_path": "overleaf/web/app/src/Features/Authorization/PrivilegeLevels.js",
"repo_id": "overleaf",
"token_count": 61
} | 495 |
const logger = require('logger-sharelatex')
const { Project } = require('../../models/Project')
const ProjectGetter = require('../Project/ProjectGetter')
const UserGetter = require('../User/UserGetter')
const CollaboratorsHandler = require('./CollaboratorsHandler')
const EmailHandler = require('../Email/EmailHandler')
... | overleaf/web/app/src/Features/Collaborators/OwnershipTransferHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/OwnershipTransferHandler.js",
"repo_id": "overleaf",
"token_count": 1257
} | 496 |
/* eslint-disable
camelcase,
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks... | overleaf/web/app/src/Features/Downloads/ProjectDownloadsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Downloads/ProjectDownloadsController.js",
"repo_id": "overleaf",
"token_count": 1149
} | 497 |
const OError = require('@overleaf/o-error')
const settings = require('@overleaf/settings')
// Error class for legacy errors so they inherit OError while staying
// backward-compatible (can be instantiated with string as argument instead
// of object)
class BackwardCompatibleError extends OError {
constructor(message... | overleaf/web/app/src/Features/Errors/Errors.js/0 | {
"file_path": "overleaf/web/app/src/Features/Errors/Errors.js",
"repo_id": "overleaf",
"token_count": 1892
} | 498 |
const Settings = require('@overleaf/settings')
const { URL } = require('url')
function getSafeRedirectPath(value) {
const baseURL = Settings.siteUrl // base URL is required to construct URL from path
const url = new URL(value, baseURL)
let safePath = `${url.pathname}${url.search}${url.hash}`.replace(/^\/+/, '/')... | overleaf/web/app/src/Features/Helpers/UrlHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/UrlHelper.js",
"repo_id": "overleaf",
"token_count": 313
} | 499 |
/* eslint-disable
camelcase,
node/handle-callback-err,
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider sho... | overleaf/web/app/src/Features/LinkedFiles/ProjectFileAgent.js/0 | {
"file_path": "overleaf/web/app/src/Features/LinkedFiles/ProjectFileAgent.js",
"repo_id": "overleaf",
"token_count": 3562
} | 500 |
const OError = require('@overleaf/o-error')
const { Project } = require('../../models/Project')
const MAX_AUDIT_LOG_ENTRIES = 200
module.exports = {
promises: {
addEntry,
},
}
/**
* Add an audit log entry
*
* The entry should include at least the following fields:
*
* - operation: a string identifying t... | overleaf/web/app/src/Features/Project/ProjectAuditLogHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectAuditLogHandler.js",
"repo_id": "overleaf",
"token_count": 321
} | 501 |
/* eslint-disable
camelcase,
node/handle-callback-err,
max-len,
no-unused-vars,
no-useless-escape,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns... | overleaf/web/app/src/Features/Project/ProjectRootDocManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectRootDocManager.js",
"repo_id": "overleaf",
"token_count": 4416
} | 502 |
const request = require('request')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const SessionManager = require('../Authentication/SessionManager')
const TEN_SECONDS = 1000 * 10
const languageCodeIsSupported = code =>
Settings.languages.some(lang => lang.code === code)
... | overleaf/web/app/src/Features/Spelling/SpellingController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Spelling/SpellingController.js",
"repo_id": "overleaf",
"token_count": 557
} | 503 |
const AnalyticsManager = require('../Analytics/AnalyticsManager')
function sendRecurlyAnalyticsEvent(event, eventData) {
switch (event) {
case 'new_subscription_notification':
_sendSubscriptionStartedEvent(eventData)
break
case 'updated_subscription_notification':
_sendSubscriptionUpdatedEv... | overleaf/web/app/src/Features/Subscription/RecurlyEventHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/RecurlyEventHandler.js",
"repo_id": "overleaf",
"token_count": 1848
} | 504 |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
module.exports = [
{
feature: 'number_collab',
value: 'str',
plans: {
free: '1',
personal: '1',
coll: '10',
prof: 'unlimited',
},
student: '6',
},
{
feature:... | overleaf/web/app/src/Features/Subscription/planFeatures.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/planFeatures.js",
"repo_id": "overleaf",
"token_count": 1340
} | 505 |
const { Project } = require('../../models/Project')
const PublicAccessLevels = require('../Authorization/PublicAccessLevels')
const PrivilegeLevels = require('../Authorization/PrivilegeLevels')
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelat... | overleaf/web/app/src/Features/TokenAccess/TokenAccessHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/TokenAccess/TokenAccessHandler.js",
"repo_id": "overleaf",
"token_count": 3638
} | 506 |
const logger = require('logger-sharelatex')
const SessionManager = require('../Authentication/SessionManager')
const UserGetter = require('./UserGetter')
const UserUpdater = require('./UserUpdater')
const UserSessionsManager = require('./UserSessionsManager')
const EmailHandler = require('../Email/EmailHandler')
const ... | overleaf/web/app/src/Features/User/UserEmailsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserEmailsController.js",
"repo_id": "overleaf",
"token_count": 2833
} | 507 |
const { expressify } = require('../../util/promises')
const async = require('async')
const UserMembershipAuthorization = require('./UserMembershipAuthorization')
const AuthenticationController = require('../Authentication/AuthenticationController')
const UserMembershipHandler = require('./UserMembershipHandler')
const ... | overleaf/web/app/src/Features/UserMembership/UserMembershipMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipMiddleware.js",
"repo_id": "overleaf",
"token_count": 2839
} | 508 |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeina... | overleaf/web/app/src/infrastructure/LoggerSerializers.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/LoggerSerializers.js",
"repo_id": "overleaf",
"token_count": 501
} | 509 |
const Bowser = require('bowser')
const Settings = require('@overleaf/settings')
const Url = require('url')
const { getSafeRedirectPath } = require('../Features/Helpers/UrlHelper')
function unsupportedBrowserMiddleware(req, res, next) {
if (!Settings.unsupportedBrowsers) return next()
const userAgent = req.headers... | overleaf/web/app/src/infrastructure/UnsupportedBrowserMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/UnsupportedBrowserMiddleware.js",
"repo_id": "overleaf",
"token_count": 398
} | 510 |
const mongoose = require('../infrastructure/Mongoose')
const _ = require('underscore')
const { FolderSchema } = require('./Folder')
const Errors = require('../Features/Errors/Errors')
const concreteObjectId = mongoose.Types.ObjectId
const { Schema } = mongoose
const { ObjectId } = Schema
const DeletedDocSchema = new ... | overleaf/web/app/src/models/Project.js/0 | {
"file_path": "overleaf/web/app/src/models/Project.js",
"repo_id": "overleaf",
"token_count": 1558
} | 511 |
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{<%= project_name %>}
\author{<%= user.first_name %> <%= user.last_name %>}
\date{<%= month %> <%= year %>}
\begin{document}
\maketitle
\section{Introduction}
\end{document}
| overleaf/web/app/templates/project_files/mainbasic.tex/0 | {
"file_path": "overleaf/web/app/templates/project_files/mainbasic.tex",
"repo_id": "overleaf",
"token_count": 103
} | 512 |
extends ../layout
block content
main.content.content-alt#main-content
.container
.error-container
.error-details
p.error-status Not found
p.error-description #{translate("cant_find_page")}
a.error-btn(href="/") Home
| overleaf/web/app/views/general/404.pug/0 | {
"file_path": "overleaf/web/app/views/general/404.pug",
"repo_id": "overleaf",
"token_count": 98
} | 513 |
aside.editor-sidebar.full-size(
ng-controller="FileTreeController"
ng-class="{ 'multi-selected': multiSelectedCount > 0 }"
ng-show="ui.view == 'history' && !history.isV2"
)
.file-tree
.file-tree-inner(
ng-if="rootFolder",
ng-class="no-toolbar"
)
ul.list-unstyled.file-tree-list
file-entity(
en... | overleaf/web/app/views/project/editor/file-tree-history.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/file-tree-history.pug",
"repo_id": "overleaf",
"token_count": 1501
} | 514 |
#review-panel
.rp-in-editor-widgets
a.rp-track-changes-indicator(
href
ng-if="editor.wantTrackChanges"
ng-click="toggleReviewPanel();"
ng-class="{ 'rp-track-changes-indicator-on-dark' : darkTheme }"
) !{translate("track_changes_is_on")}
a.rp-bulk-actions-btn(
href
ng-if="reviewPanel.nVisibleSel... | overleaf/web/app/views/project/editor/review-panel.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/review-panel.pug",
"repo_id": "overleaf",
"token_count": 10249
} | 515 |
.faq
.row.row-spaced-large
.col-md-12
.page-header.plans-header.plans-subheader.text-centered
h2 FAQ
.row
.col-md-6
h3 #{translate("faq_how_free_trial_works_question")}
p #{translate('faq_how_does_free_trial_works_answer', { appName:'{{settings.appName}}', len:'{{trial_len}}' })}
.col-md-6
h3 #{... | overleaf/web/app/views/subscriptions/_plans_faq.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/_plans_faq.pug",
"repo_id": "overleaf",
"token_count": 669
} | 516 |
-if (user.email !== personalSubscription.recurly.account.email)
div
hr
form(async-form="updateAccountEmailAddress", name="updateAccountEmailAddress", action='/user/subscription/account/email', method="POST")
input(name='_csrf', type='hidden', value=csrfToken)
.form-group
form-messages(for="updateAccountE... | overleaf/web/app/views/subscriptions/dashboard/_personal_subscription_recurly_sync_email.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_personal_subscription_recurly_sync_email.pug",
"repo_id": "overleaf",
"token_count": 370
} | 517 |
extends ../layout
block content
- var email = reconfirm_email ? reconfirm_email : ""
- var showCaptcha = settings.recaptcha && settings.recaptcha.siteKey && !(settings.recaptcha.disabled && settings.recaptcha.disabled.passwordReset)
if showCaptcha
script(type="text/javascript", nonce=scriptNonce, src="https://ww... | overleaf/web/app/views/user/reconfirm.pug/0 | {
"file_path": "overleaf/web/app/views/user/reconfirm.pug",
"repo_id": "overleaf",
"token_count": 957
} | 518 |
#!/bin/bash
set -e
if [[ -z "$BRANCH_NAME" ]]; then
BRANCH_NAME=master
fi
if [[ `git status --porcelain=2 locales/` ]]; then
git add locales/*
git commit -m "auto update translation"
git push "$UPSTREAM_REPO" "HEAD:$BRANCH_NAME"
else
echo 'No changes'
fi
| overleaf/web/bin/push-translations-changes.sh/0 | {
"file_path": "overleaf/web/bin/push-translations-changes.sh",
"repo_id": "overleaf",
"token_count": 108
} | 519 |
@font-face {
font-family: "Stix Two Math";
src: url("./STIXTwoMath/STIXTwoMath-Regular.woff2")
format("woff2");
}
| overleaf/web/frontend/fonts/stix-two-math.css/0 | {
"file_path": "overleaf/web/frontend/fonts/stix-two-math.css",
"repo_id": "overleaf",
"token_count": 52
} | 520 |
/* eslint-disable
max-len,
no-return-assign,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs... | overleaf/web/frontend/js/directives/selectAll.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/selectAll.js",
"repo_id": "overleaf",
"token_count": 1016
} | 521 |
import { postJSON } from '../../../infrastructure/fetch-json'
export function cloneProject(projectId, cloneName) {
return postJSON(`/project/${projectId}/clone`, {
body: {
projectName: cloneName,
},
})
}
| overleaf/web/frontend/js/features/clone-project-modal/utils/api.js/0 | {
"file_path": "overleaf/web/frontend/js/features/clone-project-modal/utils/api.js",
"repo_id": "overleaf",
"token_count": 80
} | 522 |
import PropTypes from 'prop-types'
import { Alert } from 'react-bootstrap'
export default function DangerMessage({ children }) {
return <Alert bsStyle="danger">{children}</Alert>
}
DangerMessage.propTypes = {
children: PropTypes.any.isRequired,
}
| overleaf/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js",
"repo_id": "overleaf",
"token_count": 75
} | 523 |
import { useEffect, createRef } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed'
import { useFileTreeMainContext } from '../../contexts/file-tree-main'
import { useDraggable } from '../../contexts/file-tree-draggable'
i... | overleaf/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js",
"repo_id": "overleaf",
"token_count": 956
} | 524 |
import {
createContext,
useCallback,
useContext,
useReducer,
useEffect,
useMemo,
useState,
} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { findInTree } from '../util/find-in-tree'
import { useFileTreeMutable } from './file-tree-mutable'
import { useFileTreeM... | overleaf/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js",
"repo_id": "overleaf",
"token_count": 2351
} | 525 |
import PropTypes from 'prop-types'
import { useProjectContext } from '../../../shared/context/project-context'
export default function FileViewImage({ fileName, fileId, onLoad, onError }) {
const { _id: projectId } = useProjectContext({
_id: PropTypes.string.isRequired,
})
return (
<img
src={`/pro... | overleaf/web/frontend/js/features/file-view/components/file-view-image.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-view/components/file-view-image.js",
"repo_id": "overleaf",
"token_count": 242
} | 526 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import Icon from '../../../shared/components/icon'
import PreviewLogsPaneEntry from './preview-logs-pane-entry'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
function PreviewFirstErrorPopUp({
logEntry,
nErrors,
onGoToEr... | overleaf/web/frontend/js/features/preview/components/preview-first-error-pop-up.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-first-error-pop-up.js",
"repo_id": "overleaf",
"token_count": 1123
} | 527 |
import { Col, Row } from 'react-bootstrap'
import PropTypes from 'prop-types'
import { Trans } from 'react-i18next'
import { useProjectContext } from '../../../shared/context/project-context'
export default function SendInvitesNotice() {
const project = useProjectContext()
return (
<Row className="public-acce... | overleaf/web/frontend/js/features/share-project-modal/components/send-invites-notice.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/send-invites-notice.js",
"repo_id": "overleaf",
"token_count": 285
} | 528 |
import { useCallback, useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import SymbolPaletteItem from './symbol-palette-item'
export default function SymbolPaletteItems({
items,
handleSelect,
focusInput,
}) {
const [focusedIndex, setFocusedIndex] = useState(0)
// reset the focused item w... | overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js",
"repo_id": "overleaf",
"token_count": 929
} | 529 |
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null... | overleaf/web/frontend/js/ide/SafariScrollPatcher.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/SafariScrollPatcher.js",
"repo_id": "overleaf",
"token_count": 1534
} | 530 |
import App from '../../base'
const layoutOptions = {
center: {
paneSelector: '[vertical-resizable-top]',
paneClass: 'vertical-resizable-top',
size: 'auto',
},
south: {
paneSelector: '[vertical-resizable-bottom]',
paneClass: 'vertical-resizable-bottom',
resizerClass: 'vertical-resizable-re... | overleaf/web/frontend/js/ide/directives/verticalResizablePanes.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/directives/verticalResizablePanes.js",
"repo_id": "overleaf",
"token_count": 1535
} | 531 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: ... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js",
"repo_id": "overleaf",
"token_count": 1330
} | 532 |
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS103: Rewrite code to no longer use __guard__
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/m... | overleaf/web/frontend/js/ide/file-tree/util/iconTypeFromName.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/file-tree/util/iconTypeFromName.js",
"repo_id": "overleaf",
"token_count": 352
} | 533 |
/* eslint-disable
max-len,
no-return-assign,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs... | overleaf/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js",
"repo_id": "overleaf",
"token_count": 200
} | 534 |
/* eslint-disable
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/sugg... | overleaf/web/frontend/js/ide/pdf/PdfManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdf/PdfManager.js",
"repo_id": "overleaf",
"token_count": 399
} | 535 |
import _ from 'lodash'
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS103: Rewrite code... | overleaf/web/frontend/js/ide/references/ReferencesManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/references/ReferencesManager.js",
"repo_id": "overleaf",
"token_count": 1382
} | 536 |
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
import App from '../../../... | overleaf/web/frontend/js/ide/review-panel/filters/notEmpty.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/filters/notEmpty.js",
"repo_id": "overleaf",
"token_count": 120
} | 537 |
export default function withoutPropagation(callback) {
return ev => {
ev.stopPropagation()
if (callback) callback(ev)
}
}
| overleaf/web/frontend/js/infrastructure/without-propagation.js/0 | {
"file_path": "overleaf/web/frontend/js/infrastructure/without-propagation.js",
"repo_id": "overleaf",
"token_count": 46
} | 538 |
const validTeXFileRegExp = new RegExp(
`\\.(${window.ExposedSettings.validRootDocExtensions.join('|')})$`,
'i'
)
function isValidTeXFile(filename) {
return validTeXFileRegExp.test(filename)
}
export default isValidTeXFile
| overleaf/web/frontend/js/main/is-valid-tex-file.js/0 | {
"file_path": "overleaf/web/frontend/js/main/is-valid-tex-file.js",
"repo_id": "overleaf",
"token_count": 78
} | 539 |
import _ from 'lodash'
/* global recurly */
/* eslint-disable
camelcase,
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of im... | overleaf/web/frontend/js/main/subscription-dashboard.js/0 | {
"file_path": "overleaf/web/frontend/js/main/subscription-dashboard.js",
"repo_id": "overleaf",
"token_count": 3802
} | 540 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/d... | overleaf/web/frontend/js/services/wait-for.js/0 | {
"file_path": "overleaf/web/frontend/js/services/wait-for.js",
"repo_id": "overleaf",
"token_count": 482
} | 541 |
import PropTypes from 'prop-types'
import createSharedContext from 'react2angular-shared-context'
import { UserProvider } from './user-context'
import { IdeProvider } from './ide-context'
import { EditorProvider } from './editor-context'
import { CompileProvider } from './compile-context'
import { LayoutProvider } fro... | overleaf/web/frontend/js/shared/context/root-context.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/context/root-context.js",
"repo_id": "overleaf",
"token_count": 402
} | 542 |
<div class="autocomplete {{ attrs.class }}" id="{{ attrs.id }}">
<input
type="text"
ng-model="searchParam"
placeholder="{{ attrs.placeholder }}"
class="{{ attrs.inputclass }}"
id="{{ attrs.inputid }}"/>
<ul ng-show="completing">
<li
suggestion
ng-repeat="suggestion in suggestions... | overleaf/web/frontend/js/vendor/libs/angular-autocomplete/ac_template.html/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/angular-autocomplete/ac_template.html",
"repo_id": "overleaf",
"token_count": 237
} | 543 |
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
import { setupContext } from './fixtures/context'
setupContext()
export const UpToThreeConnectedUsers = args => {
return <ToolbarHeader {...args} />
}
UpToThreeConnectedUsers.args = {
onlineUsers: ['a', 'c', 'd'].map(c... | overleaf/web/frontend/stories/editor-navigation-toolbar.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/editor-navigation-toolbar.stories.js",
"repo_id": "overleaf",
"token_count": 463
} | 544 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.