text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
<div dir="rtl" style={{ textAlign: "right" }}>
# سوالات متداول
<hr />
## اوپن ام پی چست؟
اوپن ام پی یک مود جایگزین چند نفره برای سان اندریس در پاسخ به افزایش ناگوار مشکلات مربوط به بروزرسانی ها و مدیریت SA:MP است، نسخه اولیه فقط یک جایگزین برای سرور خواهد بود. کلاینت فعلی SA:MP میتواند به این سرور متصل شود. در آیند... | openmultiplayer/web/frontend/content/fa/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/fa/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 4746
} | 459 |
# Open Multiplayer
Open Multiplayer は _グランド・セフト・オート・サンアンドレアス_ のマルチプレイヤー MOD であり、今の _San Andreas Multiplayer_ というマルチプレイヤー MOD との互換性を持っています。
<br />
すなわち
**現在の SA:MP クライアントとすべてのサーバースクリプトは open.mp 上で使用されても問題なく動けます** 、しかもサーバー側の不具合は修正されます、もうプラグインやスクリプトからの修正は要らなくなります。
もしこのプロジェクトに興味があれば、いつリリースするのか、どうやって手伝えるのかなどの質問については <a... | openmultiplayer/web/frontend/content/ja/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ja/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 364
} | 460 |
<h1>FAQ</h1>
<hr />
<h2>Что такое open.mp?</h2>
open.mp (Open Multiplayer, OMP) - мультиплеерный мод, разрабатываемый в качестве замены San Andreas
Multiplayer, созданный в ответ на проблемы с обновлениями и разработкой SA-MP. Изначальный релиз
обеспечит замену только для сервера. Игроки с клиентом SA-MP смогут подкл... | openmultiplayer/web/frontend/content/ru/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/ru/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 6968
} | 461 |
# SSS
<hr />
## open.mp Nedir?
open.mp (Open Multiplayer, OMP) - SA:MP güncellemeleri ve geliştirilmesi ile ilgili sorunlara yanıt olarak oluşturulan San Andreas Multiplayer için yedek olarak geliştirilen çok oyunculu mod. İlk sürüm yalnızca sunucu için bir yedek sağlayacaktır. Sa:MP istemcisi olan oyuncular bu sunu... | openmultiplayer/web/frontend/content/tr/faq.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/tr/faq.mdx",
"repo_id": "openmultiplayer",
"token_count": 2428
} | 462 |
# Open Multiplayer
Một bản mod online cho _Grand Theft Auto: San Andreas_ sẽ hoàn toàn được tích hợp với chế độ chơi online hiện nay _San Andreas Multiplayer (SA-MP)._
<br />
Điều này có nghĩa là **hệ thống SA:MP cho máy khách và kịch bản (scripting) SA:MP sẽ hoạt động tương thích với open.mp** . Đồng thời, nhiều lỗ... | openmultiplayer/web/frontend/content/vi/index.mdx/0 | {
"file_path": "openmultiplayer/web/frontend/content/vi/index.mdx",
"repo_id": "openmultiplayer",
"token_count": 505
} | 463 |
import { useRouter } from "next/router";
import { NextPage } from "next";
import { useAuth } from "./hooks";
import LoadingBanner from "src/components/LoadingBanner";
function isBrowser(): boolean {
return typeof window !== "undefined";
}
export default function withAuthRedirect<CP = unknown, IP = CP>(
WrappedCo... | openmultiplayer/web/frontend/src/auth/withAuthRedirect.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/auth/withAuthRedirect.tsx",
"repo_id": "openmultiplayer",
"token_count": 294
} | 464 |
import React from "react";
const Issue = ({ fill = "white", display = "inline" }) => (
<svg
className="octicon octicon-issue-opened"
viewBox="0 0 14 16"
version="1.1"
width="14"
height="16"
aria-hidden="true"
focusable="false"
role="img"
xmlns="http://www.w3.org/2000/svg"
fill... | openmultiplayer/web/frontend/src/components/icons/Issue.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/icons/Issue.tsx",
"repo_id": "openmultiplayer",
"token_count": 336
} | 465 |
import { Box } from "@chakra-ui/layout";
import Image from "next/image";
import Link from "next/link";
import { FC } from "react";
import NavMenu, { NavItem } from "./NavMenu";
type Props = {
items: NavItem[];
route: string;
};
const Logo = () => (
<Box p="1">
<Link href="/">
<a>
<Image
... | openmultiplayer/web/frontend/src/components/site/Nav.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/site/Nav.tsx",
"repo_id": "openmultiplayer",
"token_count": 458
} | 466 |
import Admonition from "../../../Admonition";
export default function TipNpcCallback() {
return (
<Admonition type="tip">
<p>Esta callback também pode ser chamada por um NPC.</p>
</Admonition>
);
}
| openmultiplayer/web/frontend/src/components/templates/translations/pt-BR/npc-callbacks-tip.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/components/templates/translations/pt-BR/npc-callbacks-tip.tsx",
"repo_id": "openmultiplayer",
"token_count": 83
} | 467 |
import { visit } from "unist-util-visit";
// Remark plugin for colours.
// Usage:
//
// {text}(#hexcode)
//
// This is {yellow}(#ffff00) text!
//
const colourPattern = /{(.+?)}\(#([a-f0-9]{6})\)/gm;
export const remarkColour = function attacher() {
return (tree: any) => {
visit(tree, "paragraph", (node) => {
... | openmultiplayer/web/frontend/src/mdx-helpers/remark-colour.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/mdx-helpers/remark-colour.ts",
"repo_id": "openmultiplayer",
"token_count": 873
} | 468 |
//Icons
import { ArrowDownIcon, ChevronRightIcon } from "@chakra-ui/icons";
//Chakra Imports
import {
Box,
Button,
Center,
Flex,
Heading,
HStack,
Link,
Text,
useColorMode,
useColorModeValue,
VStack
} from "@chakra-ui/react";
import { GetStaticPropsContext } from "next";
import Head from "next/head... | openmultiplayer/web/frontend/src/pages/index.tsx/0 | {
"file_path": "openmultiplayer/web/frontend/src/pages/index.tsx",
"repo_id": "openmultiplayer",
"token_count": 5829
} | 469 |
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
a {
color: inherit;
text-decoration: none;
}
* {
box-sizing: border-box;
}
| openmultiplayer/web/frontend/src/styles/globals.css/0 | {
"file_path": "openmultiplayer/web/frontend/src/styles/globals.css",
"repo_id": "openmultiplayer",
"token_count": 113
} | 470 |
import { useToast } from "@chakra-ui/toast";
import { APIError, APIErrorSchema } from "src/types/_generated_Error";
type HandleErrorFn = (e: unknown) => void;
const generic = "Unexpected error occurred";
export const useErrorHandler = (): HandleErrorFn => {
const toast = useToast();
const extractError = (e: unk... | openmultiplayer/web/frontend/src/utils/useErrorHandler.ts/0 | {
"file_path": "openmultiplayer/web/frontend/src/utils/useErrorHandler.ts",
"repo_id": "openmultiplayer",
"token_count": 438
} | 471 |
package seed
var Addresses = []string{
"101.100.143.138:28000",
"101.50.3.149:7777",
"101.50.3.61:7780",
"103.126.226.101:7777",
"103.195.100.59:7046",
"103.212.180.191:7776",
"103.212.180.191:7779",
"103.212.180.242:7777",
"103.27.203.107:3333",
"103.27.207.43:7777",
"103.6... | openmultiplayer/web/internal/seed/seed.go/0 | {
"file_path": "openmultiplayer/web/internal/seed/seed.go",
"repo_id": "openmultiplayer",
"token_count": 63604
} | 472 |
-- RenameIndex
ALTER INDEX "Discord_accountId_key" RENAME TO "Discord.accountId_unique";
-- RenameIndex
ALTER INDEX "Discord_email_key" RENAME TO "Discord.email_unique";
-- RenameIndex
ALTER INDEX "Discord_username_key" RENAME TO "Discord.username_unique";
-- RenameIndex
ALTER INDEX "GitHub_accountId_key" RENAME TO ... | openmultiplayer/web/prisma/migrations/20211026111831_full_text_search_indexing/migration.sql/0 | {
"file_path": "openmultiplayer/web/prisma/migrations/20211026111831_full_text_search_indexing/migration.sql",
"repo_id": "openmultiplayer",
"token_count": 290
} | 473 |
.sidebar-container a[title='Overleaf'] {
max-width: 100px;
}
| overleaf/web/.storybook/global.css/0 | {
"file_path": "overleaf/web/.storybook/global.css",
"repo_id": "overleaf",
"token_count": 25
} | 474 |
const settings = require('@overleaf/settings')
const Errors = require('../Errors/Errors')
const httpProxy = require('express-http-proxy')
const URL = require('url')
module.exports = {
call(basePath) {
if (!settings.apis.analytics) {
return (req, res, next) =>
next(
new Errors.ServiceNotCo... | overleaf/web/app/src/Features/Analytics/AnalyticsProxy.js/0 | {
"file_path": "overleaf/web/app/src/Features/Analytics/AnalyticsProxy.js",
"repo_id": "overleaf",
"token_count": 325
} | 475 |
/* eslint-disable
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: ... | overleaf/web/app/src/Features/Captcha/CaptchaMiddleware.js/0 | {
"file_path": "overleaf/web/app/src/Features/Captcha/CaptchaMiddleware.js",
"repo_id": "overleaf",
"token_count": 853
} | 476 |
/* 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:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit ret... | overleaf/web/app/src/Features/Compile/CompileManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Compile/CompileManager.js",
"repo_id": "overleaf",
"token_count": 4570
} | 477 |
const _ = require('underscore')
module.exports = _.template(`\
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; vertical-align: top;">
<th class="small-1... | overleaf/web/app/src/Features/Email/Bodies/NoCTAEmailBody.js/0 | {
"file_path": "overleaf/web/app/src/Features/Email/Bodies/NoCTAEmailBody.js",
"repo_id": "overleaf",
"token_count": 809
} | 478 |
const _ = require('underscore')
const logger = require('logger-sharelatex')
const fs = require('fs')
const request = require('request')
const settings = require('@overleaf/settings')
const Async = require('async')
const FileHashManager = require('./FileHashManager')
const { File } = require('../../models/File')
const E... | overleaf/web/app/src/Features/FileStore/FileStoreHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/FileStore/FileStoreHandler.js",
"repo_id": "overleaf",
"token_count": 3523
} | 479 |
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const metrics = require('@overleaf/metrics')
const settings = require('@overleaf/settings')
const request = require('request')
const { promisifyAll } = require('../../util/promises')
const NotificationsBuilder = require('../Notifica... | overleaf/web/app/src/Features/Institutions/InstitutionsAPI.js/0 | {
"file_path": "overleaf/web/app/src/Features/Institutions/InstitutionsAPI.js",
"repo_id": "overleaf",
"token_count": 3685
} | 480 |
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const Settings = require('@overleaf/settings')
const crypto = require('crypto')
const Mailchimp = require('mailchimp-api-v3')
const OError = require('@overleaf/o-error')
const provider = getProvider()
module.exports = {
subscribe: c... | overleaf/web/app/src/Features/Newsletter/NewsletterManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Newsletter/NewsletterManager.js",
"repo_id": "overleaf",
"token_count": 2344
} | 481 |
const { callbackify } = require('util')
const Path = require('path')
const OError = require('@overleaf/o-error')
const { promiseMapWithLimit } = require('../../util/promises')
const { Doc } = require('../../models/Doc')
const { File } = require('../../models/File')
const DocstoreManager = require('../Docstore/DocstoreM... | overleaf/web/app/src/Features/Project/ProjectDuplicator.js/0 | {
"file_path": "overleaf/web/app/src/Features/Project/ProjectDuplicator.js",
"repo_id": "overleaf",
"token_count": 2255
} | 482 |
const ReferalHandler = require('./ReferalHandler')
const SessionManager = require('../Authentication/SessionManager')
module.exports = {
bonus(req, res, next) {
const userId = SessionManager.getLoggedInUserId(req.session)
ReferalHandler.getReferedUsers(
userId,
(err, referedUsers, referedUserCoun... | overleaf/web/app/src/Features/Referal/ReferalController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Referal/ReferalController.js",
"repo_id": "overleaf",
"token_count": 277
} | 483 |
/* eslint-disable
node/handle-callback-err,
max-len,
no-path-concat,
no-unused-vars,
node/no-deprecated-api,
*/
// 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 implic... | overleaf/web/app/src/Features/StaticPages/HomeController.js/0 | {
"file_path": "overleaf/web/app/src/Features/StaticPages/HomeController.js",
"repo_id": "overleaf",
"token_count": 752
} | 484 |
const async = require('async')
const RecurlyWrapper = require('./RecurlyWrapper')
const RecurlyClient = require('./RecurlyClient')
const { User } = require('../../models/User')
const { promisifyAll } = require('../../util/promises')
const logger = require('logger-sharelatex')
const SubscriptionUpdater = require('./Subs... | overleaf/web/app/src/Features/Subscription/SubscriptionHandler.js/0 | {
"file_path": "overleaf/web/app/src/Features/Subscription/SubscriptionHandler.js",
"repo_id": "overleaf",
"token_count": 5647
} | 485 |
/* eslint-disable
camelcase,
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https... | overleaf/web/app/src/Features/Templates/TemplatesManager.js/0 | {
"file_path": "overleaf/web/app/src/Features/Templates/TemplatesManager.js",
"repo_id": "overleaf",
"token_count": 2831
} | 486 |
/* eslint-disable
camelcase,
max-len,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks... | overleaf/web/app/src/Features/Uploads/ProjectUploadController.js/0 | {
"file_path": "overleaf/web/app/src/Features/Uploads/ProjectUploadController.js",
"repo_id": "overleaf",
"token_count": 1994
} | 487 |
const UserGetter = require('./UserGetter')
const OError = require('@overleaf/o-error')
const UserSessionsManager = require('./UserSessionsManager')
const logger = require('logger-sharelatex')
const Settings = require('@overleaf/settings')
const AuthenticationController = require('../Authentication/AuthenticationControl... | overleaf/web/app/src/Features/User/UserPagesController.js/0 | {
"file_path": "overleaf/web/app/src/Features/User/UserPagesController.js",
"repo_id": "overleaf",
"token_count": 2243
} | 488 |
const bodyParser = require('body-parser')
const HttpErrorHandler = require('../Features/Errors/HttpErrorHandler')
function isBodyParserError(nextArg) {
if (nextArg instanceof Error) {
return (
nextArg.statusCode &&
nextArg.statusCode >= 400 &&
nextArg.statusCode < 600
)
}
return false
}... | overleaf/web/app/src/infrastructure/BodyParserWrapper.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/BodyParserWrapper.js",
"repo_id": "overleaf",
"token_count": 326
} | 489 |
const Queue = require('bull')
const Settings = require('@overleaf/settings')
// Bull will keep a fixed number of the most recently completed jobs. This is
// useful to inspect recently completed jobs. The bull prometheus exporter also
// uses the completed job records to report on job duration.
const MAX_COMPLETED_JOB... | overleaf/web/app/src/infrastructure/Queues.js/0 | {
"file_path": "overleaf/web/app/src/infrastructure/Queues.js",
"repo_id": "overleaf",
"token_count": 566
} | 490 |
const mongoose = require('../infrastructure/Mongoose')
const { SubscriptionSchema } = require('./Subscription')
const { Schema } = mongoose
const { ObjectId } = Schema
const DeleterDataSchema = new Schema(
{
deleterId: { type: ObjectId, ref: 'User' },
deleterIpAddress: { type: String },
deletedAt: {
... | overleaf/web/app/src/models/DeletedSubscription.js/0 | {
"file_path": "overleaf/web/app/src/models/DeletedSubscription.js",
"repo_id": "overleaf",
"token_count": 279
} | 491 |
const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const _ = require('lodash')
const MIN_NAME_LENGTH = 3
const MAX_NAME_LENGTH = 200
const MIN_VARIANT_NAME_LENGTH = 3
const MAX_VARIANT_NAME_LENGTH = 255
const NAME_REGEX = /^[a-zA-Z0-9\-_]+$/
const RolloutPercentType = {
type: Number,... | overleaf/web/app/src/models/SplitTest.js/0 | {
"file_path": "overleaf/web/app/src/models/SplitTest.js",
"repo_id": "overleaf",
"token_count": 1050
} | 492 |
//- Title
if (metadata && metadata.title)
title= metadata.title + ' - ' + settings.appName + ', ' + translate("online_latex_editor")
meta(name="twitter:title", content=metadata.title)
meta(name="og:title", content=metadata.title)
else if (typeof(title) == "undefined")
title= settings.appName + ', '+ translate("onl... | overleaf/web/app/views/_metadata.pug/0 | {
"file_path": "overleaf/web/app/views/_metadata.pug",
"repo_id": "overleaf",
"token_count": 1493
} | 493 |
doctype html
html(
lang=(currentLngCode || 'en')
)
- metadata = metadata || {}
block vars
head
include ./_metadata.pug
if (typeof(gaExperiments) != "undefined")
|!{gaExperiments}
//- Stylesheet
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation)), id="main-styl... | overleaf/web/app/views/layout.pug/0 | {
"file_path": "overleaf/web/app/views/layout.pug",
"repo_id": "overleaf",
"token_count": 2189
} | 494 |
.diff-panel.full-size(ng-if="!history.isV2", ng-controller="HistoryDiffController")
.diff(
ng-if="!!history.diff && !history.diff.loading && !history.diff.deleted && !history.diff.error && !history.diff.binary"
)
.toolbar.toolbar-alt
span.name
| <strong>{{history.diff.highlights.length}} </strong>
ng-p... | overleaf/web/app/views/project/editor/history/diffPanelV1.pug/0 | {
"file_path": "overleaf/web/app/views/project/editor/history/diffPanelV1.pug",
"repo_id": "overleaf",
"token_count": 832
} | 495 |
extends ../layout
block vars
- var suppressNavContentLinks = true
block append meta
meta(name="ol-projects" data-type="json" content=projects)
meta(name="ol-tags" data-type="json" content=tags)
meta(name="ol-notifications" data-type="json" content=notifications)
meta(name="ol-notificationsInstitution" data-type=... | overleaf/web/app/views/project/list.pug/0 | {
"file_path": "overleaf/web/app/views/project/list.pug",
"repo_id": "overleaf",
"token_count": 868
} | 496 |
extends ../layout
include ./dashboard/_team_name_mixin
block head-scripts
script(type="text/javascript", nonce=scriptNonce, src="https://js.recurly.com/v4/recurly.js")
block append meta
meta(name="ol-managedInstitutions", data-type="json", content=managedInstitutions)
meta(name="ol-planCodesChangingAtTermEnd", da... | overleaf/web/app/views/subscriptions/dashboard.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/dashboard.pug",
"repo_id": "overleaf",
"token_count": 1131
} | 497 |
extends ../../layout
block append meta
meta(name="ol-hasIndividualRecurlySubscription" data-type="boolean" content=hasIndividualRecurlySubscription)
meta(name="ol-inviteToken" content=inviteToken)
block content
main.content.content-alt.team-invite#main-content
.container
.row
.col-md-8.col-md-offset-2
... | overleaf/web/app/views/subscriptions/team/invite.pug/0 | {
"file_path": "overleaf/web/app/views/subscriptions/team/invite.pug",
"repo_id": "overleaf",
"token_count": 740
} | 498 |
include ../../_mixins/reconfirm_affiliation
mixin aboutInstitutionLink()
a(href="/learn/how-to/Institutional_Login") #{translate("find_out_more_about_institution_login")}.
mixin btnMakePrimaryDisabled(tooltip)
div(
tooltip=tooltip
tooltip-enable="!ui.isMakingRequest"
)
button.btn.btn-sm.btn-success.affiliati... | overleaf/web/app/views/user/settings/user-affiliations.pug/0 | {
"file_path": "overleaf/web/app/views/user/settings/user-affiliations.pug",
"repo_id": "overleaf",
"token_count": 6720
} | 499 |
// 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/equals.js/0 | {
"file_path": "overleaf/web/frontend/js/directives/equals.js",
"repo_id": "overleaf",
"token_count": 244
} | 500 |
import { useRef, useEffect } from 'react'
import PropTypes from 'prop-types'
import Linkify from 'react-linkify'
function MessageContent({ content }) {
const root = useRef(null)
useEffect(() => {
if (!(window.MathJax && window.MathJax.Hub)) {
return
}
const MJHub = window.MathJax.Hub
const i... | overleaf/web/frontend/js/features/chat/components/message-content.js/0 | {
"file_path": "overleaf/web/frontend/js/features/chat/components/message-content.js",
"repo_id": "overleaf",
"token_count": 589
} | 501 |
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import Icon from '../../../shared/components/icon'
function MenuButton({ onClick }) {
const { t } = useTranslation()
return (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a role="button" className="btn btn-full-heig... | overleaf/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js/0 | {
"file_path": "overleaf/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js",
"repo_id": "overleaf",
"token_count": 218
} | 502 |
import { useCallback, useEffect } from 'react'
import FileTreeCreateNameInput from '../file-tree-create-name-input'
import { useFileTreeActionable } from '../../../contexts/file-tree-actionable'
import { useFileTreeCreateName } from '../../../contexts/file-tree-create-name'
import { useFileTreeCreateForm } from '../../... | overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js",
"repo_id": "overleaf",
"token_count": 362
} | 503 |
import { Modal } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
import FileTreeCreateFormProvider from '../../contexts/file-tree-create-form'
import FileTreeModalCreateFileBody from '../file-tree-create/file-tree-modal-cr... | overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js",
"repo_id": "overleaf",
"token_count": 450
} | 504 |
import { useEffect, useState } from 'react'
import { getJSON } from '../../../infrastructure/fetch-json'
import { fileCollator } from '../util/file-collator'
import useAbortController from '../../../shared/hooks/use-abort-controller'
const alphabetical = (a, b) => fileCollator.compare(a.name, b.name)
export function ... | overleaf/web/frontend/js/features/file-tree/hooks/use-user-projects.js/0 | {
"file_path": "overleaf/web/frontend/js/features/file-tree/hooks/use-user-projects.js",
"repo_id": "overleaf",
"token_count": 281
} | 505 |
import { useState, useEffect, createRef, useRef } from 'react'
import PropTypes from 'prop-types'
import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
import OutlineList from './outline-list'
import Icon from '../../../shared/... | overleaf/web/frontend/js/features/outline/components/outline-item.js/0 | {
"file_path": "overleaf/web/frontend/js/features/outline/components/outline-item.js",
"repo_id": "overleaf",
"token_count": 1356
} | 506 |
import { useRef, useState } from 'react'
import PropTypes from 'prop-types'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import PreviewDownloadButton from './preview-download-button'
import PreviewRecompileButton from './preview-recompile-button'
import Previe... | overleaf/web/frontend/js/features/preview/components/preview-toolbar.js/0 | {
"file_path": "overleaf/web/frontend/js/features/preview/components/preview-toolbar.js",
"repo_id": "overleaf",
"token_count": 3555
} | 507 |
import PropTypes from 'prop-types'
import { Col, Row } from 'react-bootstrap'
import MemberPrivileges from './member-privileges'
export default function ViewMember({ member }) {
return (
<Row className="project-member">
<Col xs={7}>{member.email}</Col>
<Col xs={3}>
<MemberPrivileges privilege... | overleaf/web/frontend/js/features/share-project-modal/components/view-member.js/0 | {
"file_path": "overleaf/web/frontend/js/features/share-project-modal/components/view-member.js",
"repo_id": "overleaf",
"token_count": 216
} | 508 |
import symbols from '../data/symbols.json'
export function createCategories(t) {
return [
{
id: 'Greek',
label: t('category_greek'),
},
{
id: 'Arrows',
label: t('category_arrows'),
},
{
id: 'Operators',
label: t('category_operators'),
},
{
id: 'Re... | overleaf/web/frontend/js/features/symbol-palette/utils/categories.js/0 | {
"file_path": "overleaf/web/frontend/js/features/symbol-palette/utils/categories.js",
"repo_id": "overleaf",
"token_count": 369
} | 509 |
/* 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/clone/controllers/CloneProjectModalController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/clone/controllers/CloneProjectModalController.js",
"repo_id": "overleaf",
"token_count": 656
} | 510 |
/* 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:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null chec... | overleaf/web/frontend/js/ide/editor/controllers/SavingNotificationController.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/controllers/SavingNotificationController.js",
"repo_id": "overleaf",
"token_count": 1369
} | 511 |
/* eslint-disable
camelcase
*/
import EditorShareJsCodec from '../../../EditorShareJsCodec'
import 'ace/ace'
const { Range } = ace.require('ace/range')
class TrackChangesAdapter {
constructor(editor) {
this.editor = editor
this.changeIdToMarkerIdMap = {}
}
tearDown() {
this.changeIdToMarkerIdMap... | overleaf/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js",
"repo_id": "overleaf",
"token_count": 3017
} | 512 |
/* 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/components/historyEntriesList.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/components/historyEntriesList.js",
"repo_id": "overleaf",
"token_count": 1654
} | 513 |
/* 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
* Full docs: https://github.com/decaffeinate/decaffeinate... | overleaf/web/frontend/js/ide/history/util/HistoryViewModes.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/history/util/HistoryViewModes.js",
"repo_id": "overleaf",
"token_count": 158
} | 514 |
/* eslint-disable
max-len,
no-cond-assign,
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 return... | overleaf/web/frontend/js/ide/pdfng/directives/pdfJs.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/pdfng/directives/pdfJs.js",
"repo_id": "overleaf",
"token_count": 2566
} | 515 |
import App from '../../../base'
let content = ''
App.directive('addCommentEntry', () => ({
restrict: 'E',
templateUrl: 'addCommentEntryTemplate',
scope: {
onStartNew: '&',
onSubmit: '&',
onCancel: '&',
},
link(scope, element, attrs) {
scope.state = {
isAdding: false,
content: conte... | overleaf/web/frontend/js/ide/review-panel/directives/addCommentEntry.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/review-panel/directives/addCommentEntry.js",
"repo_id": "overleaf",
"token_count": 519
} | 516 |
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
import './services/settings'
import './controllers/SettingsController'
import './controllers/ProjectNameController'
| overleaf/web/frontend/js/ide/settings/index.js/0 | {
"file_path": "overleaf/web/frontend/js/ide/settings/index.js",
"repo_id": "overleaf",
"token_count": 58
} | 517 |
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:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of n... | overleaf/web/frontend/js/main/affiliations/components/affiliationForm.js/0 | {
"file_path": "overleaf/web/frontend/js/main/affiliations/components/affiliationForm.js",
"repo_id": "overleaf",
"token_count": 1191
} | 518 |
import App from '../base'
export default App.controller('PostGatewayController', function ($scope) {
$scope.handleGateway = function () {
const { params } = JSON.parse($('#gateway-data').text())
params.viaGateway = 'true'
Object.keys(params).forEach(param => {
$('<input>')
.attr({
... | overleaf/web/frontend/js/main/post-gateway.js/0 | {
"file_path": "overleaf/web/frontend/js/main/post-gateway.js",
"repo_id": "overleaf",
"token_count": 204
} | 519 |
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/user-membership.js/0 | {
"file_path": "overleaf/web/frontend/js/main/user-membership.js",
"repo_id": "overleaf",
"token_count": 1635
} | 520 |
import { useMemo } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
function Pagination({ currentPage, totalPages, handlePageClick }) {
const { t } = useTranslation()
const maxOtherPageButtons = useMemo(() => {
let maxOtherPageB... | overleaf/web/frontend/js/shared/components/pagination.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/components/pagination.js",
"repo_id": "overleaf",
"token_count": 1926
} | 521 |
import { useCallback, useEffect, useRef, useState } from 'react'
import { findDOMNode } from 'react-dom'
export default function useDropdown(defaultOpen = false) {
const [open, setOpen] = useState(defaultOpen)
// store the dropdown node for use in the "click outside" event listener
const ref = useRef(null)
/... | overleaf/web/frontend/js/shared/hooks/use-dropdown.js/0 | {
"file_path": "overleaf/web/frontend/js/shared/hooks/use-dropdown.js",
"repo_id": "overleaf",
"token_count": 512
} | 522 |
/*!
* jquery.storage.js 0.0.3 - https://github.com/yckart/jquery.storage.js
* The client-side storage for every browser, on any device.
*
* Copyright (c) 2012 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/02/10
**/
;(function($, w... | overleaf/web/frontend/js/vendor/libs/jquery.storage.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/jquery.storage.js",
"repo_id": "overleaf",
"token_count": 1596
} | 523 |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... | overleaf/web/frontend/js/vendor/libs/sharejs.js/0 | {
"file_path": "overleaf/web/frontend/js/vendor/libs/sharejs.js",
"repo_id": "overleaf",
"token_count": 25010
} | 524 |
import { ContextRoot } from '../js/shared/context/root-context'
import { setupContext } from './fixtures/context'
import importOverleafModules from '../macros/import-overleaf-module.macro'
import useFetchMock from './hooks/use-fetch-mock'
const [
{
import: { default: GitBridgeModal },
},
] = importOverleafModu... | overleaf/web/frontend/stories/git-bridge-modal.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/git-bridge-modal.stories.js",
"repo_id": "overleaf",
"token_count": 432
} | 525 |
/* eslint-disable jsx-a11y/anchor-is-valid */
import { Grid, Row, Col, Button, Alert, ProgressBar } from 'react-bootstrap'
export const Colors = () => {
return (
<div className="content content-alt">
<Grid>
<Row>
<Col md={8} mdOffset={2}>
<h2>Colours</h2>
<div cla... | overleaf/web/frontend/stories/style-guide.stories.js/0 | {
"file_path": "overleaf/web/frontend/stories/style-guide.stories.js",
"repo_id": "overleaf",
"token_count": 17077
} | 526 |
@twitter-color: #1da1f2;
@facebook-color: #3b5998;
@email-color: #808b9a;
@link-to-us-color: #406eb3;
.bonus {
margin-top: 15px;
.page-header h1 {
text-align: center;
}
h2 {
text-align: center;
font-size: 20px;
line-height: 28px;
margin-bottom: @line-height-computed;
margin-top: 0;
... | overleaf/web/frontend/stylesheets/app/bonus.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/bonus.less",
"repo_id": "overleaf",
"token_count": 1160
} | 527 |
.modal-body-publish {
@label-column-width: 10em;
@control-left-margin: 1em;
.form-control-box {
margin-bottom: 1.5ex;
margin-left: @control-left-margin;
label {
display: inline-block;
width: @label-column-width;
vertical-align: baseline;
}
label.checkbox-label {
width: ... | overleaf/web/frontend/stylesheets/app/editor/publish-modal.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/editor/publish-modal.less",
"repo_id": "overleaf",
"token_count": 1243
} | 528 |
@brand-ieee-color: #00629b;
@brand-google-color: #276fea; // Not the "official" color but modified for a11y
@brand-twitter-color: #1da1f2;
@brand-orcid-color: #a6ce39;
@brand-sharelatex-color: #a93529;
.login-register-alternatives {
.form-group:last-child {
margin-bottom: 0;
}
}
.login-register-container {
... | overleaf/web/frontend/stylesheets/app/login-register.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/login-register.less",
"repo_id": "overleaf",
"token_count": 1223
} | 529 |
.gallery-title {
margin-bottom: @margin-xl;
}
.field-title {
font-weight: bold;
}
.filters {
float: right;
margin-bottom: @margin-lg;
@media (max-width: @screen-md-min) {
float: none;
}
}
.cta-links {
.cta-link.btn {
margin: 0 @margin-sm @margin-sm 0;
}
}
.popular-tags {
.gallery-thumbnai... | overleaf/web/frontend/stylesheets/app/templates-v2.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/app/templates-v2.less",
"repo_id": "overleaf",
"token_count": 1611
} | 530 |
//
// Dropdown menus
// --------------------------------------------------
// Dropdown arrow/caret
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: @caret-width-base solid;
border-right: @caret-width-base solid transparent;
border-left: @caret-w... | overleaf/web/frontend/stylesheets/components/dropdowns.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/dropdowns.less",
"repo_id": "overleaf",
"token_count": 1971
} | 531 |
// Media objects
// Source: http://stubbornella.org/content/?p=497
// --------------------------------------------------
// Common styles
// -------------------------
// Clear the floats
.media,
.media-body {
overflow: hidden;
zoom: 1;
}
// Proper spacing between instances of .media
.media,
.media .media {
mar... | overleaf/web/frontend/stylesheets/components/media.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/media.less",
"repo_id": "overleaf",
"token_count": 277
} | 532 |
.tags-input {
display: block;
}
.tags-input *,
.tags-input *:before,
.tags-input *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.tags-input label.small {
font-weight: normal;
}
.tags-input .host {
position: relative;
height: 100%;
}
.tags-input .host:activ... | overleaf/web/frontend/stylesheets/components/tags-input.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/components/tags-input.less",
"repo_id": "overleaf",
"token_count": 1545
} | 533 |
//
// Typography
// --------------------------------------------------
* {
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
}
// Headings
// -------------------------
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: @headings-font... | overleaf/web/frontend/stylesheets/core/type.less/0 | {
"file_path": "overleaf/web/frontend/stylesheets/core/type.less",
"repo_id": "overleaf",
"token_count": 2734
} | 534 |
const webpackConfig = require('./webpack.config.test')
module.exports = function (config) {
config.set({
customLaunchers: {
ChromeCustom: {
base: 'ChromeHeadless',
// We must disable the Chrome sandbox when running Chrome inside Docker
// (Chrome's sandbox needs more permissions tha... | overleaf/web/karma.conf.js/0 | {
"file_path": "overleaf/web/karma.conf.js",
"repo_id": "overleaf",
"token_count": 776
} | 535 |
{
"return_to_login_page": "Вернуться на страницу входа",
"login_failed": "Вход не удался",
"delete_account_warning_message_3": "Вы собираетесь <strong>удалить все данные Вашего аккаунта</strong>, включая все Ваши проекты и настройки. Пожалуйста, введите адрес электронной почты и пароль Вашего аккаунта в форму вни... | overleaf/web/locales/ru.json/0 | {
"file_path": "overleaf/web/locales/ru.json",
"repo_id": "overleaf",
"token_count": 33607
} | 536 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['saas']
const indexes = [
{
key: {
user_id: 1,
},
name: 'user_id_1',
},
]
exports.migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.githubSyncUserCredential... | overleaf/web/migrations/20190912145011_create_githubSyncUserCredentials_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145011_create_githubSyncUserCredentials_indexes.js",
"repo_id": "overleaf",
"token_count": 234
} | 537 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
token: 1,
},
name: 'token',
},
]
exports.migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.spe... | overleaf/web/migrations/20190912145027_create_spellingPreferences_indexes.js/0 | {
"file_path": "overleaf/web/migrations/20190912145027_create_spellingPreferences_indexes.js",
"repo_id": "overleaf",
"token_count": 218
} | 538 |
/* eslint-disable no-unused-vars */
const Helpers = require('./lib/helpers')
exports.tags = ['saas']
const indexes = [
{
key: {
requestId: 1,
},
name: 'requestId_1',
},
{
// expire after 24 hours
expireAfterSeconds: 60 * 60 * 24,
key: {
createdAt: 1,
},
name: 'create... | overleaf/web/migrations/20200608213302_saml-cache-indexes.js/0 | {
"file_path": "overleaf/web/migrations/20200608213302_saml-cache-indexes.js",
"repo_id": "overleaf",
"token_count": 275
} | 539 |
/* eslint-disable
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/d... | overleaf/web/modules/launchpad/app/src/LaunchpadRouter.js/0 | {
"file_path": "overleaf/web/modules/launchpad/app/src/LaunchpadRouter.js",
"repo_id": "overleaf",
"token_count": 627
} | 540 |
const base = require(process.env.BASE_CONFIG)
module.exports = base.mergeWith({
test: {
counterInit: 160000,
},
})
| overleaf/web/modules/server-ce-scripts/test/acceptance/config/settings.test.js/0 | {
"file_path": "overleaf/web/modules/server-ce-scripts/test/acceptance/config/settings.test.js",
"repo_id": "overleaf",
"token_count": 49
} | 541 |
google-site-verification: googleef256f97939bd9b7.html | overleaf/web/public/googleef256f97939bd9b7.html/0 | {
"file_path": "overleaf/web/public/googleef256f97939bd9b7.html",
"repo_id": "overleaf",
"token_count": 20
} | 542 |
const { db, waitForDb } = require('../app/src/infrastructure/mongodb')
async function updateStringDates() {
await waitForDb()
const users = await db.users.aggregate([
{ $unwind: { path: '$emails' } },
{
$match: { 'emails.confirmedAt': { $exists: true, $type: 'string' } },
},
{
$project:... | overleaf/web/scripts/confirmed_at_to_dates.js/0 | {
"file_path": "overleaf/web/scripts/confirmed_at_to_dates.js",
"repo_id": "overleaf",
"token_count": 542
} | 543 |
# Usage
```
node scripts/learn/checkSanitize https://LEARN_WIKI
```
## Bulk export
There is a bulk export for media wiki pages, but it produces different
html escaping compared to the regular parse API we use in web.
The bulk export does not escape all the placeholder HTML-like elements,
like `<project-id` or `<d... | overleaf/web/scripts/learn/checkSanitize/README.md/0 | {
"file_path": "overleaf/web/scripts/learn/checkSanitize/README.md",
"repo_id": "overleaf",
"token_count": 758
} | 544 |
# Sync User Entitlements
Entitlement information for insitutional (university) sso users is stored in
both the mongo users collection and the postgres v2_user_universities table.
The mongo users collection is authoratative but these need to be in sync for
everything to work properly.
This script takes exports from bo... | overleaf/web/scripts/sync-user-entitlements/README.md/0 | {
"file_path": "overleaf/web/scripts/sync-user-entitlements/README.md",
"repo_id": "overleaf",
"token_count": 511
} | 545 |
'use strict'
const fs = require('fs-extra')
const xml2js = require('xml2js')
const UKAMFEntity = require('./ukamf-entity')
class UKAMFDB {
constructor(file) {
this.file = file
}
async init() {
const data = await fs.readFile(this.file, 'utf8')
const parser = new xml2js.Parser()
const xml = awai... | overleaf/web/scripts/ukamf/ukamf-db.js/0 | {
"file_path": "overleaf/web/scripts/ukamf/ukamf-db.js",
"repo_id": "overleaf",
"token_count": 274
} | 546 |
const { expect } = require('chai')
const UserHelper = require('../src/helpers/UserHelper')
describe('BetaProgram', function () {
let email, userHelper
beforeEach(async function () {
userHelper = new UserHelper()
email = userHelper.getDefaultEmail()
userHelper = await UserHelper.createUser({ email })
... | overleaf/web/test/acceptance/src/BetaProgramTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/BetaProgramTests.js",
"repo_id": "overleaf",
"token_count": 478
} | 547 |
/* eslint-disable
camelcase,
node/handle-callback-err,
max-len,
mocha/no-identical-title,
no-path-concat,
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 unn... | overleaf/web/test/acceptance/src/ProjectDuplicateNameTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/ProjectDuplicateNameTests.js",
"repo_id": "overleaf",
"token_count": 10902
} | 548 |
/* eslint-disable
camelcase,
max-len,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorte... | overleaf/web/test/acceptance/src/TpdsUpdateTests.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/TpdsUpdateTests.js",
"repo_id": "overleaf",
"token_count": 2731
} | 549 |
const { callbackify } = require('util')
const request = require('./request')
async function getMetric(matcher) {
const { body } = await request.promises.request('/metrics')
const found = body.split('\n').find(matcher)
if (!found) return 0
return parseInt(found.split(' ')[1], 0)
}
module.exports = {
getMetri... | overleaf/web/test/acceptance/src/helpers/metrics.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/helpers/metrics.js",
"repo_id": "overleaf",
"token_count": 135
} | 550 |
const AbstractMockApi = require('./AbstractMockApi')
const { EventEmitter } = require('events')
class MockV1HistoryApi extends AbstractMockApi {
reset() {
this.fakeZipCall = 0
this.requestedZipPacks = 0
this.sentChunks = 0
this.events = new EventEmitter()
}
applyRoutes() {
this.app.get(
... | overleaf/web/test/acceptance/src/mocks/MockV1HistoryApi.js/0 | {
"file_path": "overleaf/web/test/acceptance/src/mocks/MockV1HistoryApi.js",
"repo_id": "overleaf",
"token_count": 1138
} | 551 |
import { expect } from 'chai'
import * as sinon from 'sinon'
import { useEffect } from 'react'
import {
screen,
render,
fireEvent,
cleanup,
waitFor,
} from '@testing-library/react'
import fetchMock from 'fetch-mock'
import PropTypes from 'prop-types'
import { contextProps } from './context-props'
import File... | overleaf/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js",
"repo_id": "overleaf",
"token_count": 6003
} | 552 |
import { screen } from '@testing-library/react'
import { renderWithEditorContext } from '../../../helpers/render-with-context'
import FileViewImage from '../../../../../frontend/js/features/file-view/components/file-view-image.js'
describe('<FileViewImage />', function () {
const file = {
id: '60097ca2045461002... | overleaf/web/test/frontend/features/file-view/components/file-view-image.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/file-view/components/file-view-image.test.js",
"repo_id": "overleaf",
"token_count": 291
} | 553 |
import sinon from 'sinon'
import { expect } from 'chai'
import { screen, render, fireEvent } from '@testing-library/react'
import PreviewToolbar from '../../../../../frontend/js/features/preview/components/preview-toolbar'
describe('<PreviewToolbar />', function () {
const onRecompile = sinon.stub()
const onRecomp... | overleaf/web/test/frontend/features/preview/components/preview-toolbar.test.js/0 | {
"file_path": "overleaf/web/test/frontend/features/preview/components/preview-toolbar.test.js",
"repo_id": "overleaf",
"token_count": 1326
} | 554 |
/* eslint-disable
max-len,
*/
/* global inject, sinon */
// 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/b... | overleaf/web/test/karma/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js/0 | {
"file_path": "overleaf/web/test/karma/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js",
"repo_id": "overleaf",
"token_count": 4340
} | 555 |
const SandboxedModule = require('sandboxed-module')
const path = require('path')
const modulePath = path.join(
__dirname,
'../../../../app/src/Features/Analytics/AnalyticsController'
)
const sinon = require('sinon')
describe('AnalyticsController', function () {
beforeEach(function () {
this.SessionManager = ... | overleaf/web/test/unit/src/Analytics/AnalyticsControllerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Analytics/AnalyticsControllerTests.js",
"repo_id": "overleaf",
"token_count": 1048
} | 556 |
/* eslint-disable
chai-friendly/no-unused-expressions,
node/handle-callback-err,
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 be... | overleaf/web/test/unit/src/Collaborators/CollaboratorsInviteHandlerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Collaborators/CollaboratorsInviteHandlerTests.js",
"repo_id": "overleaf",
"token_count": 15852
} | 557 |
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate... | overleaf/web/test/unit/src/Downloads/ProjectDownloadsControllerTests.js/0 | {
"file_path": "overleaf/web/test/unit/src/Downloads/ProjectDownloadsControllerTests.js",
"repo_id": "overleaf",
"token_count": 2111
} | 558 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.