text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: SetPlayerArmour
description: Set a player's armor level.
tags: ["player"]
---
## คำอธิบาย
Set a player's armor level.
| Name | Description |
| ------------ | ----------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerArmour.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerArmour.md",
"repo_id": "openmultiplayer",
"token_count": 665
} | 438 |
---
title: SetPlayerObjectMaterial
description: Replace the texture of a player-object with the texture from another model in the game.
tags: ["player"]
---
## คำอธิบาย
Replace the texture of a player-object with the texture from another model in the game.
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerObjectMaterial.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerObjectMaterial.md",
"repo_id": "openmultiplayer",
"token_count": 1348
} | 439 |
---
title: SetPlayerVirtualWorld
description: Set the virtual world of a player.
tags: ["player"]
---
## คำอธิบาย
Set the virtual world of a player. They can only see other players or vehicles that are in that same world.
| Name | Description |
| -------- | --------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerVirtualWorld.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerVirtualWorld.md",
"repo_id": "openmultiplayer",
"token_count": 427
} | 440 |
---
title: SetVehicleParamsEx
description: Sets a vehicle's parameters for all players.
tags: ["vehicle"]
---
## คำอธิบาย
Sets a vehicle's parameters for all players.
| Name | Description |
| --------- | --------------------------------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleParamsEx.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleParamsEx.md",
"repo_id": "openmultiplayer",
"token_count": 1130
} | 441 |
---
title: StopAudioStreamForPlayer
description: Stops the current audio stream for a player.
tags: ["player"]
---
:::warning
This function was added in SA-MP 0.3d and will not work in earlier versions!
:::
## คำอธิบาย
Stops the current audio stream for a player.
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/StopAudioStreamForPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/StopAudioStreamForPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 420
} | 442 |
---
title: TextDrawSetPreviewModel
description: Set the model for a textdraw model preview.
tags: ["textdraw"]
---
## คำอธิบาย
Set the model for a textdraw model preview. Click here to see this function's effect.
| Name | Description |
| ---------- | ----------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetPreviewModel.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetPreviewModel.md",
"repo_id": "openmultiplayer",
"token_count": 785
} | 443 |
---
title: Update3DTextLabelText
description: Updates a 3D Text Label text and color.
tags: ["3dtextlabel"]
---
## คำอธิบาย
Updates a 3D Text Label text and color.
| Name | Description |
| --------- | -------------------------------------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/Update3DTextLabelText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/Update3DTextLabelText.md",
"repo_id": "openmultiplayer",
"token_count": 735
} | 444 |
---
title: fclose
description: Closes a file.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Closes a file. Files should always be closed when the script no longer needs them (after reading/writing).
| Name | Description |
| ----------- ... | openmultiplayer/web/docs/translations/th/scripting/functions/fclose.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/fclose.md",
"repo_id": "openmultiplayer",
"token_count": 728
} | 445 |
---
title: floatsqroot
description: Calculates the square root of given value.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Calculates the square root of given value.
| Name | Description |
| ----- | ------------------------------------------ ... | openmultiplayer/web/docs/translations/th/scripting/functions/floatsqroot.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/floatsqroot.md",
"repo_id": "openmultiplayer",
"token_count": 375
} | 446 |
---
title: getproperty
description: Get a specific property from the memory, the string is returned as a packed string!.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Get a specific property from the memory, the string is returned as a packed string!
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/getproperty.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/getproperty.md",
"repo_id": "openmultiplayer",
"token_count": 552
} | 447 |
---
title: strcat
description: This function concatenates (joins together) two strings into the destination string.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
This function concatenates (joins together) two strings into the destination string.
| Name | Des... | openmultiplayer/web/docs/translations/th/scripting/functions/strcat.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/strcat.md",
"repo_id": "openmultiplayer",
"token_count": 544
} | 448 |
---
title: Click Sources
description: Click Sources
---
To be used with [OnPlayerClickPlayer](../callbacks/OnPlayerClickPlayer)
| Value | Constant symbol |
| ----- | ----------------------- |
| 0 | CLICK_SOURCE_SCOREBOARD |
| - | - |
| openmultiplayer/web/docs/translations/th/scripting/resources/clicksources.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/clicksources.md",
"repo_id": "openmultiplayer",
"token_count": 108
} | 449 |
---
title: Limits
description: A list of all limitations imposed by the game/server.
tags: []
---
## In-game Entities
| Type | Limit |
| ------------------------------------------------------------- | --------------- |
| Players ... | openmultiplayer/web/docs/translations/th/scripting/resources/limits.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/limits.md",
"repo_id": "openmultiplayer",
"token_count": 2460
} | 450 |
---
title: Weapon Skills
description: Weapon skill values to be used with SetPlayerSkillLevel.
---
## คำอธิบาย
List of weapon skills that are used to set player's skill level using [SetPlayerSkillLevel](../functions/SetPlayerSkillLevel.md) function.
## Skill Levels
```c
0 - WEAPONSKILL_PISTOL
1 - WEAPONSKILL_PISTOL... | openmultiplayer/web/docs/translations/th/scripting/resources/weaponskills.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/weaponskills.md",
"repo_id": "openmultiplayer",
"token_count": 246
} | 451 |
# SA-MP Wiki ve open.mp Dokümanı
Geniş SA-MP topluluğu ve open.mp ekibi tarafından geliştirilen SA-MP wiki'ye hoşgeldiniz!
Bu site, SA-MP ve neticede open.mp için kolay erişilebilmeyi, doküman kaynağına kolay katkı sağlamayı hedefliyor.
## SA-MP wiki artık yok
Maalesef SA-MP wiki Eylül ayının sonlarına doğru kapatı... | openmultiplayer/web/docs/translations/tr/index.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/index.md",
"repo_id": "openmultiplayer",
"token_count": 636
} | 452 |
---
title: OnPlayerClickTextDraw
description: This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key.
tags: ["player", "textdraw"]
---
## Açıklama
Bu callback bir oyuncu bir textdrawa tıkladığında yada ESC tuşu ile seçim modunu iptal ettiğinde çağırılır.
| İsim ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerClickTextDraw.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerClickTextDraw.md",
"repo_id": "openmultiplayer",
"token_count": 1073
} | 453 |
---
title: OnPlayerKeyStateChange
description: Bu fonksiyon, desteklenen herhangi bir tuşun durumu değiştirildiğinde (basıldığında / bırakıldığında) çağrılır.
tags: ["player"]
---
## Açıklama
Bu fonksiyon, desteklenen(../resources/keys) herhangi bir tuşun durumu değiştirildiğinde (basıldığında / bırakıldığında) çağr... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerKeyStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerKeyStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 5679
} | 454 |
---
title: OnPlayerUpdate
description: Bu fonksiyon, bir istemci veya oyuncu sunucuyu durumlarıyla her güncellediğinde çağrılır.
tags: ["player"]
---
## Açıklama
Bu fonksiyon, bir istemci veya oyuncu sunucu durumlarıyla ilgili her güncellendiğinde çağrılır. Genellikle, sağlık veya zırh güncellemeleri veya silah deği... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 1430
} | 455 |
---
title: AddMenuItem
description: Belirli bir menüye öğe ekler.
tags: ["menu"]
---
## Açıklama
Belirli bir menüye öğe ekler.
| İsim | Açıklama |
| ------- | ------------------------------ |
| menuid | Öğe eklemek için menü kimliği. |
| column | Öğenin ekleneceği sütun. |
| title[] ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddMenuItem.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddMenuItem.md",
"repo_id": "openmultiplayer",
"token_count": 718
} | 456 |
---
title: Attach3DTextLabelToVehicle
description: Bir araca 3D text label bağlar.
tags: ["vehicle", "3dtextlabel"]
---
## Description
Bu fonksiyon bir araca 3D text label bağlamanızı sağlar.
| Parametre | Açıklama |
| --------- | ------------------... | openmultiplayer/web/docs/translations/tr/scripting/functions/Attach3DTextLabelToVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/Attach3DTextLabelToVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 1010
} | 457 |
---
title: ConnectNPC
description: Sunucuya NPC bağlama.
tags: ["npc"]
---
## Açıklama
Sunucuya NPC bağlama.
| Parametre | Açıklama |
| --------- | ----------------------------------------------------------------------------------------... | openmultiplayer/web/docs/translations/tr/scripting/functions/ConnectNPC.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/ConnectNPC.md",
"repo_id": "openmultiplayer",
"token_count": 513
} | 458 |
---
title: acos
description: .
tags: []
---
<LowercaseNoteTR />
## Açıklama
Radyanlardaki bir ark kosininin ters değerini alın.
| İsim | Açıklama |
| ----------- | -------------------- |
| Float:value | ark kosinüsü girişi. |
## Çalışınca Vereceği Sonuçlar
[0, pi] radyanlarda x'in ana ark kosin... | openmultiplayer/web/docs/translations/tr/scripting/functions/acos.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/acos.md",
"repo_id": "openmultiplayer",
"token_count": 396
} | 459 |
---
title: Araç parça yuvaları
---
:::info
Aşağıdaki araç parça yuvaları, [GetVehicleComponentInSlot](../functions/GetVehicleComponentInSlot) fonksiyonunda kullanılabilir.
:::
| Yuva | Tanım |
|------|--------------------------|
| 0 | CARMODTYPE_SPOILER |
| 1 | CARMODTYPE_HOOD ... | openmultiplayer/web/docs/translations/tr/scripting/resources/Componentslots.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/resources/Componentslots.md",
"repo_id": "openmultiplayer",
"token_count": 446
} | 460 |
---
title: OnActorStreamOut
description: 当演员被玩家的客户端流出时,就会调用这个回调。
tags: []
---
<VersionWarnCN name='回调' version='SA-MP 0.3.7' />
## 描述
当演员被玩家的客户端流出时,就会调用这个回调。
| 参数名 | 描述 |
| ----------- | ----------------------- |
| actorid | 已为玩家流出的演员 ID。 |
| forplayerid | 让演员流出的玩家的 ID。 |
## 返回值
它在过滤脚本... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnActorStreamOut.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnActorStreamOut.md",
"repo_id": "openmultiplayer",
"token_count": 439
} | 461 |
---
title: OnNPCSpawn
description: 当npc生成时调用此回调。
tags: []
---
## 描述
当 npc 生成时调用此回调。
## 案例
```c
public OnNPCSpawn()
{
print("NPC 生成了");
SendChat("你好世界. 我是个机器人.");
return 1;
}
```
| openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnNPCSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnNPCSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 156
} | 462 |
---
title: OnPlayerExitedMenu
description: 当玩家退出菜单时调用。
tags: ["player", "menu"]
---
## 描述
当玩家退出菜单时调用。
| 参数名 | 描述 |
| -------- | ------------------- |
| playerid | 退出菜单的玩家的 ID |
## 返回值
它在游戏模式中总是先被调用。
## 案例
```c
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid,1); // 当玩家... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerExitedMenu.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerExitedMenu.md",
"repo_id": "openmultiplayer",
"token_count": 341
} | 463 |
---
title: OnPlayerStateChange
description: 当玩家改变状态时,这个回调函数被调用。例如,当一名玩家从一辆车的司机变成了步行。
tags: ["player"]
---
## 描述
当玩家改变状态时,这个回调函数被调用。例如,当一名玩家从一辆车的司机变成了步行。
| 参数名 | 描述 |
| -------- | ------------------- |
| playerid | 改变状态的玩家 ID。 |
| newstate | 玩家的新状态。 |
| oldstate | 玩家之前的状态。 |
参考 [玩家状态](../res... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerStateChange.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerStateChange.md",
"repo_id": "openmultiplayer",
"token_count": 736
} | 464 |
---
title: OnVehicleRespray
description: 这个回调是在玩家离开改装店时调用的,即使车辆颜色没有改变。
tags: ["vehicle"]
---
## 描述
这个回调是在玩家离开改装店时调用的,即使车辆颜色没有改变。注意,回调函数名称有歧义,Pay 'n' Spray 商店不会调用该回调。
| 参数名 | 描述 |
| --------- | ------------------------- |
| playerid | 驾驶车辆的玩家的 ID。 |
| vehicleid | 被重新喷漆的那辆车的 ID。 |
| color1... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleRespray.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnVehicleRespray.md",
"repo_id": "openmultiplayer",
"token_count": 1071
} | 465 |
---
title: AllowInteriorWeapons
description: 切换是否允许在内部空间使用武器。
tags: []
---
## 描述
切换是否允许在内部空间使用武器。
| 参数名 | 说明 |
| ------ | ------------------------------------------------------------------ |
| allow | 1 表示在内部空间启用武器(默认为启用),0 表示在内部空间禁用武器。 |
## 返回值
该函数不返回... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AllowInteriorWeapons.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AllowInteriorWeapons.md",
"repo_id": "openmultiplayer",
"token_count": 578
} | 466 |
---
title: DisableInteriorEnterExits
description: 禁用游戏中所有的内部空间入口和出口(门前的黄色箭头)。
tags: []
---
## 描述
禁用游戏中所有的内部空间入口和出口(门前的黄色箭头)。
## 案例
```c
public OnGameModeInit()
{
DisableInteriorEnterExits();
return 1;
}
```
## 要点
:::tip
这个函数只有在玩家连接之前使用才会有效(建议在 OnGameModeInit 中使用)。它不会删除目前已连接的玩家的标记。
:::
:::warning
如果在使用... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/DisableInteriorEnterExits.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/DisableInteriorEnterExits.md",
"repo_id": "openmultiplayer",
"token_count": 538
} | 467 |
---
title: UpdatePlayer3DTextLabelText
description: 更新玩家的三维文本标签的文本和颜色。
tags: ["player", "3dtextlabel"]
---
## 描述
更新玩家的三维文本标签的文本和颜色。
| 参数名 | 说明 |
| --------------- | ---------------------------------- |
| playerid | 三维文本标签所对应的玩家 ID。 |
| PlayerText3D:textid | 您想要更新的三维... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/UpdatePlayer3DTextLabelText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/UpdatePlayer3DTextLabelText.md",
"repo_id": "openmultiplayer",
"token_count": 849
} | 468 |
# fly.toml file generated for openmultiplayer on 2022-08-13T10:47:12+01:00
app = "openmultiplayer"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[experimental]
allowed_public_ports = []
auto_rollback = true
[env]
LOG_LEVEL = "debug"
PACKAGES_DB = "/dat... | openmultiplayer/web/fly.toml/0 | {
"file_path": "openmultiplayer/web/fly.toml",
"repo_id": "openmultiplayer",
"token_count": 588
} | 469 |
---
title: Turfs (formerly gangzones) module
date: "2019-10-19T04:20:00"
author: J0sh
---
Zdravo! Upravo sam završio našu Turf implementaciju na server i mislio sam da objavim pregled ovog modula i da pokažem da nismo odustali ili bilo šta!
```pawn
// Creates a Turf. A playerid can be passed in order to make it a pla... | openmultiplayer/web/frontend/content/bs/blog/turfs-formerly-gangzones-module.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/bs/blog/turfs-formerly-gangzones-module.mdx",
"repo_id": "openmultiplayer",
"token_count": 654
} | 470 |
---
title: SA-MP Android (Mobile Version)
date: "2021-01-30T12:46:46"
author: Potassium
---
The open.mp team's views on SA-MP for Android
Hi everyone,
We just wanted to write a quick blog post about our views on SA-MP for Android, because we have been getting a lot of comments about it on our YouTube videos and on D... | openmultiplayer/web/frontend/content/en/blog/samp-mobile.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/blog/samp-mobile.mdx",
"repo_id": "openmultiplayer",
"token_count": 326
} | 471 |
<div dir="rtl" style={{ textAlign: "right" }}>
# اوپن مولتی پلیر
یک مود چند نفره در راه برای بازی _Grand Theft Auto: San Andreas_ که کاملا با مود فعلی چند نفره _San Andreas Multiplayer_ سازگار خواهد بود.
<br />
این به این معناست که **کلاینت SA:MP فعلی و تمام اسکریپت های SA:MP که وجود دارند در open.mp کار خواهد کرد*... | openmultiplayer/web/frontend/content/fa/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/fa/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 613
} | 472 |
# FAQ
<hr />
## რა არის open.mp?
open.mp (Open Multiplayer) არის ერთ-ერთი მოდიფიკაცია San Andreas-ის თვის, რომლის შექმნის ინიციატივა გამოიწვია პრობლემების ზრდამ განახლებებსა და მენეჯმენთზე SA:MP-ში. პირველი ვერსიის მიზანი იქნება მხოლოდ და მხოლოდ სასერვერო პროგრამის ჩანაცვლება. ამჟამინდელი SA:MP-ის კლიენტით შესაძლებე... | openmultiplayer/web/frontend/content/ka/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ka/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 14358
} | 473 |
# Open Multiplayer
Грядущая мультиплеерная модификация для _Grand Theft Auto: San Andreas_, которая будет полностью обратно совместимой с существующей мультиплеерной модификацией, известной как _San Andreas Multiplayer._
<br />
Это значит, что **существующий клиент SA-MP и все скрипты будут работать с open.mp**, а т... | openmultiplayer/web/frontend/content/ru/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ru/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 604
} | 474 |
# Open Multiplayer
_Grand Theft Auto: San Andreas_, olarak bilinen oyuna hazırlanan ve San Andreas Multiplayer ile uyumlu bir çok oyunculu mod.
<br />
Bu, mevcut **SA:MP istemcisinin ve tüm kodların Open Multiplayer ile eş zamanlı olarak çalıştırılabileceği anlamına geliyor. open.mp**, ekstra olarak çok oyunculu sun... | openmultiplayer/web/frontend/content/tr/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/tr/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 277
} | 475 |
---
title: 10,000 名用户!
date: "2021-07-16T02:51:00"
author: Potassium
---
嗨,大家好!
我们最近达到了一个惊人的里程碑:我们的 Discord 正式达到了 10,000 名用户! 🥳🔟🥳
我们认为我们应该借此机会给大家一个小小的更新,因为我们知道已经有一段时间没更新了,大家都想知道发生了什么!
所有的开发团队的成员都有本职工作和其他不得不做的事,加上我们都被新冠疫情搞得焦头烂额,意味着我们已经有一段时间没有太多精力投入在 open.mp 了。
但最近情况又好转了,我们还活着,项目进展得比以往任何时候都快,过去几周我们取得的进展比很长一段时间都要多... | openmultiplayer/web/frontend/content/zh-cn/blog/10k-members.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/10k-members.mdx",
"repo_id": "openmultiplayer",
"token_count": 1685
} | 476 |
import React from "react";
type AdType = {
ifmClass: string;
keyword: string;
emoji: string;
svg: JSX.Element;
};
// copied from https://github.com/elviswolcott/remark-admonitions/blob/master/lib/index.js
const types: { [key: string]: AdType } = {
note: {
ifmClass: "secondary",
keyword: "note",
... | openmultiplayer/web/frontend/src/components/Admonition.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/Admonition.tsx",
"repo_id": "openmultiplayer",
"token_count": 2539
} | 477 |
import React from "react";
const Pull = ({ fill = "white", display = "inline" }) => (
<svg
className="octicon octicon-git-pull-request"
viewBox="0 0 12 16"
version="1.1"
width="12"
height="16"
aria-hidden="true"
focusable="false"
role="img"
xmlns="http://www.w3.org/2000/svg"
f... | openmultiplayer/web/frontend/src/components/icons/Pull.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/icons/Pull.tsx",
"repo_id": "openmultiplayer",
"token_count": 597
} | 478 |
import { CloseIcon, HamburgerIcon } from "@chakra-ui/icons";
import {
Box,
Button,
Flex,
IconButton,
Link,
Menu,
MenuButton,
MenuDivider,
MenuGroup,
MenuItem,
MenuList,
useColorMode,
useDisclosure,
} from "@chakra-ui/react";
import {
MoonIcon,
SunIcon
} from '@chakra-ui/icons';
import { FC... | openmultiplayer/web/frontend/src/components/site/NavMenu.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/site/NavMenu.tsx",
"repo_id": "openmultiplayer",
"token_count": 1727
} | 479 |
import Admonition from "../../../Admonition";
export default function WarningVersion({
version,
name = "function",
}: {
version: string;
name: string;
}) {
return (
<Admonition type="warning">
<p>
Esta {name} foi implementada no {version} e não funcionará em
versões anteriores.
... | openmultiplayer/web/frontend/src/components/templates/translations/pt-BR/version-warning.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/pt-BR/version-warning.tsx",
"repo_id": "openmultiplayer",
"token_count": 145
} | 480 |
import React from "react";
import mdx from "@mdx-js/mdx";
import { MDXProvider, mdx as mdxReact } from "@mdx-js/react";
import { transformAsync } from "@babel/core";
import presetEnv from "@babel/preset-env";
import presetReact from "@babel/preset-react";
import { renderToString as reactRenderToString } from "react-dom... | openmultiplayer/web/frontend/src/mdx-helpers/ssr.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/mdx-helpers/ssr.ts",
"repo_id": "openmultiplayer",
"token_count": 822
} | 481 |
import { withoutAuth } from "src/auth/hoc";
import GitHubIcon from "src/components/icons/GitHub";
import DiscordIcon from "src/components/icons/Discord";
import OAuthButton from "src/components/OAuthButton";
const Page = () => (
<section className="measure center pa3">
<h1>Login</h1>
<p>Please log in using ... | openmultiplayer/web/frontend/src/pages/login.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/login.tsx",
"repo_id": "openmultiplayer",
"token_count": 328
} | 482 |
/* This is a theme distributed by `starry-night`.
* It’s based on what GitHub uses on their site.
* See <https://github.com/wooorm/starry-night> for more info. */
:root {
--color-prettylights-syntax-comment: #6e7781;
--color-prettylights-syntax-constant: #0550ae;
--color-prettylights-syntax-entity: #6639ba;
-... | openmultiplayer/web/frontend/src/styles/starry-night.css/0 | {
"file_path": "openmultiplayer/web/frontend/src/styles/starry-night.css",
"repo_id": "openmultiplayer",
"token_count": 3231
} | 483 |
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": false,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"downlevelIteration": true,
"module": "esnext",
"mod... | openmultiplayer/web/frontend/tsconfig.json/0 | {
"file_path": "openmultiplayer/web/frontend/tsconfig.json",
"repo_id": "openmultiplayer",
"token_count": 245
} | 484 |
package version
// Version is set at compile time with ldflags.
var Version = "unknown"
| openmultiplayer/web/internal/version/version.go/0 | {
"file_path": "openmultiplayer/web/internal/version/version.go",
"repo_id": "openmultiplayer",
"token_count": 24
} | 485 |
-- AlterEnum
ALTER TYPE "AuthMethod" ADD VALUE 'UNDEFINED';
-- RenameIndex
ALTER INDEX "Discord.accountId_unique" RENAME TO "Discord_accountId_key";
-- RenameIndex
ALTER INDEX "Discord.email_unique" RENAME TO "Discord_email_key";
-- RenameIndex
ALTER INDEX "Discord.username_unique" RENAME TO "Discord_username_key";
... | openmultiplayer/web/prisma/migrations/20211101120856_undefined_auth_method/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20211101120856_undefined_auth_method/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 313
} | 486 |
const path = require('path')
// NOTE: must be set before webpack config is imported
process.env.SHARELATEX_CONFIG = path.resolve(
__dirname,
'../config/settings.webpack.js'
)
const customConfig = require('../webpack.config.dev')
module.exports = {
stories: [
'../frontend/stories/**/*.stories.js',
'../m... | overleaf/web/.storybook/main.js/0 | {
"file_path": "overleaf/web/.storybook/main.js",
"repo_id": "overleaf",
"token_count": 572
} | 487 |
var RefererParser = require('referer-parser')
const { URL } = require('url')
const AnalyticsManager = require('./AnalyticsManager')
function clearSource(session) {
if (session) {
delete session.required_login_for
}
}
const UTM_KEYS = [
'utm_campaign',
'utm_source',
'utm_term',
'utm_medium',
'utm_cou... | overleaf/web/app/src/Features/Analytics/AnalyticsRegistrationSourceHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Analytics/AnalyticsRegistrationSourceHelper.js",
"repo_id": "overleaf",
"token_count": 1071
} | 488 |
/* eslint-disable
camelcase,
node/handle-callback-err,
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 n... | overleaf/web/app/src/Features/Chat/ChatApiHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Chat/ChatApiHandler.js",
"repo_id": "overleaf",
"token_count": 1857
} | 489 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS... | overleaf/web/app/src/Features/Contacts/ContactController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Contacts/ContactController.js",
"repo_id": "overleaf",
"token_count": 1342
} | 490 |
const _ = require('underscore')
module.exports = _.template(`\
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; vertical-align: top;">
<th class="small-1... | overleaf/web/app/src/Features/Email/Bodies/cta-email.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/Bodies/cta-email.js",
"repo_id": "overleaf",
"token_count": 2105
} | 491 |
const RedisWrapper = require('../../infrastructure/RedisWrapper')
const rclient = RedisWrapper.client('health_check')
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const UserGetter = require('../User/UserGetter')
const {
SmokeTestFailure,
runSmokeTests,
} = require('./..... | overleaf/web/app/src/Features/HealthCheck/HealthCheckController.js/0 | {
"file_path": "overleaf/web/app/src/Features/HealthCheck/HealthCheckController.js",
"repo_id": "overleaf",
"token_count": 1487
} | 492 |
const OError = require('@overleaf/o-error')
const UserGetter = require('../User/UserGetter')
const { addAffiliation } = require('../Institutions/InstitutionsAPI')
const FeaturesUpdater = require('../Subscription/FeaturesUpdater')
const async = require('async')
const ASYNC_AFFILIATIONS_LIMIT = 10
module.exports = {
c... | overleaf/web/app/src/Features/Institutions/InstitutionsController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Institutions/InstitutionsController.js",
"repo_id": "overleaf",
"token_count": 931
} | 493 |
const NotificationsHandler = require('./NotificationsHandler')
const { promisifyAll } = require('../../util/promises')
const request = require('request')
const settings = require('@overleaf/settings')
function dropboxDuplicateProjectNames(userId) {
return {
key: `dropboxDuplicateProjectNames-${userId}`,
crea... | overleaf/web/app/src/Features/Notifications/NotificationsBuilder.js/0 | {
"file_path": "overleaf/web/app/src/Features/Notifications/NotificationsBuilder.js",
"repo_id": "overleaf",
"token_count": 2857
} | 494 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avo... | overleaf/web/app/src/Features/Project/ProjectEditorHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectEditorHandler.js",
"repo_id": "overleaf",
"token_count": 1864
} | 495 |
const _ = require('underscore')
const { User } = require('../../models/User')
const Settings = require('@overleaf/settings')
let ReferalFeatures
module.exports = ReferalFeatures = {
getBonusFeatures(userId, callback) {
if (callback == null) {
callback = function () {}
}
const query = { _id: userId... | overleaf/web/app/src/Features/Referal/ReferalFeatures.js/0 | {
"file_path": "overleaf/web/app/src/Features/Referal/ReferalFeatures.js",
"repo_id": "overleaf",
"token_count": 568
} | 496 |
/* 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
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions... | overleaf/web/app/src/Features/StaticPages/StaticPageHelpers.js/0 | {
"file_path": "overleaf/web/app/src/Features/StaticPages/StaticPageHelpers.js",
"repo_id": "overleaf",
"token_count": 234
} | 497 |
/**
* If the user changes to a less expensive plan, we shouldn't apply the change immediately.
* This is to avoid unintended/artifical credits on users Recurly accounts.
*/
function shouldPlanChangeAtTermEnd(oldPlan, newPlan) {
return oldPlan.price > newPlan.price
}
module.exports = {
shouldPlanChangeAtTermEnd,... | overleaf/web/app/src/Features/Subscription/SubscriptionHelper.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/SubscriptionHelper.js",
"repo_id": "overleaf",
"token_count": 92
} | 498 |
/* 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/app/src/Features/Templates/TemplatesMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/Features/Templates/TemplatesMiddleware.js",
"repo_id": "overleaf",
"token_count": 199
} | 499 |
const Path = require('path')
const fs = require('fs-extra')
const { callbackify } = require('util')
const ArchiveManager = require('./ArchiveManager')
const { Doc } = require('../../models/Doc')
const DocstoreManager = require('../Docstore/DocstoreManager')
const DocumentHelper = require('../Documents/DocumentHelper')
... | overleaf/web/app/src/Features/Uploads/ProjectUploadManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Uploads/ProjectUploadManager.js",
"repo_id": "overleaf",
"token_count": 2159
} | 500 |
const Queues = require('../../infrastructure/Queues')
const UserGetter = require('./UserGetter')
const {
promises: InstitutionsAPIPromises,
} = require('../Institutions/InstitutionsAPI')
const AnalyticsManager = require('../Analytics/AnalyticsManager')
const Features = require('../../infrastructure/Features')
const ... | overleaf/web/app/src/Features/User/UserPostRegistrationAnalyticsManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserPostRegistrationAnalyticsManager.js",
"repo_id": "overleaf",
"token_count": 511
} | 501 |
const crypto = require('crypto')
const path = require('path')
module.exports = function ({
reportUri,
reportPercentage,
reportOnly = false,
exclude = [],
percentage,
}) {
return function (req, res, next) {
const originalRender = res.render
res.render = (...args) => {
const view = relativeVie... | overleaf/web/app/src/infrastructure/CSP.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/CSP.js",
"repo_id": "overleaf",
"token_count": 702
} | 502 |
/* 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
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions... | overleaf/web/app/src/infrastructure/RandomLogging.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/RandomLogging.js",
"repo_id": "overleaf",
"token_count": 205
} | 503 |
const mongoose = require('../infrastructure/Mongoose')
const { UserSchema } = require('./User')
const { Schema } = mongoose
const { ObjectId } = Schema
const DeleterDataSchema = new Schema({
deleterId: { type: ObjectId, ref: 'User' },
deleterIpAddress: { type: String },
deletedAt: { type: Date },
deletedUserI... | overleaf/web/app/src/models/DeletedUser.js/0 | {
"file_path": "overleaf/web/app/src/models/DeletedUser.js",
"repo_id": "overleaf",
"token_count": 316
} | 504 |
const mongoose = require('../infrastructure/Mongoose')
const { TeamInviteSchema } = require('./TeamInvite')
const { Schema } = mongoose
const { ObjectId } = Schema
const SubscriptionSchema = new Schema({
admin_id: {
type: ObjectId,
ref: 'User',
index: { unique: true, dropDups: true },
},
manager_ids... | overleaf/web/app/src/models/Subscription.js/0 | {
"file_path": "overleaf/web/app/src/models/Subscription.js",
"repo_id": "overleaf",
"token_count": 475
} | 505 |
mixin faq_search(headerText, headerClass)
if (typeof(settings.algolia) != "undefined" && typeof(settings.algolia.indexes) != "undefined" && typeof(settings.algolia.indexes.wiki) != "undefined")
if headerText
div(class=headerClass, ng-non-bindable) #{headerText}
.wiki(ng-controller="SearchWikiController")
for... | overleaf/web/app/views/_mixins/faq_search.pug/0 | {
"file_path": "overleaf/web/app/views/_mixins/faq_search.pug",
"repo_id": "overleaf",
"token_count": 722
} | 506 |
footer.site-footer
.site-footer-content.hidden-print
.row
ul.col-md-9
if Object.keys(settings.i18n.subdomainLang).length > 1
li.dropdown.dropup.subdued(dropdown)
a.dropdown-toggle(
href="#",
dropdown-toggle,
data-toggle="dropdown",
aria-haspopup="true",
ari... | overleaf/web/app/views/layout/footer.pug/0 | {
"file_path": "overleaf/web/app/views/layout/footer.pug",
"repo_id": "overleaf",
"token_count": 690
} | 507 |
aside.change-list(
ng-if="!history.isV2"
ng-controller="HistoryListController"
infinite-scroll="loadMore()"
infinite-scroll-disabled="history.loading || history.atEnd"
infinite-scroll-initialize="ui.view == 'history'"
)
.infinite-scroll-inner
ul.list-unstyled(
ng-class="{\
'hover-state': histor... | overleaf/web/app/views/project/editor/history/entriesListV1.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/history/entriesListV1.pug",
"repo_id": "overleaf",
"token_count": 1477
} | 508 |
.row.row-spaced
.col-xs-12
.card.card-thin
div.welcome.text-centered(ng-cloak)
h2 #{translate("welcome_to_sl")}
p #{translate("new_to_latex_look_at")}
a(href="/templates") #{translate("templates").toLowerCase()}
| #{translate("or")}
a(href="/learn") #{translate("latex_help_guide")}
... | overleaf/web/app/views/project/list/empty-project-list.pug/0 | {
"file_path": "overleaf/web/app/views/project/list/empty-project-list.pug",
"repo_id": "overleaf",
"token_count": 702
} | 509 |
mixin printPlan(plan)
if (!plan.hideFromUsers)
tr(ng-controller="ChangePlanFormController", ng-init="plan="+JSON.stringify(plan))
td
strong(ng-non-bindable) #{plan.name}
td
if (plan.annual)
| {{price}} / #{translate("year")}
else
| {{price}} / #{translate("month")}
td
if (typeof(pe... | overleaf/web/app/views/subscriptions/dashboard/_change_plans_mixins.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_change_plans_mixins.pug",
"repo_id": "overleaf",
"token_count": 505
} | 510 |
extends ../layout
block content
main.content.content-alt#main-content
.container(ng-controller="AnnualUpgradeController")
.row(ng-cloak)
.col-md-6.col-md-offset-3
.card(ng-init="planName = "+JSON.stringify(planName))
.page-header
h1.text-centered #{translate("move_to_annual_billing")}
... | overleaf/web/app/views/subscriptions/upgradeToAnnual.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/upgradeToAnnual.pug",
"repo_id": "overleaf",
"token_count": 431
} | 511 |
mixin providerList()
ul.list-like-table
li(ng-repeat="(key, provider) in providers" ng-if="!provider.hideWhenNotLinked || (provider.hideWhenNotLinked && thirdPartyIds[key])")
.row
.col-xs-12.col-sm-8.col-md-10
h4 {{provider.name}}
p.small(ng-bind-html="provider.description")
.col-xs-2.col-sm-4.c... | overleaf/web/app/views/user/settings/user-oauth.pug/0 | {
"file_path": "overleaf/web/app/views/user/settings/user-oauth.pug",
"repo_id": "overleaf",
"token_count": 686
} | 512 |
import _ from 'lodash'
/* eslint-disable
camelcase,
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
* Full docs: https://github.com/decaffeinate/dec... | overleaf/web/frontend/js/directives/eventTracking.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/eventTracking.js",
"repo_id": "overleaf",
"token_count": 1515
} | 513 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
function MessageInput({ resetUnreadMessages, sendMessage }) {
const { t } = useTranslation()
function handleKeyDown(event) {
if (event.key === 'Enter') {
event.preventDefault()
sendMessage(event.target.value)
e... | overleaf/web/frontend/js/features/chat/components/message-input.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/components/message-input.js",
"repo_id": "overleaf",
"token_count": 335
} | 514 |
import React from 'react'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import { Dropdown, MenuItem, OverlayTrigger, Tooltip } from 'react-bootstrap'
import Icon from '../../../shared/components/icon'
import { getHueForUserId } from '../../../shared/utils/colors'
import ControlledDro... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/online-users-widget.js",
"repo_id": "overleaf",
"token_count": 1496
} | 515 |
import { useState, useCallback, useEffect, useMemo } from 'react'
import { Button, ControlLabel, FormControl, FormGroup } from 'react-bootstrap'
import Icon from '../../../../../shared/components/icon'
import FileTreeCreateNameInput from '../file-tree-create-name-input'
import { useTranslation } from 'react-i18next'
im... | overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js",
"repo_id": "overleaf",
"token_count": 3900
} | 516 |
import { useState } from 'react'
import PropTypes from 'prop-types'
import { Button, Modal } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { useRefWithAutoFocus } from '../../../../shared/hooks/use-ref-with-auto-focus'
import AccessibleModal from '../../../../shared/components/accessibl... | overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js",
"repo_id": "overleaf",
"token_count": 1585
} | 517 |
import { postJSON } from '../../../infrastructure/fetch-json'
export const refreshProjectMetadata = (projectId, entityId) =>
postJSON(`/project/${projectId}/doc/${entityId}/metadata`)
| overleaf/web/frontend/js/features/file-tree/util/api.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/api.js",
"repo_id": "overleaf",
"token_count": 60
} | 518 |
import PropTypes from 'prop-types'
import classNames from 'classnames'
import OutlineItem from './outline-item'
function OutlineList({ outline, jumpToLine, isRoot, highlightedLine }) {
const listClasses = classNames('outline-item-list', {
'outline-item-list-root': isRoot,
})
return (
<ul className={listC... | overleaf/web/frontend/js/features/outline/components/outline-list.js/0 | {
"file_path": "overleaf/web/frontend/js/features/outline/components/outline-list.js",
"repo_id": "overleaf",
"token_count": 359
} | 519 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import PreviewLogsPaneEntry from './preview-logs-pane-entry'
function PreviewValidationIssue({ name, details }) {
const { t } = useTranslation()
let validationTitle
let validationContent
if (name === 'sizeCheck') {
validatio... | overleaf/web/frontend/js/features/preview/components/preview-validation-issue.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-validation-issue.js",
"repo_id": "overleaf",
"token_count": 710
} | 520 |
import App from '../../../base'
import { react2angular } from 'react2angular'
import ShareProjectModal from '../components/share-project-modal'
import { rootContext } from '../../../shared/context/root-context'
import { listProjectInvites, listProjectMembers } from '../utils/api'
App.component(
'shareProjectModal',... | overleaf/web/frontend/js/features/share-project-modal/controllers/react-share-project-modal-controller.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/controllers/react-share-project-modal-controller.js",
"repo_id": "overleaf",
"token_count": 897
} | 521 |
import moment from 'moment'
moment.updateLocale('en', {
calendar: {
lastDay: '[Yesterday]',
sameDay: '[Today]',
nextDay: '[Tomorrow]',
lastWeek: 'ddd, Do MMM YY',
nextWeek: 'ddd, Do MMM YY',
sameElse: 'ddd, Do MMM YY',
},
})
export function formatTime(date) {
return moment(date).format('... | overleaf/web/frontend/js/features/utils/format-date.js/0 | {
"file_path": "overleaf/web/frontend/js/features/utils/format-date.js",
"repo_id": "overleaf",
"token_count": 162
} | 522 |
// Angular
import './controllers/CloneProjectController'
import './controllers/CloneProjectModalController'
// React
import '../../features/clone-project-modal/controllers/left-menu-clone-project-modal-controller'
| overleaf/web/frontend/js/ide/clone/index.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/clone/index.js",
"repo_id": "overleaf",
"token_count": 63
} | 523 |
import _ from 'lodash'
/* eslint-disable
camelcase,
max-len
*/
import App from '../../../base'
import UndoManager from './aceEditor/undo/UndoManager'
import AutoCompleteManager from './aceEditor/auto-complete/AutoCompleteManager'
import SpellCheckManager from './aceEditor/spell-check/SpellCheckManager'
import ... | overleaf/web/frontend/js/ide/editor/directives/aceEditor.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor.js",
"repo_id": "overleaf",
"token_count": 15662
} | 524 |
/* eslint-disable
camelcase,
max-len
*/
import EditorShareJsCodec from '../../../EditorShareJsCodec'
import 'ace/ace'
import '../../../../../utils/EventEmitter'
import '../../../../colors/ColorManager'
const { Range } = ace.require('ace/range')
class TrackChangesManager {
constructor($scope, editor, element,... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js",
"repo_id": "overleaf",
"token_count": 8511
} | 525 |
import _ from 'lodash'
/* 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 doc... | overleaf/web/frontend/js/ide/history/components/historyEntry.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/components/historyEntry.js",
"repo_id": "overleaf",
"token_count": 1568
} | 526 |
/* 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:
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blo... | overleaf/web/frontend/js/ide/history/util/displayNameForUser.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/util/displayNameForUser.js",
"repo_id": "overleaf",
"token_count": 315
} | 527 |
/*
* Adapted from https://github.com/mozilla/pdfjs-dist/blob/e9492b7a725ec4edd466880223474f4295a5fb45/webpack.js
* The PDF.js worker needs to be loaded in a Web Worker. This can be done
* automatically with webpack via worker-loader.
* PDF.js has the above file to do this, however it uses the webpack loader
* modu... | overleaf/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js",
"repo_id": "overleaf",
"token_count": 438
} | 528 |
/* 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
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/m... | overleaf/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js",
"repo_id": "overleaf",
"token_count": 738
} | 529 |
/* eslint-disable
camelcase,
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://git... | overleaf/web/frontend/js/ide/settings/services/settings.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/settings/services/settings.js",
"repo_id": "overleaf",
"token_count": 421
} | 530 |
/* 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/main/affiliations/components/inputSuggestions.js/0 | {
"file_path": "overleaf/web/frontend/js/main/affiliations/components/inputSuggestions.js",
"repo_id": "overleaf",
"token_count": 1247
} | 531 |
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
import './project-list'
import './modal-controllers'
import './tag-controllers'
import './notifications-controller'
import './left-hand-menu-promo-controller'
import '../../services/queued-http'
| overleaf/web/frontend/js/main/project-list/index.js/0 | {
"file_path": "overleaf/web/frontend/js/main/project-list/index.js",
"repo_id": "overleaf",
"token_count": 92
} | 532 |
/* 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/modules/errorCatcher.js/0 | {
"file_path": "overleaf/web/frontend/js/modules/errorCatcher.js",
"repo_id": "overleaf",
"token_count": 852
} | 533 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import Icon from './icon'
function Processing({ isProcessing }) {
const { t } = useTranslation()
if (isProcessing) {
return (
<div aria-live="polite">
{t('processing')}… <Icon type="fw" modifier="refresh" spin />
... | overleaf/web/frontend/js/shared/components/processing.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/components/processing.js",
"repo_id": "overleaf",
"token_count": 173
} | 534 |
import { useRef, useState, useLayoutEffect } from 'react'
import classNames from 'classnames'
function useExpandCollapse({
initiallyExpanded = false,
collapsedSize = '0',
dimension = 'height',
classes = {},
} = {}) {
const ref = useRef()
const [isExpanded, setIsExpanded] = useState(initiallyExpanded)
con... | overleaf/web/frontend/js/shared/hooks/use-expand-collapse.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/hooks/use-expand-collapse.js",
"repo_id": "overleaf",
"token_count": 613
} | 535 |
/*!
* jQuery UI Touch Punch 0.2.3
*
* Copyright 2011–2014, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Depends:
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
(function ($) {
// Detect touch support
$.support.touch = 'ontouchend' in document;
// Ignore browsers without to... | overleaf/web/frontend/js/vendor/libs/jquery.ui.touch-punch.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/jquery.ui.touch-punch.js",
"repo_id": "overleaf",
"token_count": 2001
} | 536 |
import { useEffect } from 'react'
import fetchMock from 'fetch-mock'
/**
* Run callback to mock fetch routes, call restore() when unmounted
*/
export default function useFetchMock(callback) {
useEffect(() => {
return () => {
fetchMock.restore()
}
}, [])
// Running fetchMock.restore() here as wel... | overleaf/web/frontend/stories/hooks/use-fetch-mock.js/0 | {
"file_path": "overleaf/web/frontend/stories/hooks/use-fetch-mock.js",
"repo_id": "overleaf",
"token_count": 176
} | 537 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.