text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
---
title: SetSpawnInfo
description: This function can be used to change the spawn information of a specific player.
tags: []
---
## คำอธิบาย
This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position,... | openmultiplayer/web/docs/translations/th/scripting/functions/SetSpawnInfo.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetSpawnInfo.md",
"repo_id": "openmultiplayer",
"token_count": 1053
} | 451 |
---
title: SetWeather
description: Set the world weather for all players.
tags: []
---
## คำอธิบาย
Set the world weather for all players.
| Name | Description |
| --------- | ------------------- |
| weatherid | The weather to set. |
## ส่งคืน
This function does not return any specific values.
## ตัวอ... | openmultiplayer/web/docs/translations/th/scripting/functions/SetWeather.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/SetWeather.md",
"repo_id": "openmultiplayer",
"token_count": 333
} | 452 |
---
title: TextDrawBoxColor
description: Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1).
tags: ["textdraw"]
---
## คำอธิบาย
Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 'true').
| Name | Description ... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawBoxColor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawBoxColor.md",
"repo_id": "openmultiplayer",
"token_count": 1232
} | 453 |
---
title: TextDrawShowForAll
description: Shows a textdraw for all players.
tags: ["textdraw"]
---
## คำอธิบาย
Shows a textdraw for all players.
| Name | Description |
| ---- | ----------------------------------------------------------- |
| text | The ID of the textdr... | openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawShowForAll.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/TextDrawShowForAll.md",
"repo_id": "openmultiplayer",
"token_count": 395
} | 454 |
---
title: atan
description: Get the inversed value of a tangent in degrees.
tags: ["math"]
---
<LowercaseNote />
## คำอธิบาย
Get the inversed value of a tangent in degrees. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, the function cannot determine wi... | openmultiplayer/web/docs/translations/th/scripting/functions/atan.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/atan.md",
"repo_id": "openmultiplayer",
"token_count": 534
} | 455 |
---
title: db_next_row
description: Moves to the next row of the result allocated from db_query.
tags: ["sqlite"]
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Moves to the next row of the result allocated from db_query.
| Name | Description |
| --------------... | openmultiplayer/web/docs/translations/th/scripting/functions/db_next_row.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/db_next_row.md",
"repo_id": "openmultiplayer",
"token_count": 1123
} | 456 |
---
title: floatcmp
description: floatcmp can be used to compare float values to each other, to validate the comparison.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
floatcmp can be used to compare float values to each other, to validate the comparison.
| Name | Description... | openmultiplayer/web/docs/translations/th/scripting/functions/floatcmp.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/floatcmp.md",
"repo_id": "openmultiplayer",
"token_count": 346
} | 457 |
---
title: fputchar
description: Write one character to a file.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Write one character to a file.
| Name | Description |
| ------ | ------------------------------------------------------... | openmultiplayer/web/docs/translations/th/scripting/functions/fputchar.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/fputchar.md",
"repo_id": "openmultiplayer",
"token_count": 773
} | 458 |
---
title: strpack
description: Pack a string.
tags: []
---
:::warning
This function starts with lowercase letter.
:::
## คำอธิบาย
Pack a string. Packed strings use 75% less memory.
| Name | Description |
| ----------------------- | ... | openmultiplayer/web/docs/translations/th/scripting/functions/strpack.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/functions/strpack.md",
"repo_id": "openmultiplayer",
"token_count": 582
} | 459 |
---
title: Angle Modes
description: SI unit constants for measuring angles.
---
:::note
To be used with [floatsin](../functions/Floatsin), [floatcos](../functions/Floatcos), or [floattan](../functions/Floattan).
:::
| Modes |
| ------- |
| radian |
| degrees |
| grades |
| openmultiplayer/web/docs/translations/th/scripting/resources/anglemodes.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/anglemodes.md",
"repo_id": "openmultiplayer",
"token_count": 98
} | 460 |
---
title: Object Edition Response Types
---
Used in [OnPlayerEditObject](../callbacks/OnPlayerEditObject.md) and [OnPlayerEditAttachedObject](../callbacks/OnPlayerEditAttachedObject.md).
```c
0 - EDIT_RESPONSE_CANCEL // player cancelled (ESC)
1 - EDIT_RESPONSE_FINAL // player clicked on save
2 - EDIT_RESPONSE_UP... | openmultiplayer/web/docs/translations/th/scripting/resources/objecteditionresponsetypes.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/objecteditionresponsetypes.md",
"repo_id": "openmultiplayer",
"token_count": 129
} | 461 |
---
title: Textdraws
description: As the name implies, a textdraw is text that is drawn on a player's screen.
sidebar_label: Textdraws
---
## What is a Textdraw?
As the name implies, a textdraw is text that is drawn on a player's screen. Unlike [client messages](../../scripting/functions/SendClientMessage.md) or [gam... | openmultiplayer/web/docs/translations/th/scripting/resources/textdraws.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/scripting/resources/textdraws.md",
"repo_id": "openmultiplayer",
"token_count": 3381
} | 462 |
---
title: Cooldowns
description: A tutorial for writing cooldowns for limiting user actions using tick counts and avoiding the use of timers.
---
This tutorial covers writing a commonly used gameplay mechanic in action games: cooldowns. A cooldown is a tool to limit the frequency at which a player can do something. T... | openmultiplayer/web/docs/translations/th/tutorials/cooldowns.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/th/tutorials/cooldowns.md",
"repo_id": "openmultiplayer",
"token_count": 2572
} | 463 |
---
title: OnFilterScriptExit
description: Bir filterscript unload edildiğinde tetiklenir.
tags: []
---
## Açıklama
Bu callback bir filterscript unload edildiğinde tetiklenir. Sadece unload edilen filterscript içinde çalışır.
## Örnekler
```c
public OnFilterScriptExit()
{
print("\n------------------------------... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnFilterScriptExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnFilterScriptExit.md",
"repo_id": "openmultiplayer",
"token_count": 167
} | 464 |
---
title: OnPlayerEnterCheckpoint
description: Bu callback, bir oyuncu kendisi için oluşturulan checkpointe giriş yaptığında çağırılıyor.
tags: ["player", "checkpoint"]
---
## Açıklama
Bu callback, bir oyuncu kendisi için oluşturulan checkpointe giriş yaptığında çağırılıyor.
| İsim | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEnterCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerEnterCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 623
} | 465 |
---
title: OnPlayerRequestSpawn
description: Fonksiyon, Bir oyuncu SHIFT'e basarak veya 'Spawn' düğmesine tıklayarak sınıf seçimi yoluyla doğmaya çalıştığında çağrılır.
tags: ["player"]
---
## Açıklama
Fonksiyon, Bir oyuncu SHIFT'e basarak veya 'Spawn' düğmesine tıklayarak sınıf seçimi yoluyla doğmaya çalıştığında ça... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnPlayerRequestSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 558
} | 466 |
---
title: OnVehicleDeath
description: Bu fonksiyon, bir araç imha edildiğinde çağrılır. - patladığında veya araç suya girdiğinde.
tags: ["vehicle"]
---
## Açıklama
Bu fonksiyon, bir araç imha edildiğinde çağrılır. - patladığında veya araç suya girdiğinde.
| Parametre | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleDeath.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/callbacks/OnVehicleDeath.md",
"repo_id": "openmultiplayer",
"token_count": 949
} | 467 |
---
title: AddStaticVehicle
description: Oyun moduna bir "statik" araç ekler (modeller oyuncular için önceden yüklenir).
tags: ["vehicle"]
---
## Description
Oyun moduna bir "statik" araç ekler (modeller oyuncular için önceden yüklenir).
| İsim | Açıklama ... | openmultiplayer/web/docs/translations/tr/scripting/functions/AddStaticVehicle.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/AddStaticVehicle.md",
"repo_id": "openmultiplayer",
"token_count": 906
} | 468 |
---
title: Ban
description: Sunucuda olan birini yasaklama.
tags: ["administration"]
---
## Açıklama
Sunucuda aktif olan birisini yasaklayın. Yasaklanan kişi bir daha sunucuya giremez. Yasaklanan kişi IP tabanlı yasaklanır ve sunucu dizininde bulunan samp.ban dosyasına yasaklama kaydı oluşturulur. Özel bir neden göst... | openmultiplayer/web/docs/translations/tr/scripting/functions/Ban.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/Ban.md",
"repo_id": "openmultiplayer",
"token_count": 998
} | 469 |
---
title: DestroyActor
description: CreateActor ile oluşturulan aktörü silin.
tags: []
---
<VersionWarnTR version='SA-MP 0.3.7' />
## Açıklama
CreateActor ile oluşturulan aktörü silin.
| Parametre | Açıklama |
| ------- | -------------------------------------------... | openmultiplayer/web/docs/translations/tr/scripting/functions/DestroyActor.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/functions/DestroyActor.md",
"repo_id": "openmultiplayer",
"token_count": 406
} | 470 |
---
title: "Anahtar Kelimeler: İfadeler"
---
## `assert`
Eğer ifade mantıksal olarak yanlış değerlendirilirse, çalışmayı durdurur ve bir çalışma zamanı hatası oluşturur. Sadece main() bloğunda çalıştığı görünüyor. Assert ifadesi, mantıksal (programcının) bir hatayı, asla çalışma zamanı (kullanıcının) hatasını göster... | openmultiplayer/web/docs/translations/tr/scripting/language/Statements.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/scripting/language/Statements.md",
"repo_id": "openmultiplayer",
"token_count": 7185
} | 471 |
---
title: Tutorials
description: A collection of tutorials to help you write gamemodes and manage your server.
---
In this section, you'll find a collection of tutorials to help you write gamemodes and manage your server. They are in no particular order.
| openmultiplayer/web/docs/translations/tr/tutorials/_.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/tr/tutorials/_.md",
"repo_id": "openmultiplayer",
"token_count": 60
} | 472 |
---
title: OnGameModeExit
description: 当退出游戏模式时,即通过'gmx',关闭服务器,或者GameModeExit函数,该回调函数被调用。
tags: []
---
## 描述
当退出游戏模式时,即通过'gmx',关闭服务器,或者 GameModeExit 函数,调用这个回调函数。
## 案例
```c
public OnGameModeExit()
{
print("游戏模式 已退出。");
return 1;
}
```
## 要点
:::tip
因为更改游戏模式不会重新加载过滤脚本(filterscript),所以该函数也可以在过滤脚本中使用,用于检测是否使... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnGameModeExit.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnGameModeExit.md",
"repo_id": "openmultiplayer",
"token_count": 712
} | 473 |
---
title: OnPlayerConnect
description: 当玩家连接到服务器时,这个回调函数被调用。
tags: ["player"]
---
## 描述
当玩家连接到服务器时,这个回调函数被调用。
| 参数名 | 描述 |
| -------- | --------------------------- |
| playerid | 连接到服务器的该玩家的 ID。 |
## 返回值
0 - 将阻止其他过滤脚本接收到这个回调。
1 - 表示这个回调函数将被传递给下一个过滤脚本。
它在过滤脚本中总是先被调用。
## 案例
```c
public ... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerConnect.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerConnect.md",
"repo_id": "openmultiplayer",
"token_count": 523
} | 474 |
---
title: OnPlayerLeaveRaceCheckpoint
description: 当玩家离开比赛检查点时,会调用此回调。
tags: ["player", "checkpoint", "racecheckpoint"]
---
## 描述
当玩家离开比赛检查点时,会调用此回调。
| 参数名 | 描述 |
| -------- | --------------------------- |
| playerid | 离开比赛检查点的玩家的 ID。 |
## 返回值
它在过滤脚本中总是先被调用。
## 案例
```c
public OnPlayerLe... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerLeaveRaceCheckpoint.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnPlayerLeaveRaceCheckpoint.md",
"repo_id": "openmultiplayer",
"token_count": 665
} | 475 |
---
title: OnRconCommand
description: 当通过服务器控制台、远程RCON或通过游戏内“/RCON 指令”发送指令时,调用该回调。
tags: []
---
## 描述
当通过服务器控制台、远程 RCON 或通过游戏内“/RCON 指令”发送指令时,调用该回调。
| 参数名 | 描述 |
| ------ | ------------------------------------------------ |
| cmd[] | 一个字符串,其中包含输入的指令和传递的任何参数。 |
## 返回值
它在... | openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnRconCommand.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/callbacks/OnRconCommand.md",
"repo_id": "openmultiplayer",
"token_count": 1182
} | 476 |
---
title: AddPlayerClass
description: 向玩家类选择器添加一个类。
tags: ["player"]
---
## 描述
向玩家类选择器添加一个类。类的作用是为了让玩家选择皮肤并重生。
| 参数名 | 说明 |
| ------------- | ----------------------------- |
| modelid | 玩家将用来重生的皮肤模型 id。 |
| Float:spawn_x | 该类的重生点的 X 坐标。 |
| Float:spawn_y | 该类的重生点的 Y 坐标。 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddPlayerClass.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AddPlayerClass.md",
"repo_id": "openmultiplayer",
"token_count": 1039
} | 477 |
---
title: AttachCameraToPlayerObject
description: 将玩家的视角附加在玩家物体上。
tags: ["player", "camera"]
---
## 描述
将玩家的视角附加在玩家物体上。当视角附加在物体上时,玩家可以移动视角。可与 MovePlayerObject 和 AttachPlayerObjectToVehicle 一起使用。
| 参数名 | 说明 |
| -------------- | ------------------------------------- |
| playeri... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AttachCameraToPlayerObject.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/AttachCameraToPlayerObject.md",
"repo_id": "openmultiplayer",
"token_count": 794
} | 478 |
---
title: GetPlayerInterior
description: 检索玩家当前的内部空间。
tags: ["player"]
---
## 描述
检索玩家当前的内部空间。目前已知的内部空间及其位置可以在[这里](../resources/interiorids)找到。
| 参数名 | 说明 |
| -------- | ----------------- |
| playerid | 要获取的玩家 ID。 |
## 返回值
玩家当前所处的内部空间 ID。
## 案例
```c
public OnPlayerCommandText(playerid,text[])
{
... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerInterior.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/GetPlayerInterior.md",
"repo_id": "openmultiplayer",
"token_count": 529
} | 479 |
---
title: floattan
description: 从特定角度求正切值。
tags: ["math", "floating-point"]
---
<LowercaseNote />
## 描述
从特定角度求正切值。输入的角度可以是弧度、角度或分数。
| 参数名 | 说明 |
| ----------- | ------------------------------------------------------------- |
| Float:value | 求正切的角度。 ... | openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floattan.md/0 | {
"file_path": "openmultiplayer/web/docs/translations/zh-cn/scripting/functions/floattan.md",
"repo_id": "openmultiplayer",
"token_count": 718
} | 480 |
---
title: Pickup Guide
---
A short tutorial that describes how to use pickups.
## Define the pickupid
The first thing to be done when creating pickups is creating a place to store their ID. This will be done in a global variable so it can be set when you create the pickup and read when you pick up a pickup, calling... | openmultiplayer/web/docs/tutorials/PickupGuide.md/0 | {
"file_path": "openmultiplayer/web/docs/tutorials/PickupGuide.md",
"repo_id": "openmultiplayer",
"token_count": 1543
} | 481 |
# সচরাচর জিজ্ঞাস্য
<hr />
## open.mp কি?
open.mp (Open Multiplayer, OMP)সান অ্যান্ড্রিয়াসের জন্য বিকল্প মাল্টিপ্লেয়ার মোড SA:MP, আপডেট এবং পরিচালনার সমস্যাগুলির ক্ষেত্রে দুর্ভাগ্যজনক বৃদ্ধির প্রতিক্রিয়া হিসাবে শুরু করা হয়েছে:Open.mp। প্রাথমিক প্রকাশটি কেবল সার্ভারের জন্য একটি ড্রপ-ইন প্রতিস্থাপন হবে। বিদ্যমান ... | openmultiplayer/web/frontend/content/bn/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/bn/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 11090
} | 482 |
# Open Multiplayer
Eine kommende Mehrspieler-Modifikation für _Grand Theft Auto: San Andreas_, die vollständig mit der bereits existierenden Modifikation _San Andreas Multiplayer_ rückwärtskompatibel ist.
<br />
Somit **funktionieren sowohl der originale SA:MP Client, als auch die existierenden SA:MP Skripte mit ope... | openmultiplayer/web/frontend/content/de/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/de/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 251
} | 483 |
# FAQ
<hr />
## What is open.mp?
open.mp (Open Multiplayer, OMP) is a substitute multiplayer mod for San Andreas, initiated in response to the unfortunate increase in problems with updates and management of SA:MP. The initial release is a drop-in replacement for the server only. Existing SA:MP clients are able to co... | openmultiplayer/web/frontend/content/en/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/en/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 1095
} | 484 |
# Open Multiplayer
En kommende flerspiller-klient for _Grand Theft Auto: San Andreas_ som vil være fullt bakoverkompatibel med den eksisterende _San Andreas Multiplayer._
<br />
Med dette menes det at **nåværende SA:MP klienter og alt av eksisterende kode og scripts vil fungere på open.mp** og, i tillegg så vil mang... | openmultiplayer/web/frontend/content/no/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/no/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 250
} | 485 |
---
title: Форум и википедија угашени
description: Питате се зашто су SA-MP сајт и википедија угашени? За више информација и шта да предузмете, прочитајте ово.
---
# Зашто су википедија и форум угашени?
25. септембра 2020. цертификати и за forum.sa-mp.com и за wiki.sa-mp.com су истекли. Многи су ово приметили ово и п... | openmultiplayer/web/frontend/content/sr/missing-sites.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/sr/missing-sites.mdx",
"repo_id": "openmultiplayer",
"token_count": 1763
} | 486 |
---
title: Turfs (formerly gangzones) module
date: "2019-10-19T04:20:00"
author: J0sh
---
Привіт! Я щойно закінчив нашу реалізацію Turf на сервері, і я подумав опублікувати огляд цього модуля і показати, що ми не вийшли або щось подібне!
```pawn
// Creates a Turf. A playerid can be passed in order to make it a player... | openmultiplayer/web/frontend/content/uk/blog/turfs-formerly-gangzones-module.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/uk/blog/turfs-formerly-gangzones-module.mdx",
"repo_id": "openmultiplayer",
"token_count": 1030
} | 487 |
<h1>常见问题解答</h1>
<hr />
<h2>open.mp是什么?</h2>
open.mp (Open Multiplayer,OMP,开放多人游戏)是一个圣安地列斯的联机模组,目的是为了取代在开发上问题不断累积,以及几乎停止更新的 SA:MP。最初发布的版本只是用于临时替代 SA:MP 服务端。因此现有的 SA:MP 客户端依然能够连接到 OMP 服务器。在未来,新的 OMP 客户端也将发布,届时会有更多有趣的更新。
<hr />
<h2>这是一个派生分支吗?</h2>
不是的,这是我们利用长年累积的经验对其进行彻底的重写。我们曾尝试使用派生的 SA:MP,但我们认为主要存在两个问题:
<ol>
<li>... | openmultiplayer/web/frontend/content/zh-cn/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/zh-cn/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 3986
} | 488 |
import { Button } from "@chakra-ui/button";
import { ArrowBackIcon } from "@chakra-ui/icons";
import { Link } from "@chakra-ui/layout";
import NextLink from "next/link";
import { FC } from "react";
type Props = {
to: string;
};
const BackLink: FC<Props> = ({ to }) => {
return (
<NextLink href={to}>
<Lin... | openmultiplayer/web/frontend/src/components/forum/BackLink.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/forum/BackLink.tsx",
"repo_id": "openmultiplayer",
"token_count": 205
} | 489 |
import { Box } from "@chakra-ui/react";
import Image from "next/image";
import { FC } from "react";
import { API_ADDRESS } from "src/config";
const imageUrl = (id: string) => `${API_ADDRESS}/users/image/${id}`;
type Props = {
id: string;
size?: string;
};
const ProfilePicture: FC<Props> = ({ id, size = "1.5em" }... | openmultiplayer/web/frontend/src/components/member/ProfilePicture.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/member/ProfilePicture.tsx",
"repo_id": "openmultiplayer",
"token_count": 270
} | 490 |
import Admonition from "../../../Admonition";
export default function WarningVersion({
version,
name = "function",
}: {
version: string;
name: string;
}) {
return (
<Admonition type="warning">
<p>
Ovo {name} je dodano u {version} i neće raditi u ranijim
verzijama!
</p>
</A... | openmultiplayer/web/frontend/src/components/templates/translations/bs/version-warning.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/bs/version-warning.tsx",
"repo_id": "openmultiplayer",
"token_count": 142
} | 491 |
import Admonition from "../Admonition";
export default function WarningVersion({
version,
name = "function",
}: {
version: string;
name: string;
}) {
return (
<Admonition type="warning">
<p>
This {name} was added in {version} and will not work in earlier
versions!
</p>
</A... | openmultiplayer/web/frontend/src/components/templates/version-warning.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/version-warning.tsx",
"repo_id": "openmultiplayer",
"token_count": 131
} | 492 |
import React from "react";
import { GetServerSidePropsContext, GetServerSidePropsResult } from "next";
const Page = () => (
<section className="center measure-wide">
<h1>{`>:(`}</h1>
</section>
);
export const getServerSideProps = async (
_: GetServerSidePropsContext
): Promise<GetServerSidePropsResult<unkn... | openmultiplayer/web/frontend/src/pages/angry.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/angry.tsx",
"repo_id": "openmultiplayer",
"token_count": 128
} | 493 |
import { Button } from "@chakra-ui/button";
import { Box, Flex, Stack, Text } from "@chakra-ui/layout";
import React, { FC, ReactElement, useCallback, useState } from "react";
import { CardList } from "src/components/generic/CardList";
import Measured from "src/components/generic/Measured";
const initial = [
Math.ra... | openmultiplayer/web/frontend/src/pages/test.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/test.tsx",
"repo_id": "openmultiplayer",
"token_count": 795
} | 494 |
import * as z from "zod"
export const UserSchema = z.object({
id: z.string(),
email: z.string(),
authMethod: z.string(),
name: z.string(),
bio: z.string().nullable(),
admin: z.boolean(),
threadCount: z.number(),
postCount: z.number(),
createdAt: z.string(),
updatedAt: z.string(),
deletedAt: z.str... | openmultiplayer/web/frontend/src/types/_generated_User.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/types/_generated_User.ts",
"repo_id": "openmultiplayer",
"token_count": 163
} | 495 |
package bs
import (
"context"
"go.uber.org/fx"
)
func New(lc fx.Lifecycle) (*PrismaClient, error) {
prisma := NewClient()
lc.Append(fx.Hook{
OnStart: func(context.Context) error {
return prisma.Connect()
},
OnStop: func(context.Context) error {
return prisma.Disconnect()
},
})
return prisma, ni... | openmultiplayer/web/internal/bs/bs.go/0 | {
"file_path": "openmultiplayer/web/internal/bs/bs.go",
"repo_id": "openmultiplayer",
"token_count": 136
} | 496 |
package web
import (
"context"
"errors"
"net/http"
"go.uber.org/zap"
)
// Error represents the object returned from the API for any form of problem
// encountered during a request.
//
// Errors contain technical information as well as optional human-readable
// error messages and suggestions for solutions.
type ... | openmultiplayer/web/internal/web/web.go/0 | {
"file_path": "openmultiplayer/web/internal/web/web.go",
"repo_id": "openmultiplayer",
"token_count": 843
} | 497 |
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "cockroachdb" | openmultiplayer/web/prisma/migrations/migration_lock.toml/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/migration_lock.toml",
"repo_id": "openmultiplayer",
"token_count": 36
} | 498 |
ARG PROJECT_NAME
ARG BRANCH_NAME
ARG BUILD_NUMBER
FROM ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
USER root
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.lis... | overleaf/web/Dockerfile.frontend.ci/0 | {
"file_path": "overleaf/web/Dockerfile.frontend.ci",
"repo_id": "overleaf",
"token_count": 158
} | 499 |
const CollaboratorsGetter = require('../Collaborators/CollaboratorsGetter')
const CollaboratorsHandler = require('../Collaborators/CollaboratorsHandler')
const ProjectGetter = require('../Project/ProjectGetter')
const { User } = require('../../models/User')
const PrivilegeLevels = require('./PrivilegeLevels')
const Tok... | overleaf/web/app/src/Features/Authorization/AuthorizationManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Authorization/AuthorizationManager.js",
"repo_id": "overleaf",
"token_count": 3900
} | 500 |
/* eslint-disable
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 shorter variations... | overleaf/web/app/src/Features/Collaborators/CollaboratorsInviteHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Collaborators/CollaboratorsInviteHandler.js",
"repo_id": "overleaf",
"token_count": 4836
} | 501 |
/* 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
* DS103: Rewrite code to no longer use __... | overleaf/web/app/src/Features/Documents/DocumentController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Documents/DocumentController.js",
"repo_id": "overleaf",
"token_count": 2021
} | 502 |
const XRegExp = require('xregexp')
// A note about SAFE_REGEX:
// We have to escape the escape characters because XRegExp compiles it first.
// So it's equivalent to `^[\p{L}\p{N}\s\-_!&\(\)]+$]
// \p{L} = any letter in any language
// \p{N} = any kind of numeric character
// https://www.regular-expressions.info/unico... | overleaf/web/app/src/Features/Email/SpamSafe.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/SpamSafe.js",
"repo_id": "overleaf",
"token_count": 575
} | 503 |
const pug = require('pug-runtime')
const SPLIT_REGEX = /<(\d+)>(.*?)<\/\1>/g
function render(locale, components) {
const output = []
function addPlainText(text) {
if (!text) return
output.push(pug.escape(text))
}
// 'PRE<0>INNER</0>POST' -> ['PRE', '0', 'INNER', 'POST']
// '<0>INNER</0>' ... | overleaf/web/app/src/Features/Helpers/SafeHTMLSubstitution.js/0 | {
"file_path": "overleaf/web/app/src/Features/Helpers/SafeHTMLSubstitution.js",
"repo_id": "overleaf",
"token_count": 625
} | 504 |
/* eslint-disable
camelcase,
node/handle-callback-err,
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider sho... | overleaf/web/app/src/Features/LinkedFiles/LinkedFilesHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/LinkedFiles/LinkedFilesHandler.js",
"repo_id": "overleaf",
"token_count": 1846
} | 505 |
const Path = require('path')
const OError = require('@overleaf/o-error')
const { ObjectId } = require('mongodb')
module.exports = { buildFolderStructure }
function buildFolderStructure(docEntries, fileEntries) {
const builder = new FolderStructureBuilder()
for (const docEntry of docEntries) {
builder.addDocEn... | overleaf/web/app/src/Features/Project/FolderStructureBuilder.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/FolderStructureBuilder.js",
"repo_id": "overleaf",
"token_count": 720
} | 506 |
const _ = require('underscore')
const logger = require('logger-sharelatex')
const async = require('async')
const ProjectGetter = require('./ProjectGetter')
const Errors = require('../Errors/Errors')
const { promisifyMultiResult } = require('../../util/promises')
function findElement(options, _callback) {
// The sear... | overleaf/web/app/src/Features/Project/ProjectLocator.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectLocator.js",
"repo_id": "overleaf",
"token_count": 3273
} | 507 |
const RateLimiter = require('../../infrastructure/RateLimiter')
const logger = require('logger-sharelatex')
const SessionManager = require('../Authentication/SessionManager')
const LoginRateLimiter = require('./LoginRateLimiter')
const settings = require('@overleaf/settings')
/*
Do not allow more than opts.maxReques... | overleaf/web/app/src/Features/Security/RateLimiterMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/Features/Security/RateLimiterMiddleware.js",
"repo_id": "overleaf",
"token_count": 927
} | 508 |
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
function ensurePlansAreSetupCorrectly() {
Settings.plans.forEach(plan => {
if (typeof plan.price !== 'number') {
logger.fatal({ plan }, 'missing price on plan')
process.exit(1)
}
})
}
function findLocalP... | overleaf/web/app/src/Features/Subscription/PlansLocator.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/PlansLocator.js",
"repo_id": "overleaf",
"token_count": 199
} | 509 |
const { User } = require('../../models/User')
module.exports = {
updateFeatures(userId, features, callback) {
const conditions = { _id: userId }
const update = {
featuresUpdatedAt: new Date(),
}
for (const key in features) {
const value = features[key]
update[`features.${key}`] = va... | overleaf/web/app/src/Features/Subscription/UserFeaturesUpdater.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/UserFeaturesUpdater.js",
"repo_id": "overleaf",
"token_count": 276
} | 510 |
/* 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/ThirdPartyDataStore/UpdateMerger.js/0 | {
"file_path": "overleaf/web/app/src/Features/ThirdPartyDataStore/UpdateMerger.js",
"repo_id": "overleaf",
"token_count": 3746
} | 511 |
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const moment = require('moment')
const { User } = require('../../models/User')
const { DeletedUser } = require('../../models/DeletedUser')
const NewsletterManager = require('../Newsletter/NewsletterManager')
const ProjectDeleter = requi... | overleaf/web/app/src/Features/User/UserDeleter.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserDeleter.js",
"repo_id": "overleaf",
"token_count": 1472
} | 512 |
module.exports = {
group: {
modelName: 'Subscription',
readOnly: true,
hasMembersLimit: true,
fields: {
primaryKey: '_id',
read: ['invited_emails', 'teamInvites', 'member_ids'],
write: null,
access: 'manager_ids',
name: 'teamName',
},
baseQuery: {
groupPlan:... | overleaf/web/app/src/Features/UserMembership/UserMembershipEntityConfigs.js/0 | {
"file_path": "overleaf/web/app/src/Features/UserMembership/UserMembershipEntityConfigs.js",
"repo_id": "overleaf",
"token_count": 1202
} | 513 |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
module.exports = {
queue: {
web_to_tpds_http_requests: 'web_to_tpds_http_requests',
tpds_to_web_http_requests: 'tpds_to_web_http_requests',
},
}
| overleaf/web/app/src/infrastructure/Keys.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/Keys.js",
"repo_id": "overleaf",
"token_count": 105
} | 514 |
const Metrics = require('@overleaf/metrics')
const logger = require('logger-sharelatex')
function computeValidationToken(req) {
// this should be a deterministic function of the client-side sessionID,
// prepended with a version number in case we want to change it later
return 'v1:' + req.sessionID.slice(-4)
}
... | overleaf/web/app/src/infrastructure/SessionStoreManager.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/SessionStoreManager.js",
"repo_id": "overleaf",
"token_count": 848
} | 515 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const OauthApplicationSchema = new Schema(
{
id: String,
clientSecret: String,
grants: [String],
name: String,
redirectUris: [String],
scopes: [String],
},
{
collection: 'oauthApplications',
}
)
exp... | overleaf/web/app/src/models/OauthApplication.js/0 | {
"file_path": "overleaf/web/app/src/models/OauthApplication.js",
"repo_id": "overleaf",
"token_count": 167
} | 516 |
{
"enterprise": {
"collaborator": {
"USD": {
"2": 252,
"3": 376,
"4": 495,
"5": 615,
"10": 1170,
"20": 2160,
"50": 4950
},
"EUR": {
"2": 235,
"3": 352,
"4": 468,
"5": 584,
"10": 1090,
"20": 20... | overleaf/web/app/templates/plans/groups.json/0 | {
"file_path": "overleaf/web/app/templates/plans/groups.json",
"repo_id": "overleaf",
"token_count": 1433
} | 517 |
extends ../layout
block content
.content.content-alt
.blog
| !{content} | overleaf/web/app/views/blog/blog_holder.pug/0 | {
"file_path": "overleaf/web/app/views/blog/blog_holder.pug",
"repo_id": "overleaf",
"token_count": 31
} | 518 |
extends ../../layout
block content
.editor.full-size
.loading-screen()
.loading-screen-brand-container
.loading-screen-brand(
style="height: 20%;"
)
h3.loading-screen-label() #{translate("Opening template")}
span.loading-screen-ellip .
span.loading-screen-el... | overleaf/web/app/views/project/editor/new_from_template.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/new_from_template.pug",
"repo_id": "overleaf",
"token_count": 422
} | 519 |
extends ../layout
block content
.content.content-alt
.container.bonus
.row
.col-md-8.col-md-offset-2
.card
.container-fluid(ng-controller="BonusLinksController")
.row
.col-md-12
.page-header
h1 #{translate("help_us_spread_word")}.
.row
.col-md-10.... | overleaf/web/app/views/referal/bonus.pug/0 | {
"file_path": "overleaf/web/app/views/referal/bonus.pug",
"repo_id": "overleaf",
"token_count": 3114
} | 520 |
p
| Please
|
a(href="/contact") contact support
|
| to make changes to your plan
| overleaf/web/app/views/subscriptions/dashboard/_personal_subscription_custom.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard/_personal_subscription_custom.pug",
"repo_id": "overleaf",
"token_count": 31
} | 521 |
extends ../layout
block vars
- metadata = { viewport: true }
block content
main.content.content-alt#main-content
.container
.row
.col-md-6.col-md-offset-3.col-lg-4.col-lg-offset-4
.card
.page-header
h1 We're back!
p Overleaf is now running normally.
p
| Please
|
... | overleaf/web/app/views/user/one_time_login.pug/0 | {
"file_path": "overleaf/web/app/views/user/one_time_login.pug",
"repo_id": "overleaf",
"token_count": 201
} | 522 |
#!/bin/bash
KNOWN_HOSTS=/root/.ssh/known_hosts
if [[ "$BRANCH_NAME" == "master" && "$COPYBARA" == "run" ]]; then
set -e
chmod -R 0600 /root/.ssh
ssh-keyscan github.com > $KNOWN_HOSTS
ssh-keygen -lf $KNOWN_HOSTS | grep "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 github.com"
git config --global user.... | overleaf/web/bin/invoke-copybara/0 | {
"file_path": "overleaf/web/bin/invoke-copybara",
"repo_id": "overleaf",
"token_count": 331
} | 523 |
{
"access_your_projects_with_git": "",
"account_not_linked_to_dropbox": "",
"account_settings": "",
"add_files": "",
"also": "",
"anyone_with_link_can_edit": "",
"anyone_with_link_can_view": "",
"ask_proj_owner_to_upgrade_for_git_bridge": "",
"ask_proj_owner_to_upgrade_for_longer_compiles": "",
"aut... | overleaf/web/frontend/extracted-translations.json/0 | {
"file_path": "overleaf/web/frontend/extracted-translations.json",
"repo_id": "overleaf",
"token_count": 4380
} | 524 |
// 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/rightClick.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/rightClick.js",
"repo_id": "overleaf",
"token_count": 195
} | 525 |
import { useCallback, useEffect, useMemo, useState } from 'react'
import PropTypes from 'prop-types'
import { cloneProject } from '../utils/api'
import CloneProjectModalContent from './clone-project-modal-content'
function CloneProjectModal({
show,
handleHide,
projectId,
projectName = '',
openProject,
}) {
... | overleaf/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js/0 | {
"file_path": "overleaf/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js",
"repo_id": "overleaf",
"token_count": 842
} | 526 |
import React from 'react'
import ReactDOM from 'react-dom'
import { Dropdown } from 'react-bootstrap'
import { useFileTreeMainContext } from '../contexts/file-tree-main'
import FileTreeItemMenuItems from './file-tree-item/file-tree-item-menu-items'
function FileTreeContextMenu() {
const {
hasWritePermissions,
... | overleaf/web/frontend/js/features/file-tree/components/file-tree-context-menu.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-context-menu.js",
"repo_id": "overleaf",
"token_count": 470
} | 527 |
import PropTypes from 'prop-types'
import classNames from 'classnames'
import FileTreeDoc from './file-tree-doc'
import FileTreeFolder from './file-tree-folder'
import { fileCollator } from '../util/file-collator'
function FileTreeFolderList({
folders,
docs,
files,
classes = {},
dropRef = null,
children,
... | overleaf/web/frontend/js/features/file-tree/components/file-tree-folder-list.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-folder-list.js",
"repo_id": "overleaf",
"token_count": 688
} | 528 |
import { createContext, useContext, useState } from 'react'
import PropTypes from 'prop-types'
const FileTreeMainContext = createContext()
export function useFileTreeMainContext() {
const context = useContext(FileTreeMainContext)
if (!context) {
throw new Error(
'useFileTreeMainContext is only availabl... | overleaf/web/frontend/js/features/file-tree/contexts/file-tree-main.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/contexts/file-tree-main.js",
"repo_id": "overleaf",
"token_count": 528
} | 529 |
import { postJSON, deleteJSON } from '../../../infrastructure/fetch-json'
export function syncRename(projectId, entityType, entityId, newName) {
return postJSON(
`/project/${projectId}/${getEntityPathName(entityType)}/${entityId}/rename`,
{
body: {
name: newName,
},
}
)
}
export fu... | overleaf/web/frontend/js/features/file-tree/util/sync-mutation.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/util/sync-mutation.js",
"repo_id": "overleaf",
"token_count": 413
} | 530 |
import PropTypes from 'prop-types'
import { MenuItem } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
export const topFileTypes = ['bbl', 'gls', 'ind']
function PreviewDownloadFileList({ fileList = [] }) {
const { t } = useTranslation()
let topFiles = []
let otherFiles = []
if (fileLi... | overleaf/web/frontend/js/features/preview/components/preview-download-file-list.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-download-file-list.js",
"repo_id": "overleaf",
"token_count": 641
} | 531 |
import { useProjectContext } from '../../../shared/context/project-context'
import { Col, Row } from 'react-bootstrap'
import { Trans } from 'react-i18next'
export default function OwnerInfo() {
const project = useProjectContext()
return (
<Row className="project-member">
<Col xs={7}>{project.owner?.ema... | overleaf/web/frontend/js/features/share-project-modal/components/owner-info.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/owner-info.js",
"repo_id": "overleaf",
"token_count": 166
} | 532 |
import { Button, OverlayTrigger, Tooltip } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
export default function SymbolPaletteInfoLink() {
const { t } = useTranslation()
return (
<OverlayTrigger
placement="top"
trigger={['hover', 'focus']}
overlay={
<Tooltip i... | overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js",
"repo_id": "overleaf",
"token_count": 354
} | 533 |
/* eslint-disable
camelcase,
max-len,
no-cond-assign,
no-return-assign,
no-unused-vars,
no-useless-escape,
*/
// 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: ... | overleaf/web/frontend/js/ide.js/0 | {
"file_path": "overleaf/web/frontend/js/ide.js",
"repo_id": "overleaf",
"token_count": 4685
} | 534 |
/* eslint-disable
max-len,
no-return-assign,
no-useless-escape,
*/
// 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 ret... | overleaf/web/frontend/js/ide/directives/layout.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/directives/layout.js",
"repo_id": "overleaf",
"token_count": 4740
} | 535 |
// 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
*/
export default [
{
c... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/TopHundredSnippets.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/TopHundredSnippets.js",
"repo_id": "overleaf",
"token_count": 6523
} | 536 |
/* 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/file-tree/directives/fileEntity.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/file-tree/directives/fileEntity.js",
"repo_id": "overleaf",
"token_count": 482
} | 537 |
/* 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/history/controllers/HistoryV2AddLabelModalController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/controllers/HistoryV2AddLabelModalController.js",
"repo_id": "overleaf",
"token_count": 549
} | 538 |
/* eslint-disable
camelcase,
node/handle-callback-err,
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 b... | overleaf/web/frontend/js/ide/online-users/OnlineUsersManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/online-users/OnlineUsersManager.js",
"repo_id": "overleaf",
"token_count": 2629
} | 539 |
/* eslint-disable
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Fu... | overleaf/web/frontend/js/ide/permissions/PermissionsManager.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/permissions/PermissionsManager.js",
"repo_id": "overleaf",
"token_count": 614
} | 540 |
/* 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/ide/review-panel/directives/reviewPanelSorted.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/reviewPanelSorted.js",
"repo_id": "overleaf",
"token_count": 3331
} | 541 |
// run `fn` in serie for all values, and resolve with an array of the resultss
// inspired by https://stackoverflow.com/a/50506360/1314820
export function mapSeries(values, fn) {
return values.reduce((promiseChain, value) => {
return promiseChain.then(chainResults =>
fn(value).then(currentResult => [...chai... | overleaf/web/frontend/js/infrastructure/promise.js/0 | {
"file_path": "overleaf/web/frontend/js/infrastructure/promise.js",
"repo_id": "overleaf",
"token_count": 124
} | 542 |
/* eslint-disable
camelcase,
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter var... | overleaf/web/frontend/js/main/event.js/0 | {
"file_path": "overleaf/web/frontend/js/main/event.js",
"repo_id": "overleaf",
"token_count": 1348
} | 543 |
import _ from 'lodash'
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit ret... | overleaf/web/frontend/js/main/register-users.js/0 | {
"file_path": "overleaf/web/frontend/js/main/register-users.js",
"repo_id": "overleaf",
"token_count": 607
} | 544 |
/* global grecaptcha */
/* 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
*/
import App from '../base'
export default App.fac... | overleaf/web/frontend/js/services/validateCaptcha.js/0 | {
"file_path": "overleaf/web/frontend/js/services/validateCaptcha.js",
"repo_id": "overleaf",
"token_count": 440
} | 545 |
import { createContext, useContext, useCallback, useMemo } from 'react'
import PropTypes from 'prop-types'
import useScopeValue from './util/scope-value-hook'
import { useIdeContext } from './ide-context'
export const LayoutContext = createContext()
LayoutContext.Provider.propTypes = {
value: PropTypes.shape({
... | overleaf/web/frontend/js/shared/context/layout-context.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/context/layout-context.js",
"repo_id": "overleaf",
"token_count": 852
} | 546 |
import _ from 'lodash'
// cache for parsed values
const cache = new Map()
export default function getMeta(name, fallback) {
if (cache.has(name)) return cache.get(name)
const element = document.head.querySelector(`meta[name="${name}"]`)
if (!element) {
return fallback
}
const plainTextValue = element.con... | overleaf/web/frontend/js/utils/meta.js/0 | {
"file_path": "overleaf/web/frontend/js/utils/meta.js",
"repo_id": "overleaf",
"token_count": 511
} | 547 |
import PropTypes from 'prop-types'
import CloneProjectModal from '../js/features/clone-project-modal/components/clone-project-modal'
import useFetchMock from './hooks/use-fetch-mock'
export const Interactive = ({
mockResponse = 200,
mockResponseDelay = 500,
...args
}) => {
useFetchMock(fetchMock => {
fetc... | overleaf/web/frontend/stories/clone-project-modal.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/clone-project-modal.stories.js",
"repo_id": "overleaf",
"token_count": 685
} | 548 |
import FileTreeCreateNameInput from '../../../js/features/file-tree/components/file-tree-create/file-tree-create-name-input'
import FileTreeCreateNameProvider from '../../../js/features/file-tree/contexts/file-tree-create-name'
import {
BlockedFilenameError,
DuplicateFilenameError,
} from '../../../js/features/file... | overleaf/web/frontend/stories/modals/create-file/create-file-name-input.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/modals/create-file/create-file-name-input.stories.js",
"repo_id": "overleaf",
"token_count": 584
} | 549 |
.team-profile {
clear: both;
.img-container {
float: left;
overflow: hidden;
margin: (@line-height-computed / 4) @line-height-computed
@line-height-computed (@line-height-computed / 2);
}
}
| overleaf/web/frontend/stylesheets/app/about-page.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/about-page.less",
"repo_id": "overleaf",
"token_count": 86
} | 550 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.