text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: SendDeathMessageToPlayer
description: Adds a death to the 'killfeed' on the right-hand side of the screen for a single player.
tags: ["player"]
---
## คำอธิบาย
Adds a death to the 'killfeed' on the right-hand side of the screen for a single player.
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/SendDeathMessageToPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SendDeathMessageToPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 784
} | 460 |
---
title: SetObjectMaterialText
description: Replace the texture of an object with text.
tags: []
---
## คำอธิบาย
Replace the texture of an object with text.
| Name | Description |
| ------------- | --------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectMaterialText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetObjectMaterialText.md",
"repo_id": "openmultiplayer",
"token_count": 1281
} | 461 |
---
title: SetPlayerColor
description: Set the colour of a player's nametag and marker (radar blip).
tags: ["player"]
---
## คำอธิบาย
Set the colour of a player's nametag and marker (radar blip).
| Name | Description |
| -------- | ---------------------------------------- |
| playeri... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerColor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerColor.md",
"repo_id": "openmultiplayer",
"token_count": 435
} | 462 |
---
title: SetPlayerPosFindZ
description: This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position.
tags: ["player"]
---
## คำอธิบาย
This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position.
| Name ... | openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerPosFindZ.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetPlayerPosFindZ.md",
"repo_id": "openmultiplayer",
"token_count": 469
} | 463 |
---
title: SetSVarString
description: Set a string server variable.
tags: []
---
:::warning
This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions!
:::
## คำอธิบาย
Set a string server variable.
| Name | Description |
| -------------- | ----------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/SetSVarString.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetSVarString.md",
"repo_id": "openmultiplayer",
"token_count": 454
} | 464 |
---
title: SetVehicleZAngle
description: Set the Z rotation (yaw) of a vehicle.
tags: ["vehicle"]
---
## คำอธิบาย
Set the Z rotation (yaw) of a vehicle.
| Name | Description |
| ------------- | --------------------------------------------- |
| vehicleid | The ID of the ... | openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleZAngle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetVehicleZAngle.md",
"repo_id": "openmultiplayer",
"token_count": 605
} | 465 |
---
title: TextDrawBackgroundColor
description: Adjusts the text draw area background color (the outline/shadow - NOT the box.
tags: ["textdraw"]
---
## คำอธิบาย
Adjusts the text draw area background color (the outline/shadow - NOT the box. For box color, see TextDrawBoxColor).
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawBackgroundColor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawBackgroundColor.md",
"repo_id": "openmultiplayer",
"token_count": 1008
} | 466 |
---
title: TextDrawSetString
description: Changes the text on a textdraw.
tags: ["textdraw"]
---
## คำอธิบาย
Changes the text on a textdraw.
| Name | Description |
| -------- | ------------------------------- |
| text | The TextDraw to change |
| string[] | The new string for the... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetString.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawSetString.md",
"repo_id": "openmultiplayer",
"token_count": 936
} | 467 |
---
title: floatadd
description: Adds two floats together.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Adds two floats together. This function is redundant as the standard operator (+) does the same thing.
| Name | Description |
| ------------- | ------------- |
... | openmultiplayer/web/docs/translations/th/scripting/functions/floatadd.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/floatadd.md",
"repo_id": "openmultiplayer",
"token_count": 412
} | 468 |
---
title: format
description: Formats a string to include variables and other strings inside it.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Formats a string to include variables and other strings inside it.
| Name | Description |
| ... | openmultiplayer/web/docs/translations/th/scripting/functions/format.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/format.md",
"repo_id": "openmultiplayer",
"token_count": 689
} | 469 |
---
title: memcpy
description: Copy bytes from one location to another.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Copy bytes from one location to another.
| Name | Description |
| -... | openmultiplayer/web/docs/translations/th/scripting/functions/memcpy.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/memcpy.md",
"repo_id": "openmultiplayer",
"token_count": 883
} | 470 |
---
title: strmid
description: Extract a range of characters from a string.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Extract a range of characters from a string.
| Name | Description |
| ----------... | openmultiplayer/web/docs/translations/th/scripting/functions/strmid.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/strmid.md",
"repo_id": "openmultiplayer",
"token_count": 680
} | 471 |
---
title: "Scripting: Tags"
description: A guide for Tags, a type-like feature of the Pawn language providing safety features for working with values of different intent.
---
## Introduction
A tag is a prefix to a variable which tells the compiler to treat the variable specially under certain circumstances. For exam... | openmultiplayer/web/docs/translations/th/scripting/language/Tags.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/language/Tags.md",
"repo_id": "openmultiplayer",
"token_count": 1976
} | 472 |
---
title: Door States
description: Information about byte size and its corresponding door state bits.
---
:::note
To be used with [GetVehicleDamageStatus](../functions/GetVehicleDamageStatus) and [UpdateVehicleDamageStatus](../functions/UpdateVehicleDamageStatus).
:::
## Which bit stores what?
The damage of each ... | openmultiplayer/web/docs/translations/th/scripting/resources/doorstates.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/doorstates.md",
"repo_id": "openmultiplayer",
"token_count": 2122
} | 473 |
---
title: Text Alignments
---
To be used with [SetObjectMaterialText](../functions/SetObjectMaterialText).
```c
OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
```
| openmultiplayer/web/docs/translations/th/scripting/resources/textalignments.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/textalignments.md",
"repo_id": "openmultiplayer",
"token_count": 91
} | 474 |
---
title: OnEnterExitModShop
description: Bu callback, bir oyuncu modifiye garajlarından birine giriş veya çıkış yaptığında tetiklenir.
tags: []
---
## Açıklama
Bu callback, bir oyuncu modifiye garajlarından birine giriş veya çıkış yaptığında tetiklenir.
| Name | Description ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnEnterExitModShop.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnEnterExitModShop.md",
"repo_id": "openmultiplayer",
"token_count": 683
} | 475 |
---
title: OnPlayerEditObject
description: Bu callback bir oyuncu obje düzenlemeyi bitirdiğinde çağırılır (EditObject/EditPlayerObject).
tags: ["player"]
---
## Açıklama
Bu callback bir oyuncu obje düzenlemeyi bitirdiğinde çağırılır (EditObject/EditPlayerObject).
| İsim | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEditObject.md",
"repo_id": "openmultiplayer",
"token_count": 2055
} | 476 |
---
title: OnPlayerRequestDownload
description: Fonksiyon, bir oyuncu özel model indirmeleri istediğinde çağrılır.
tags: ["player"]
---
<VersionWarnTR name='callback' version='SA-MP 0.3.DL R1' />
## Açıklama
Fonksiyon, bir oyuncu özel model indirmeleri istediğinde çağrılır.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestDownload.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestDownload.md",
"repo_id": "openmultiplayer",
"token_count": 799
} | 477 |
---
title: OnVehicleDamageStatusUpdate
description: Bu fonksiyon, aracın kapıları, farları, lastikleri veya panelleri gibi araç elemanları hasar aldığında çağrılır.
tags: ["vehicle"]
---
:::tip
Araç hasar değerlerinin ne işe yaradığını görmek için bkz. [here](../resources/damagestatus).
:::
## Açıklama
Bu fonksiyo... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleDamageStatusUpdate.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleDamageStatusUpdate.md",
"repo_id": "openmultiplayer",
"token_count": 909
} | 478 |
---
title: AddStaticPickup
description: Bu işlev oyuna "statik" bir toplama ekler.
tags: []
---
## Açıklama
Bu işlev oyuna "statik" bir toplama ekler. Bu manyetikler, komut dosyası yazmadan çalışabilme özelliği ile silah, sağlık, zırh vb. destekler (silah / sağlık / zırh otomatik olarak verilecektir).
| İsim ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddStaticPickup.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddStaticPickup.md",
"repo_id": "openmultiplayer",
"token_count": 1264
} | 479 |
---
title: AttachTrailerToVehicle
description: Bir aracı bir başka araca römork olarak bağlama.
tags: ["vehicle"]
---
## Açıklama
Bir aracı bir başka araca römork olarak bağlama.
| Parametre | Açıklama |
| --------- | ------------------------------------------------- |
| trai... | openmultiplayer/web/docs/translations/tr/scripting/functions/AttachTrailerToVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AttachTrailerToVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 568
} | 480 |
---
title: CreateObject
description: Obje oluşturma.
tags: []
---
## Açıklama
Oyun dünyası üzerinde obje oluşturma.
| Parametre | Açıklama |
| --------... | openmultiplayer/web/docs/translations/tr/scripting/functions/CreateObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/CreateObject.md",
"repo_id": "openmultiplayer",
"token_count": 2377
} | 481 |
---
title: "Anahtar Kelimeler: Operatörler"
---
## `char`
`char`, bir paketlenmiş dize içinde verilen karakter sayısını tutmak için gereken hücre sayısını döndürür. Yani belirli bir bayi sayısını tutmak için gereken 4 bayilik hücre sayısını. Örneğin:
```c
4 char
```
1 döndürür.
```c
3 char
```
1 döndürür (bir değ... | openmultiplayer/web/docs/translations/tr/scripting/language/Operators.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Operators.md",
"repo_id": "openmultiplayer",
"token_count": 1012
} | 482 |
---
title: open.mp fonksiyonları
description: Yeni fonksiyonlar ve callbackler.
---
Bu sayfa open.mp'ye eklenen tüm fonksiyonları ve callbackleri içerir
## Oyuncu
| İsim |
|---------------------------------------------... | openmultiplayer/web/docs/translations/tr/server/omp-functions.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/server/omp-functions.md",
"repo_id": "openmultiplayer",
"token_count": 21071
} | 483 |
---
title: OnFilterScriptInit
description: 初始化(加载完成)过滤脚本(filterscript)时,将调用此回调函数。
tags: []
---
## 描述
初始化(加载完成)过滤脚本(filterscript)时,将调用此回调函数。
## 案例
```c
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("已加载过滤脚本。");
print("--------------------------------------\n");
... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptInit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnFilterScriptInit.md",
"repo_id": "openmultiplayer",
"token_count": 234
} | 484 |
---
title: OnPlayerCommandText
description: 当玩家在客户端聊天框中输入指令时,这个回调函数被调用。
tags: ["player"]
---
## 描述
当玩家在客户端聊天框中输入指令时,这个回调函数被调用。
| 参数名 | 描述 |
| --------- | ------------------------ |
| playerid | 输入指令的玩家的 ID。 |
| cmdtext[] | 输入的指令(包括正斜杠)。 |
## 返回值
它在过滤脚本中总是先被调用,所以返回 1 会阻止其他脚本看到它。
## 案例
`... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerCommandText.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerCommandText.md",
"repo_id": "openmultiplayer",
"token_count": 796
} | 485 |
---
title: OnPlayerLeaveCheckpoint
description: 当玩家离开SetPlayerCheckpoint函数为其设置的检查点时,会调用此回调。
tags: ["player", "checkpoint"]
---
## 描述
当玩家离开 SetPlayerCheckpoint 函数为其设置的检查点时,会调用此回调。
一次只能设置一个检查点。
| 参数名 | 描述 |
| -------- | ----------------------- |
| playerid | 离开检查点的玩家的 ID。 |
## 返回值
它在过滤脚本中总是先被调用... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerLeaveCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerLeaveCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 696
} | 486 |
---
title: OnPlayerWeaponShot
description: 当玩家使用武器射击时,这个回调函数被调用。
tags: ["player"]
---
## 描述
该回调函数在玩家使用武器射击时调用。仅适用于有子弹的武器。仅对乘客提供支持(不对司机提供支持,并且不适用 sea sparrow (水上飞机)/hunter shots (阿帕奇直升机))。
| 参数名 | 描述 |
| -------- | --------------------------... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerWeaponShot.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerWeaponShot.md",
"repo_id": "openmultiplayer",
"token_count": 1998
} | 487 |
---
title: AddMenuItem
description: 向指定菜单中添加菜单项。
tags: ["menu"]
---
## 描述
向指定菜单中添加菜单项。
| 参数名 | 说明 |
| ------- | ----------------------- |
| menuid | 要添加菜单项的菜单 ID。 |
| column | 要添加菜单项到哪列。 |
| title[] | 菜单项的标题。 |
## 返回值
添加后该项的行索引。
## 案例
```c
new Menu:gExampleMenu;
public OnGameMo... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddMenuItem.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddMenuItem.md",
"repo_id": "openmultiplayer",
"token_count": 826
} | 488 |
---
title: AttachCameraToObject
description: 您可以使用此函数将玩家视角附加到物体上。
tags: []
---
## 描述
您可以使用此函数将玩家视角附加到物体上。
| 参数名 | 说明 |
| -------- | --------------------------- |
| playerid | 将视角附加到物体上的玩家 ID |
| objectid | 将视角附加到的物体 ID |
## 返回值
该函数不返回任何特定的值。
## 案例
```c
public OnPlayerCommandText(pl... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AttachCameraToObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AttachCameraToObject.md",
"repo_id": "openmultiplayer",
"token_count": 594
} | 489 |
---
title: GetPlayerCameraZoom
description: 检索指定玩家的游戏视角缩放级别。
tags: ["player", "camera"]
---
## 描述
检索指定玩家的游戏视角缩放级别。
| 参数名 | 说明 |
| -------- | ------------------------------- |
| playerid | 要获取视角缩放级别的玩家的 ID。 |
## 返回值
以浮点数形式返回玩家的视角缩放级别(数码相机, 狙击瞄准镜等等)。
## 案例
```c
new szString[144];
forma... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraZoom.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerCameraZoom.md",
"repo_id": "openmultiplayer",
"token_count": 631
} | 490 |
---
title: floatsin
description: 从特定角度求正弦值。
tags: ["math", "floating-point"]
---
<LowercaseNote />
## 描述
从给定角度求正弦值。输入的角度可以是弧度、角度或分数。
| 参数名 | 说明 |
| ----------- | ------------------------------------------------------------- |
| Float:value | 求正弦的角度。 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatsin.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floatsin.md",
"repo_id": "openmultiplayer",
"token_count": 977
} | 491 |
---
title: Menu Guide
---
A short tutorial that explains how to use the menu system of the game. This menu system is different to SA-MP dialogs and better reflects the traditional UI of the original game.
## Menus in SA-MP
Menus look very complicated and difficult to script for the most players, although it isn't. H... | openmultiplayer/web/docs/tutorials/MenuGuide.md/0 | {
"file_path": "openmultiplayer/web/docs/tutorials/MenuGuide.md",
"repo_id": "openmultiplayer",
"token_count": 2501
} | 492 |
# اوبن ملتي بلاير
هو عباره عن مود ملتي بلاير تحت الانشاء للعبه <em>جراند ثفت أوتو: سان أندرياس</em> و سوف تتوافق مع مود الملتي بلاير الحالي <em>سان اندريس ملتي بلاير</em>
هذا يعني ان <strong>مستخدمين سامب و اصحاب السرفرات و الاسكربتات يمكنهم اللعب علي اوبن ام بي بدون مشاكل</strong> و سوف يتوافر بعض التحسينات و التصحي... | openmultiplayer/web/frontend/content/ar/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ar/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 451
} | 493 |
---
title: Vehicle Sync
date: "2019-11-09T11:33:00"
author: Southclaws
---
A quick post demonstrating the evolution of vehicle sync.
<video autoPlay loop width="100%" controls>
<source src="https://assets.open.mp/assets/images/videos/vehicle_sync_01.mp4" type="video/mp4" />
Sorry, your browser doesn't support emb... | openmultiplayer/web/frontend/content/en/blog/vehicle-sync.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/blog/vehicle-sync.mdx",
"repo_id": "openmultiplayer",
"token_count": 244
} | 494 |
# Open Multiplayer
Egy közelgő módosítás a _Grand Theft Auto: San Andreas_ nevű játékhoz ami teljesen kompatibilis lesz a már jól ismert _San Andreas Multiplayer_ móddal.
<br />
Ez azt jelenti hogy a **már létező SA:MP kliens és minden SA:MP script működni fog az open.mp-vel** és ezen túlmenően sok hiba rögzítésre, ... | openmultiplayer/web/frontend/content/hu/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/hu/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 322
} | 495 |
<h1>Ofte stilte spørsmål</h1>
<hr />
<h2>Hva er open.mp?</h2>
open.mp (Open Multiplayer, OMP) er en erstatning til SA:MP, igangsatt som en respons til den
uønskede mengden problemer med oppdateringer og styring av SA:MP. Den første utgivelsen vil være en
ren erstatning bare til serveren. Eksisterende SA:MP-klienter v... | openmultiplayer/web/frontend/content/no/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/no/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 1690
} | 496 |
# Open Multiplayer
Предстојећи мултиплејер мод за _Grand Theft Auto: San Andreas_ који ће бити скроз компактан са постојећим мултиплејер модом _San Andreas Multiplayer._
<br />
То значи да ће **постојећи SA:MP клијенти и све SA:MP скрипте радити на open.mp** и, као шлаг на торту, многе грешке биће сређене унутар сер... | openmultiplayer/web/frontend/content/sr/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/sr/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 530
} | 497 |
---
title: Timers module
date: "2019-05-22T03:15:00"
author: Y_Less
---
Це короткий огляд одного з вдосконалених нами модулів для таймерів у open.mp:
```pawn
native SetTimer(const func[], msInterval, bool:repeat) = SetTimerEx;
native SetTimerEx(const func[], msInterval, bool:repeat, const params[], GLOBAL_TAG_TYPES:.... | openmultiplayer/web/frontend/content/uk/blog/timers.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/blog/timers.mdx",
"repo_id": "openmultiplayer",
"token_count": 1142
} | 498 |
---
title: 载具同步
date: "2019-11-09T11:33:00"
author: Southclaws
---
这是一篇演示载具同步的演变的快讯。
<video autoPlay loop width="100%" controls>
<source src="https://assets.open.mp/assets/images/videos/vehicle_sync_01.mp4" type="video/mp4" />
抱歉,您的浏览器不支持嵌入式视频。
</video>
<video autoPlay loop width="100%" controls>
<source src="... | openmultiplayer/web/frontend/content/zh-cn/blog/vehicle-sync.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/blog/vehicle-sync.mdx",
"repo_id": "openmultiplayer",
"token_count": 366
} | 499 |
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/static/mstile-70x70.png"/>
<square150x150logo src="/static/mstile-150x150.png"/>
<square310x310logo src="/static/mstile-310x310.png"/>
<wide310x150logo src="/s... | openmultiplayer/web/frontend/public/images/assets/browserconfig.xml/0 | {
"file_path": "openmultiplayer/web/frontend/public/images/assets/browserconfig.xml",
"repo_id": "openmultiplayer",
"token_count": 221
} | 500 |
import Link from "next/link";
import { useRouter } from "next/router";
import { flow, map, sortBy } from "lodash/fp";
import { last } from "lodash";
import { useState } from "react";
export type SidebarCategory = {
type: string;
path: string;
label: string;
items: SidebarItem[];
};
export type SidebarItem = S... | openmultiplayer/web/frontend/src/components/Sidebar.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/Sidebar.tsx",
"repo_id": "openmultiplayer",
"token_count": 1901
} | 501 |
import { useRouter } from "next/router";
import { FC } from "react";
import { apiSWR } from "src/fetcher/fetcher";
import { APIError } from "src/types/_generated_Error";
import { User, UserSchema } from "src/types/_generated_User";
import useSWR from "swr";
import ErrorBanner from "../ErrorBanner";
import Measured from... | openmultiplayer/web/frontend/src/components/member/MemberView.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/member/MemberView.tsx",
"repo_id": "openmultiplayer",
"token_count": 328
} | 502 |
import Admonition from "../../../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>Ovaj callback također može pozvati NPC.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/bs/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/bs/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 84
} | 503 |
import Admonition from "../../../Admonition";
export default function WarningVersion({
version,
name = "函数",
}: {
version: string;
name: string;
}) {
return (
<Admonition type="warning">
<p>
这个{name}是在{version}中添加的,在以前的版本中不起作用!
</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/version-warning.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/zh-cn/version-warning.tsx",
"repo_id": "openmultiplayer",
"token_count": 153
} | 504 |
import { FC } from "react";
import { GetServerSideProps } from "next";
import { apiSSP } from "src/fetcher/fetcher";
import { APIError } from "src/types/_generated_Error";
import ErrorBanner from "src/components/ErrorBanner";
type Props = {
data: { version: string };
error: APIError;
};
const Page: FC<Props> = (... | openmultiplayer/web/frontend/src/pages/about.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/about.tsx",
"repo_id": "openmultiplayer",
"token_count": 272
} | 505 |
import { AddIcon } from "@chakra-ui/icons";
import {
Box,
Button,
Center,
Checkbox,
Flex,
FormControl,
FormHelperText,
FormLabel,
Heading,
Input,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalHeader,
ModalOverlay,
Select,
Text,
useDisclosure,
} from "@chakra-ui/react";
imp... | openmultiplayer/web/frontend/src/pages/servers/index.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/servers/index.tsx",
"repo_id": "openmultiplayer",
"token_count": 3676
} | 506 |
import * as z from "zod"
export const EssentialSchema = z.object({
ip: z.string(),
hn: z.string(),
pc: z.number(),
pm: z.number(),
gm: z.string(),
la: z.string(),
pa: z.boolean(),
vn: z.string(),
omp: z.boolean(),
pr: z.boolean(),
})
export type Essential = z.infer<typeof EssentialSchema>
export c... | openmultiplayer/web/frontend/src/types/_generated_Server.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/types/_generated_Server.ts",
"repo_id": "openmultiplayer",
"token_count": 244
} | 507 |
package ratelimiter
import (
"net/http"
"time"
"github.com/sethvargo/go-limiter/httplimit"
"github.com/sethvargo/go-limiter/memorystore"
)
func WithRateLimit(perinterval uint64, interval time.Duration) func(next http.Handler) http.Handler {
store, err := memorystore.New(&memorystore.Config{
Tokens: perinter... | openmultiplayer/web/internal/web/ratelimiter/ratelimit.go/0 | {
"file_path": "openmultiplayer/web/internal/web/ratelimiter/ratelimit.go",
"repo_id": "openmultiplayer",
"token_count": 225
} | 508 |
/*
Warnings:
- You are about to drop the column `lastActive` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Server" ADD COLUMN "lastActive" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "User" DROP COLUMN "lastActive";
| openmultiplayer/web/prisma/migrations/20231022181746_move_lastactive_field_from_user_to_server/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20231022181746_move_lastactive_field_from_user_to_server/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 91
} | 509 |
FROM node:12.22.3
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update && apt-get install -y google-chrome-stable
| overleaf/web/Dockerfile.frontend/0 | {
"file_path": "overleaf/web/Dockerfile.frontend",
"repo_id": "overleaf",
"token_count": 121
} | 510 |
const _ = require('lodash')
const SessionManager = {
getSessionUser(session) {
const sessionUser = _.get(session, ['user'])
const sessionPassportUser = _.get(session, ['passport', 'user'])
return sessionUser || sessionPassportUser || null
},
setInSessionUser(session, props) {
const sessionUser =... | overleaf/web/app/src/Features/Authentication/SessionManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Authentication/SessionManager.js",
"repo_id": "overleaf",
"token_count": 407
} | 511 |
/* 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/Collaborators/CollaboratorsInviteController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsInviteController.js",
"repo_id": "overleaf",
"token_count": 6295
} | 512 |
const request = require('request').defaults({ timeout: 30 * 100 })
const OError = require('@overleaf/o-error')
const settings = require('@overleaf/settings')
const _ = require('underscore')
const async = require('async')
const logger = require('logger-sharelatex')
const metrics = require('@overleaf/metrics')
const { pr... | overleaf/web/app/src/Features/DocumentUpdater/DocumentUpdaterHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/DocumentUpdater/DocumentUpdaterHandler.js",
"repo_id": "overleaf",
"token_count": 3868
} | 513 |
const _ = require('underscore')
const settings = require('@overleaf/settings')
module.exports = _.template(`\
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" style="Margin: 0; b... | overleaf/web/app/src/Features/Email/Layouts/BaseWithHeaderEmailLayout.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/Layouts/BaseWithHeaderEmailLayout.js",
"repo_id": "overleaf",
"token_count": 6194
} | 514 |
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')
const EXISTING_UI = { newLogsUI: false, subvariant: null }
const NEW_UI_WITH_POPUP = {
newLogsUI: true,
subvariant: 'new-logs-ui-with-popup',
}
const NEW_UI_WITHOUT_POPUP = {
newLogsUI: true,
subvariant: 'new-logs-ui-without... | overleaf/web/app/src/Features/Helpers/NewLogsUI.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/NewLogsUI.js",
"repo_id": "overleaf",
"token_count": 708
} | 515 |
const { BackwardCompatibleError } = require('../Errors/Errors.js')
class UrlFetchFailedError extends BackwardCompatibleError {}
class InvalidUrlError extends BackwardCompatibleError {}
class CompileFailedError extends BackwardCompatibleError {}
class OutputFileFetchFailedError extends BackwardCompatibleError {}
cla... | overleaf/web/app/src/Features/LinkedFiles/LinkedFilesErrors.js/0 | {
"file_path": "overleaf/web/app/src/Features/LinkedFiles/LinkedFilesErrors.js",
"repo_id": "overleaf",
"token_count": 344
} | 516 |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
const _ = require('underscore')
module.exports = {
areSame(lines1, lines2) {
if (!Array.isArray(lines1) || !Array.isArray(lines2)) {
return false
}
return _.isEqual(lines1, lines2)
},
}
| overleaf/web/app/src/Features/Project/DocLinesComparitor.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/DocLinesComparitor.js",
"repo_id": "overleaf",
"token_count": 118
} | 517 |
/* 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
* DS103: Rewrite code... | overleaf/web/app/src/Features/Project/ProjectHistoryHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectHistoryHandler.js",
"repo_id": "overleaf",
"token_count": 2302
} | 518 |
const crypto = require('crypto')
const { db } = require('../../infrastructure/mongodb')
const Errors = require('../Errors/Errors')
const { promisifyAll } = require('../../util/promises')
const ONE_HOUR_IN_S = 60 * 60
const OneTimeTokenHandler = {
getNewToken(use, data, options, callback) {
// options is optiona... | overleaf/web/app/src/Features/Security/OneTimeTokenHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Security/OneTimeTokenHandler.js",
"repo_id": "overleaf",
"token_count": 789
} | 519 |
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const ProjectGetter = require('../Project/ProjectGetter')
const UserGetter = require('../User/UserGetter')
const SubscriptionLocator = require('./SubscriptionLocator')
const Settings = require('@overleaf/settings')
const Collaborato... | overleaf/web/app/src/Features/Subscription/LimitationsManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/LimitationsManager.js",
"repo_id": "overleaf",
"token_count": 3003
} | 520 |
let TeamInvitesHandler
const logger = require('logger-sharelatex')
const crypto = require('crypto')
const async = require('async')
const settings = require('@overleaf/settings')
const { ObjectId } = require('mongodb')
const { Subscription } = require('../../models/Subscription')
const UserGetter = require('../User/U... | overleaf/web/app/src/Features/Subscription/TeamInvitesHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/TeamInvitesHandler.js",
"repo_id": "overleaf",
"token_count": 3178
} | 521 |
const { ObjectId } = require('mongodb')
const _ = require('lodash')
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const metrics = require('@overleaf/metrics')
const path = require('path')
const request = require('request-promise-native')
const settings = require('@overleaf/settings... | overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateSender.js/0 | {
"file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/TpdsUpdateSender.js",
"repo_id": "overleaf",
"token_count": 2485
} | 522 |
const logger = require('logger-sharelatex')
const util = require('util')
const { AffiliationError } = require('../Errors/Errors')
const Features = require('../../infrastructure/Features')
const { User } = require('../../models/User')
const UserDeleter = require('./UserDeleter')
const UserGetter = require('./UserGetter'... | overleaf/web/app/src/Features/User/UserCreator.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserCreator.js",
"repo_id": "overleaf",
"token_count": 1131
} | 523 |
/* 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
* DS207: Consider shorter variations of... | overleaf/web/app/src/Features/UserMembership/UserMembershipController.js/0 | {
"file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipController.js",
"repo_id": "overleaf",
"token_count": 2227
} | 524 |
const { callbackify, promisify } = require('util')
const JWT = require('jsonwebtoken')
const Settings = require('@overleaf/settings')
const jwtSign = promisify(JWT.sign)
async function sign(payload, options = {}) {
const key = Settings.jwt.key
const algorithm = Settings.jwt.algorithm
if (!key || !algorithm) {
... | overleaf/web/app/src/infrastructure/JsonWebToken.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/JsonWebToken.js",
"repo_id": "overleaf",
"token_count": 179
} | 525 |
const Settings = require('@overleaf/settings')
const OError = require('@overleaf/o-error')
const botUserAgents = [
'kube-probe',
'GoogleStackdriverMonitoring',
'GoogleHC',
'Googlebot',
'bingbot',
'facebookexternal',
].map(agent => {
return agent.toLowerCase()
})
// SessionAutostartMiddleware provides a m... | overleaf/web/app/src/infrastructure/SessionAutostartMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/SessionAutostartMiddleware.js",
"repo_id": "overleaf",
"token_count": 1206
} | 526 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const { ObjectId } = Schema
const OauthAccessTokenSchema = new Schema(
{
accessToken: String,
accessTokenExpiresAt: Date,
oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
refreshToken: String,
ref... | overleaf/web/app/src/models/OauthAccessToken.js/0 | {
"file_path": "overleaf/web/app/src/models/OauthAccessToken.js",
"repo_id": "overleaf",
"token_count": 222
} | 527 |
const { promisify, callbackify } = require('util')
const pLimit = require('p-limit')
module.exports = {
promisify,
promisifyAll,
promisifyMultiResult,
callbackify,
callbackifyMultiResult,
expressify,
promiseMapWithLimit,
}
/**
* Promisify all functions in a module.
*
* This is meant to be used only w... | overleaf/web/app/src/util/promises.js/0 | {
"file_path": "overleaf/web/app/src/util/promises.js",
"repo_id": "overleaf",
"token_count": 1321
} | 528 |
extends ../layout
block content
main.content.content-alt#main-content
.container.beta-opt-in-wrapper
.row
.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
.card
.page-header.text-centered
h1
| #{translate("sharelatex_beta_program")}
.beta-opt-in
.container-fluid
... | overleaf/web/app/views/beta_program/opt_in.pug/0 | {
"file_path": "overleaf/web/app/views/beta_program/opt_in.pug",
"repo_id": "overleaf",
"token_count": 1228
} | 529 |
.ui-layout-center(
ng-controller="ReviewPanelController",
ng-class="{\
'rp-unsupported': editor.showRichText,\
'rp-state-current-file': (reviewPanel.subView === SubViews.CUR_FILE),\
'rp-state-current-file-expanded': (reviewPanel.subView === SubViews.CUR_FILE && ui.reviewPanelOpen),\
'rp-state-current-fi... | overleaf/web/app/views/project/editor/editor-no-symbol-palette.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/editor-no-symbol-palette.pug",
"repo_id": "overleaf",
"token_count": 592
} | 530 |
script(type='text/ng-template', id='newFileModalTemplate')
.modal-header
h3 Add Files
.modal-body.modal-new-file(ng-show="file_count < 2000")
table
tr
td.modal-new-file--list
ul.list-unstyled
li(ng-class="type == 'doc' ? 'active' : null")
a(href, ng-click="type = 'doc'")
i.fa.fa-f... | overleaf/web/app/views/project/editor/new-file-modal.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/new-file-modal.pug",
"repo_id": "overleaf",
"token_count": 4354
} | 531 |
extends ../../layout
block vars
- metadata = { viewport: true }
block content
script(type="template", id="overleaf-token-access-data")!= StringHelper.stringifyJsonForScript({ postUrl: postUrl, csrfToken: csrfToken})
div(
ng-controller="TokenAccessPageController",
ng-init="post()"
)
.editor.full-size
di... | overleaf/web/app/views/project/token/access.pug/0 | {
"file_path": "overleaf/web/app/views/project/token/access.pug",
"repo_id": "overleaf",
"token_count": 1382
} | 532 |
if (personalSubscription.recurly)
include ./_personal_subscription_recurly
include ./_personal_subscription_recurly_sync_email
else
include ./_personal_subscription_custom
hr
| overleaf/web/app/views/subscriptions/dashboard/_personal_subscription.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_personal_subscription.pug",
"repo_id": "overleaf",
"token_count": 57
} | 533 |
extends ../layout
block vars
- metadata = { viewport: true }
block content
.content.content-alt
main.login-register-container#main-content
.card.login-register-card
.login-register-header
h1.login-register-header-heading #{translate("log_out")}
form.login-register-form(name="logoutForm", action='/... | overleaf/web/app/views/user/logout.pug/0 | {
"file_path": "overleaf/web/app/views/user/logout.pug",
"repo_id": "overleaf",
"token_count": 306
} | 534 |
#!/bin/bash
set -e
# Branding
mv app/views/external/robots.txt public/robots.txt
mv app/views/external/googlebdb0f8f7f4a17241.html public/googlebdb0f8f7f4a17241.html
| overleaf/web/bin/copy_external_pages/0 | {
"file_path": "overleaf/web/bin/copy_external_pages",
"repo_id": "overleaf",
"token_count": 75
} | 535 |
version: "2.3"
volumes:
data:
services:
test_unit:
build:
context: .
target: base
volumes:
- .:/app
working_dir: /app
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
MOCHA_GREP: ${MOCHA_GREP}
NODE_OPTIONS: "--unhandled-rejections=strict"
command: npm run... | overleaf/web/docker-compose.yml/0 | {
"file_path": "overleaf/web/docker-compose.yml",
"repo_id": "overleaf",
"token_count": 904
} | 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 '../base'
... | overleaf/web/frontend/js/directives/onEnter.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/onEnter.js",
"repo_id": "overleaf",
"token_count": 192
} | 537 |
import PropTypes from 'prop-types'
import { Trans } from 'react-i18next'
import {
Modal,
Alert,
Button,
ControlLabel,
FormControl,
FormGroup,
} from 'react-bootstrap'
import AccessibleModal from '../../../shared/components/accessible-modal'
export default function CloneProjectModalContent({
animation = t... | overleaf/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js/0 | {
"file_path": "overleaf/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js",
"repo_id": "overleaf",
"token_count": 1190
} | 538 |
import App from '../../../base'
import { react2angular } from 'react2angular'
import EditorNavigationToolbarRoot from '../components/editor-navigation-toolbar-root'
import { rootContext } from '../../../shared/context/root-context'
App.controller('EditorNavigationToolbarController', function ($scope, ide) {
// wrapp... | overleaf/web/frontend/js/features/editor-navigation-toolbar/controllers/editor-navigation-toolbar-controller.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/controllers/editor-navigation-toolbar-controller.js",
"repo_id": "overleaf",
"token_count": 332
} | 539 |
import { Button } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
function FileTreeError() {
const { t } = useTranslation()
function reload() {
location.reload()
}
return (
<div className="file-tree-error">
<p>{t('generic_something_went_wrong')}</p>
<p>{t('please_ref... | overleaf/web/frontend/js/features/file-tree/components/file-tree-error.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-error.js",
"repo_id": "overleaf",
"token_count": 190
} | 540 |
import { useRef, useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import { DndProvider, createDndContext, useDrag, useDrop } from 'react-dnd'
import { HTML5Backend, getEmptyImage } from 'react-dnd-html5-backend'
import {
findAllInTreeOrThrow,
fin... | overleaf/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js",
"repo_id": "overleaf",
"token_count": 1868
} | 541 |
// This file is shared between the frontend and server code of web, so that
// filename validation is the same in both implementations.
// The logic in all copies must be kept in sync:
// app/src/Features/Project/SafePath.js
// frontend/js/ide/directives/SafePath.js
// frontend/js/features/file-tree/util/safe-pat... | overleaf/web/frontend/js/features/file-tree/util/safe-path.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/safe-path.js",
"repo_id": "overleaf",
"token_count": 976
} | 542 |
import PropTypes from 'prop-types'
import { Dropdown, OverlayTrigger, Tooltip } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import PreviewDownloadFileList from './preview-download-file-list'
import Icon from '../../../shared/components/icon'
import ControlledDropdown from '../../../shared/comp... | overleaf/web/frontend/js/features/preview/components/preview-download-button.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-download-button.js",
"repo_id": "overleaf",
"token_count": 897
} | 543 |
import PropTypes from 'prop-types'
import { Trans } from 'react-i18next'
export default function MemberPrivileges({ privileges }) {
switch (privileges) {
case 'readAndWrite':
return <Trans i18nKey="can_edit" />
case 'readOnly':
return <Trans i18nKey="read_only" />
default:
return null... | overleaf/web/frontend/js/features/share-project-modal/components/member-privileges.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/member-privileges.js",
"repo_id": "overleaf",
"token_count": 145
} | 544 |
import { Tabs } from '@reach/tabs'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import PropTypes from 'prop-types'
import { matchSorter } from 'match-sorter'
import symbols from '../data/symbols.json'
import { buildCategorisedSymbols, createCa... | overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js",
"repo_id": "overleaf",
"token_count": 1401
} | 545 |
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'
const LANG = window.i18n.currentLangCode
// Since we are rendering React from Angular, the initialisation is
// synchronous on page load (but hidden behind the loading screen). This
// means that translations must be initialised without any a... | overleaf/web/frontend/js/i18n.js/0 | {
"file_path": "overleaf/web/frontend/js/i18n.js",
"repo_id": "overleaf",
"token_count": 497
} | 546 |
/* 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/directives/SafePath.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/directives/SafePath.js",
"repo_id": "overleaf",
"token_count": 901
} | 547 |
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
const envs = [
'abstract',
'align',
'align*',
'equation',
'equation*',
'gather',
'gather*',
'multline',
'multline*',
'split',
'verbatim',
'quote',
'center',
]
const envsWithSnippets = [
'array',... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/Environments.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/Environments.js",
"repo_id": "overleaf",
"token_count": 213
} | 548 |
import App from '../../../base'
export default App.controller(
'FileTreeFolderController',
function ($scope, ide, $modal, localStorage) {
$scope.expanded =
localStorage(`folder.${$scope.entity.id}.expanded`) || false
$scope.toggleExpanded = function () {
$scope.expanded = !$scope.expanded
... | overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js",
"repo_id": "overleaf",
"token_count": 239
} | 549 |
import _ from 'lodash'
/* eslint-disable
camelcase,
max-len,
no-return-assign,
*/
// 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 ... | overleaf/web/frontend/js/ide/history/controllers/HistoryListController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/controllers/HistoryListController.js",
"repo_id": "overleaf",
"token_count": 2550
} | 550 |
import _ from 'lodash'
/* eslint-disable
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
* DS205: Consider reworking code to avoid use of IIFEs... | overleaf/web/frontend/js/ide/metadata/services/metadata.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/metadata/services/metadata.js",
"repo_id": "overleaf",
"token_count": 1353
} | 551 |
import { captureException } from '../../../infrastructure/error-reporter'
const OError = require('@overleaf/o-error')
let pendingWorkerSetup = Promise.resolve()
function supportsServiceWorker() {
return 'serviceWorker' in navigator
}
export function waitForServiceWorker() {
return pendingWorkerSetup
}
export fu... | overleaf/web/frontend/js/ide/pdfng/directives/serviceWorkerManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdfng/directives/serviceWorkerManager.js",
"repo_id": "overleaf",
"token_count": 760
} | 552 |
/* 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/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js",
"repo_id": "overleaf",
"token_count": 400
} | 553 |
/**
* localStorage can throw browser exceptions, for example if it is full We don't
* use localStorage for anything critical, so in that case just fail gracefully.
*/
/**
* Catch, log and otherwise ignore errors.
*
* @param {function} fn localStorage function to call
* @param {string?} key Key passed to the loc... | overleaf/web/frontend/js/infrastructure/local-storage.js/0 | {
"file_path": "overleaf/web/frontend/js/infrastructure/local-storage.js",
"repo_id": "overleaf",
"token_count": 352
} | 554 |
/* 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/main/clear-sessions.js/0 | {
"file_path": "overleaf/web/frontend/js/main/clear-sessions.js",
"repo_id": "overleaf",
"token_count": 426
} | 555 |
import App from '../../base'
import ColorManager from '../../ide/colors/ColorManager'
App.controller('TagListController', function ($scope, $modal) {
$scope.filterProjects = function (filter = 'all') {
$scope._clearTags()
$scope.setFilter(filter)
}
$scope._clearTags = () =>
$scope.tags.forEach(tag =>... | overleaf/web/frontend/js/main/project-list/tag-controllers.js/0 | {
"file_path": "overleaf/web/frontend/js/main/project-list/tag-controllers.js",
"repo_id": "overleaf",
"token_count": 2549
} | 556 |
/* 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
* DS207: Consider shorter variations of... | overleaf/web/frontend/js/services/queued-http.js/0 | {
"file_path": "overleaf/web/frontend/js/services/queued-http.js",
"repo_id": "overleaf",
"token_count": 788
} | 557 |
import { createContext, useContext } from 'react'
import PropTypes from 'prop-types'
const IdeContext = createContext()
IdeContext.Provider.propTypes = {
value: PropTypes.shape({
$scope: PropTypes.object.isRequired,
}),
}
export function useIdeContext() {
const context = useContext(IdeContext)
if (!cont... | overleaf/web/frontend/js/shared/context/ide-context.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/context/ide-context.js",
"repo_id": "overleaf",
"token_count": 216
} | 558 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of ... | overleaf/web/frontend/js/utils/EventEmitter.js/0 | {
"file_path": "overleaf/web/frontend/js/utils/EventEmitter.js",
"repo_id": "overleaf",
"token_count": 858
} | 559 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.