text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
<!-- injected in manager head -->
| modernweb-dev/web/packages/dev-server-storybook/demo/wc/.storybook/manager-head.html/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-storybook/demo/wc/.storybook/manager-head.html",
"repo_id": "modernweb-dev",
"token_count": 8
} | 189 |
import { Plugin } from 'rollup';
import { injectExportsOrder } from '../../shared/stories/injectExportsOrder.js';
export function injectExportsOrderPlugin(storyFilePaths: string[]): Plugin {
return {
name: 'mdx',
transform(code, id) {
if (storyFilePaths.includes(id)) {
return injectExportsOrder... | modernweb-dev/web/packages/dev-server-storybook/src/build/rollup/injectExportsOrderPlugin.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-storybook/src/build/rollup/injectExportsOrderPlugin.ts",
"repo_id": "modernweb-dev",
"token_count": 132
} | 190 |
declare module '@mdx-js/mdx' {
export default function async(
src: string,
options: { compilers: any; filepath: string },
): Promise<string>;
}
| modernweb-dev/web/packages/dev-server-storybook/types/mdx-js__mdx/index.d.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-storybook/types/mdx-js__mdx/index.d.ts",
"repo_id": "modernweb-dev",
"token_count": 57
} | 191 |
import { fileURLToPath } from 'url';
import { resolve } from 'path';
export default {
rootDir: resolve(fileURLToPath(import.meta.url), '..', '..', '..'),
middleware: [
function rewriteIndex(ctx, next) {
if (ctx.url === '/' || ctx.url === '/index.html') {
ctx.url = '/demo/index-rewrite/index.html'... | modernweb-dev/web/packages/dev-server/demo/index-rewrite/config.mjs/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/demo/index-rewrite/config.mjs",
"repo_id": "modernweb-dev",
"token_count": 150
} | 192 |
import { DevServerConfig } from './DevServerConfig.js';
const arrayKeys = ['plugins', 'middleware'];
export function mergeConfigs(...configs: Partial<DevServerConfig | undefined>[]) {
const finalConfig: any = {
plugins: [],
middleware: [],
};
for (const config of configs) {
if (config) {
for ... | modernweb-dev/web/packages/dev-server/src/config/mergeConfigs.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/src/config/mergeConfigs.ts",
"repo_id": "modernweb-dev",
"token_count": 263
} | 193 |
# @web/mocks
[`MSW`](https://mswjs.io/) integration layer for usage with [`@web/dev-server`](https://modern-web.dev/docs/dev-server/overview/), [`@web/test-runner`](https://modern-web.dev/docs/test-runner/overview/) and [`@web/dev-server-storybook`](https://modern-web.dev/docs/dev-server/plugins/storybook/#mainjs-and-... | modernweb-dev/web/packages/mocks/README.md/0 | {
"file_path": "modernweb-dev/web/packages/mocks/README.md",
"repo_id": "modernweb-dev",
"token_count": 3725
} | 194 |
// @ts-nocheck
import { addons, makeDecorator } from '@storybook/preview-api';
import { createDecorator } from './create-decorator.js';
// Storybook 7
/**
* @type {ReturnType<typeof makeDecorator>}
*/
export const withMocks = createDecorator(addons, makeDecorator);
| modernweb-dev/web/packages/mocks/storybook/addon/decorator.js/0 | {
"file_path": "modernweb-dev/web/packages/mocks/storybook/addon/decorator.js",
"repo_id": "modernweb-dev",
"token_count": 95
} | 195 |
import { expect } from 'chai';
import path from 'path';
import fs from 'fs';
import { injectPolyfillsLoader } from '../src/injectPolyfillsLoader.js';
import { noModuleSupportTest, fileTypes } from '../src/utils.js';
import { PolyfillsLoaderConfig } from '../src/types.js';
const updateSnapshots = process.argv.includes(... | modernweb-dev/web/packages/polyfills-loader/test/injectPolyfillsLoader.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/polyfills-loader/test/injectPolyfillsLoader.test.ts",
"repo_id": "modernweb-dev",
"token_count": 3040
} | 196 |
const fs = require('fs');
const path = require('path');
const { patternsToFiles } = require('./patternsToFiles.js');
/**
* Copies all files from the given patterns retaining relative paths relative to the root directory.
*
* @example
* // Copy all svg, jpg and json files
* copy({ patterns: '**\/*.{svg,jpg,json}' ... | modernweb-dev/web/packages/rollup-plugin-copy/src/copy.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-copy/src/copy.js",
"repo_id": "modernweb-dev",
"token_count": 602
} | 197 |
# Rollup Plugin HTML
Plugin for bundling HTML files. Bundles module scripts and linked assets in HTML files and injects the hashed filenames.
See [our website](https://modern-web.dev/docs/building/rollup-plugin-html/) for full documentation.
| modernweb-dev/web/packages/rollup-plugin-html/README.md/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/README.md",
"repo_id": "modernweb-dev",
"token_count": 65
} | 198 |
console.log('no-module.js');
| modernweb-dev/web/packages/rollup-plugin-html/demo/spa/src/no-module.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/demo/spa/src/no-module.js",
"repo_id": "modernweb-dev",
"token_count": 11
} | 199 |
import { Attribute } from 'parse5';
import path from 'path';
import { OutputChunk } from 'rollup';
import {
EntrypointBundle,
GeneratedBundle,
RollupPluginHTMLOptions,
ScriptModuleTag,
} from '../RollupPluginHTMLOptions';
import { createError, NOOP_IMPORT } from '../utils.js';
import { toBrowserPath } from './... | modernweb-dev/web/packages/rollup-plugin-html/src/output/getEntrypointBundles.ts/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/src/output/getEntrypointBundles.ts",
"repo_id": "modernweb-dev",
"token_count": 1017
} | 200 |
<svg xmlns="http://www.w3.org/2000/svg">y</svg>
| modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/assets/x/foo.svg/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/assets/x/foo.svg",
"repo_id": "modernweb-dev",
"token_count": 26
} | 201 |
console.log('sub-with-js');
| modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/inject-service-worker/sub-with-js/sub-js.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/inject-service-worker/sub-with-js/sub-js.js",
"repo_id": "modernweb-dev",
"token_count": 11
} | 202 |
import './shared-module.js';
console.log('module-b.js');
| modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/modules/module-c.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/modules/module-c.js",
"repo_id": "modernweb-dev",
"token_count": 22
} | 203 |
import { expect } from 'chai';
import { parse } from 'parse5';
import path from 'path';
import { extractAssets } from '../../../../src/input/extract/extractAssets.js';
const rootDir = path.resolve(__dirname, '..', '..', '..', 'fixtures', 'assets');
describe('extractAssets', () => {
it('extracts assets from a docume... | modernweb-dev/web/packages/rollup-plugin-html/test/src/input/extract/extractAssets.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/src/input/extract/extractAssets.test.ts",
"repo_id": "modernweb-dev",
"token_count": 4569
} | 204 |
const nameOne = 'one-name';
const imageOne = new URL('../one.svg', import.meta.url).href;
export { imageOne, nameOne };
| modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/one-bundle.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/one-bundle.js",
"repo_id": "modernweb-dev",
"token_count": 42
} | 205 |
// this file is autogenerated with the generate-mjs-dts-entrypoints script
import cjsEntrypoint from './dist/index.js';
const { polyfillsLoader } = cjsEntrypoint;
export { polyfillsLoader };
| modernweb-dev/web/packages/rollup-plugin-polyfills-loader/index.mjs/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-polyfills-loader/index.mjs",
"repo_id": "modernweb-dev",
"token_count": 61
} | 206 |
import { generateSW, injectManifest } from '../index.mjs';
export default {
input: 'demo/main.js',
output: {
file: 'demo/dist/bundle.js',
format: 'esm',
},
plugins: [
generateSW({
swDest: 'demo/dist/generateSW_sw.js',
globDirectory: 'demo/dist/',
globIgnores: ['injectManifest_sw.j... | modernweb-dev/web/packages/rollup-plugin-workbox/demo/rollup.config.mjs/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-workbox/demo/rollup.config.mjs",
"repo_id": "modernweb-dev",
"token_count": 354
} | 207 |
// based on https://github.com/storybookjs/storybook/blob/v7.0.9/code/lib/builder-vite/src/codegen-set-addon-channel.ts
export async function generateSetupAddonsScript() {
return `
import { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage';
import { createChannel as createWebSocketCha... | modernweb-dev/web/packages/storybook-builder/src/generate-setup-addons-script.ts/0 | {
"file_path": "modernweb-dev/web/packages/storybook-builder/src/generate-setup-addons-script.ts",
"repo_id": "modernweb-dev",
"token_count": 264
} | 208 |
import { runIntegrationTests } from '../../../integration/test-runner/index.js';
import { browserstackLauncher } from '../src/index.js';
if (!process.env.BROWSER_STACK_USERNAME) {
throw new Error('Missing env var BROWSER_STACK_USERNAME');
}
if (!process.env.BROWSER_STACK_ACCESS_KEY) {
throw new Error('Missing env... | modernweb-dev/web/packages/test-runner-browserstack/test-remote/browserstackLauncher.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-browserstack/test-remote/browserstackLauncher.test.ts",
"repo_id": "modernweb-dev",
"token_count": 861
} | 209 |
# @web/test-runner-chrome
## 0.16.0
### Minor Changes
- 4cc90648: Update Puppeteer to version 22. Remove Puppeteer KnownDevices, before the update named devices, export.
## 0.15.0
### Minor Changes
- c185cbaa: Set minimum node version to 18
### Patch Changes
- Updated dependencies [c185cbaa]
- @web/test-runne... | modernweb-dev/web/packages/test-runner-chrome/CHANGELOG.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-chrome/CHANGELOG.md",
"repo_id": "modernweb-dev",
"token_count": 4439
} | 210 |
import { TestRunnerPlugin } from '@web/test-runner-core';
import type { ChromeLauncher } from '@web/test-runner-chrome';
import type { PlaywrightLauncher } from '@web/test-runner-playwright';
export interface Media {
media?: 'screen' | 'print';
colorScheme?: 'dark' | 'light' | 'no-preference';
reducedMotion?: 'r... | modernweb-dev/web/packages/test-runner-commands/src/emulateMediaPlugin.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-commands/src/emulateMediaPlugin.ts",
"repo_id": "modernweb-dev",
"token_count": 917
} | 211 |
import path from 'path';
import { runTests } from '@web/test-runner-core/test-helpers';
import { chromeLauncher } from '@web/test-runner-chrome';
import { playwrightLauncher } from '@web/test-runner-playwright';
import { setViewportPlugin } from '../../src/setViewportPlugin.js';
describe('setViewportPlugin', functio... | modernweb-dev/web/packages/test-runner-commands/test/set-viewport/setViewportPlugin.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-commands/test/set-viewport/setViewportPlugin.test.ts",
"repo_id": "modernweb-dev",
"token_count": 357
} | 212 |
import { Logger, ErrorWithLocation } from '../logger/Logger';
export class BufferedLogger implements Logger {
public buffer: { method: keyof Logger; args?: any[] }[] = [];
constructor(private parent: Logger) {}
log(...messages: unknown[]) {
this.buffer.push({ method: 'log', args: messages });
}
debug(... | modernweb-dev/web/packages/test-runner-core/src/cli/BufferedLogger.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/cli/BufferedLogger.ts",
"repo_id": "modernweb-dev",
"token_count": 348
} | 213 |
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { TestSession, TestResultError } from '../test-session/TestSession.js';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { TestSchedul... | modernweb-dev/web/packages/test-runner-core/src/runner/TestSessionTimeoutHandler.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/runner/TestSessionTimeoutHandler.ts",
"repo_id": "modernweb-dev",
"token_count": 1334
} | 214 |
import { browserScript } from '@web/browser-logs';
export const trackBrowserLogs = `<script type="module">(function () {
${browserScript}
window.__wtr_browser_logs__.logs = [];
var types = ['log', 'debug', 'warn', 'error'];
types.forEach(function (type) {
var original = console[type];
console[type] = ... | modernweb-dev/web/packages/test-runner-core/src/server/plugins/trackBrowserLogs.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/server/plugins/trackBrowserLogs.ts",
"repo_id": "modernweb-dev",
"token_count": 248
} | 215 |
describe('suite a', () => {
it('test a 1', () => {});
it('test a 2', () => {
throw new Error('test a 2 error');
});
describe('suite b', () => {
it('test b 1', () => {});
it('test b 2', () => {});
});
});
it('test 1', () => {});
it('test 2', () => {
throw new Error('test 2 error');
});
| modernweb-dev/web/packages/test-runner-mocha/test/fixtures/autorun.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-mocha/test/fixtures/autorun.js",
"repo_id": "modernweb-dev",
"token_count": 126
} | 216 |
import playwright, { Browser, Page, LaunchOptions, BrowserContext } from 'playwright';
import { BrowserLauncher, TestRunnerCoreConfig, CoverageMapData } from '@web/test-runner-core';
import { PlaywrightLauncherPage } from './PlaywrightLauncherPage.js';
function capitalize(str: string) {
return `${str[0].toUpperCase(... | modernweb-dev/web/packages/test-runner-playwright/src/PlaywrightLauncher.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-playwright/src/PlaywrightLauncher.ts",
"repo_id": "modernweb-dev",
"token_count": 1701
} | 217 |
// this file is autogenerated with the generate-mjs-dts-entrypoints script
import cjsEntrypoint from './dist/index.js';
const { puppeteerLauncher } = cjsEntrypoint;
export { puppeteerLauncher };
| modernweb-dev/web/packages/test-runner-puppeteer/index.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-puppeteer/index.mjs",
"repo_id": "modernweb-dev",
"token_count": 63
} | 218 |
// this file is autogenerated with the generate-mjs-dts-entrypoints script
import cjsEntrypoint from './dist/index.js';
const { createSauceLabsLauncher } = cjsEntrypoint;
export { createSauceLabsLauncher };
| modernweb-dev/web/packages/test-runner-saucelabs/index.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-saucelabs/index.mjs",
"repo_id": "modernweb-dev",
"token_count": 69
} | 219 |
export default 'moduleFeaturesA';
| modernweb-dev/web/packages/test-runner-saucelabs/test-remote/fixtures/module-features-a.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-saucelabs/test-remote/fixtures/module-features-a.js",
"repo_id": "modernweb-dev",
"token_count": 8
} | 220 |
# Test Runner Visual Regression
Plugin for visual regression testing with Web Test Runner.
> This project is experimental. We are testing out different approaches and gathering feedback, let us know what you think and [join the discussion!](https://github.com/modernweb-dev/web/discussions/427).
## Usage
Install the... | modernweb-dev/web/packages/test-runner-visual-regression/README.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-visual-regression/README.md",
"repo_id": "modernweb-dev",
"token_count": 2606
} | 221 |
import fs from 'fs';
import { promisify } from 'util';
export const readFile = promisify(fs.readFile);
export const writeFile = promisify(fs.writeFile);
export const fsAccess = promisify(fs.access);
export async function fileExists(filePath: string) {
try {
await fsAccess(filePath);
return true;
} catch {... | modernweb-dev/web/packages/test-runner-visual-regression/src/fs.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-visual-regression/src/fs.ts",
"repo_id": "modernweb-dev",
"token_count": 117
} | 222 |
import { CoverageMapData } from '@web/test-runner-core';
export interface BrowserResult {
testCoverage?: CoverageMapData;
url: string;
}
export function validateBrowserResult(result: any): result is BrowserResult {
if (typeof result !== 'object') throw new Error('Browser did not return an object');
if (result... | modernweb-dev/web/packages/test-runner-webdriver/src/coverage.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-webdriver/src/coverage.ts",
"repo_id": "modernweb-dev",
"token_count": 131
} | 223 |
import selenium from 'selenium-standalone';
console.log('Installing Selenium...');
export async function runSelenium() {
await selenium.install({
drivers: {
chrome: { version: 'latest' },
firefox: { version: 'latest' },
},
});
return await selenium.start({
drivers: {
chrome: { ver... | modernweb-dev/web/packages/test-runner/demo/runSelenium.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/runSelenium.mjs",
"repo_id": "modernweb-dev",
"token_count": 148
} | 224 |
import { calledThrice, PublicClass } from './pass-coverage.js';
calledThrice();
const publicClass = new PublicClass();
publicClass.calledThrice();
| modernweb-dev/web/packages/test-runner/demo/test/pass-coverage-c.test.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/pass-coverage-c.test.js",
"repo_id": "modernweb-dev",
"token_count": 43
} | 225 |
import { b } from './b.js';
b();
| modernweb-dev/web/packages/test-runner/demo/test/virtual-files/b.test.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/virtual-files/b.test.js",
"repo_id": "modernweb-dev",
"token_count": 16
} | 226 |
import './shared-a.js';
| modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/pass-20.test.d.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/pass-20.test.d.ts",
"repo_id": "modernweb-dev",
"token_count": 10
} | 227 |
import { TestRunnerConfig } from './TestRunnerConfig.js';
const arrayKeys = ['plugins', 'middleware'];
export function mergeConfigs(...configs: Partial<TestRunnerConfig | undefined>[]) {
const finalConfig: any = {
plugins: [],
middleware: [],
};
for (const config of configs) {
if (config) {
f... | modernweb-dev/web/packages/test-runner/src/config/mergeConfigs.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/src/config/mergeConfigs.ts",
"repo_id": "modernweb-dev",
"token_count": 263
} | 228 |
import type {
BrowserLauncher,
Logger,
Reporter,
ReporterArgs,
TestSuiteResult,
} from '@web/test-runner-core';
import { reportTestsErrors } from './reportTestsErrors.js';
import { reportTestFileErrors } from './reportTestFileErrors.js';
import { reportBrowserLogs } from './reportBrowserLogs.js';
interface... | modernweb-dev/web/packages/test-runner/src/reporter/summaryReporter.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/src/reporter/summaryReporter.ts",
"repo_id": "modernweb-dev",
"token_count": 1192
} | 229 |
import fs from 'fs';
import { join, dirname, basename } from 'path';
import { fileURLToPath } from 'url';
import concurrently from 'concurrently';
import { green, red, yellow } from 'nanocolors';
export function runWorkspacesScripts({ script, concurrency, filteredPackages = [] }) {
const moduleDir = dirname(fileURLT... | modernweb-dev/web/scripts/runWorkspacesScripts.mjs/0 | {
"file_path": "modernweb-dev/web/scripts/runWorkspacesScripts.mjs",
"repo_id": "modernweb-dev",
"token_count": 833
} | 230 |
{
"name": "opendota-web",
"description": "Dota 2 Data Web UI",
"version": "1.0.1",
"private": true,
"license": "MIT",
"scripts": {
"start": "vite --host",
"start:install": "npm install && npm run lint && npm run start",
"preview": "vite preview --host",
"build": "vite build && npm run typech... | odota/web/package.json/0 | {
"file_path": "odota/web/package.json",
"repo_id": "odota",
"token_count": 2239
} | 231 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd">
<path fill="#fff" d="M640 480H0V0h640z"/>
<path fill="#df0000" d="M640 480H0V319.997h640zm0-319.875H0V.122h640z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/at.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/at.svg",
"repo_id": "odota",
"token_count": 121
} | 232 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd">
<path fill="#00cd00" d="M426.83 0H640v480H426.83z"/>
<path fill="#ff9a00" d="M0 0h212.88v480H0z"/>
<path fill="#fff" d="M212.88 0h213.95v480H212.88z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/ci.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/ci.svg",
"repo_id": "odota",
"token_count": 144
} | 233 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="red" d="M0 0h213.333v480H0z"/>
<path fill="#ff0" d="M213.333 0h213.333v480H213.333z"/>
<path fill="#090" d="M426.666 0H640v480H426.665z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/gn.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/gn.svg",
"repo_id": "odota",
"token_count": 147
} | 234 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="#fff" d="M0 0h639.995v480.004H0z"/>
<path fill="#009A49" d="M0 0h213.334v480.004H0z"/>
<path fill="#FF7900" d="M426.668 0h213.334v480.004H426.668z"/>
</g>
</svg>... | odota/web/public/assets/images/flags/ie.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/ie.svg",
"repo_id": "odota",
"token_count": 155
} | 235 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<path fill="#00a1de" d="M0 240h640v240H0z"/>
<path fill="#ed2939" d="M0 0h640v240H0z"/>
<path fill="#fff" d="M0 160h640v160H0z"/>
</svg>
| odota/web/public/assets/images/flags/lu.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/lu.svg",
"repo_id": "odota",
"token_count": 110
} | 236 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g stroke-width="1pt" fill-rule="evenodd">
<path fill="#fff" d="M0 0h640v480H0z"/>
<path fill="#00267f" d="M0 0h213.33v480H0z"/>
<path fill="#f31830" d="M426.67 0H640v480H426.67z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/mq.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/mq.svg",
"repo_id": "odota",
"token_count": 144
} | 237 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt" transform="scale(1.25 .9375)">
<rect rx="0" ry="0" height="509.76" width="512" fill="#fff"/>
<rect rx="0" ry="0" height="169.92" width="512" y="342.08" fill="#21468b"/>
<path f... | odota/web/public/assets/images/flags/nl.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/nl.svg",
"repo_id": "odota",
"token_count": 173
} | 238 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M-37.298 0h682.67v512h-682.67z"/>
</clipPath>
</defs>
<g fill-rule="evenodd" clip-path="url(#a)" transform="translate(34.967) scale(.9375)">
<path fill="#e... | odota/web/public/assets/images/flags/pr.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/pr.svg",
"repo_id": "odota",
"token_count": 361
} | 239 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M0 0h640v480H0z"/>
</clipPath>
</defs>
<g fill-rule="evenodd" clip-path="url(#a)">
<path fill="#fff" d="M-20 0h720v480H-20z"/>
<path fill="#df0000" d="... | odota/web/public/assets/images/flags/sg.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/sg.svg",
"repo_id": "odota",
"token_count": 686
} | 240 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M10 0h160v120H10z"/>
</clipPath>
</defs>
<g clip-path="url(#a)" fill-rule="evenodd" transform="matrix(4 0 0 4 -40 0)" stroke-width="1pt">
<path fill="#09f"... | odota/web/public/assets/images/flags/tz.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/tz.svg",
"repo_id": "odota",
"token_count": 291
} | 241 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="red" d="M0 0h640v480H0z"/>
<path fill="#00006b" d="M0 0h314.407v157.21H0z"/>
<g fill="#fff">
<path d="M162.77 144.4l-12.468-8.415-11.95 8.555 3.795-15.007-11... | odota/web/public/assets/images/flags/ws.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/ws.svg",
"repo_id": "odota",
"token_count": 509
} | 242 |
export default function transformRankings(json) {
return json;
}
| odota/web/src/actions/transformRankings.js/0 | {
"file_path": "odota/web/src/actions/transformRankings.js",
"repo_id": "odota",
"token_count": 18
} | 243 |
import darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import React, { Suspense } from 'react';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import... | odota/web/src/components/App/App.jsx/0 | {
"file_path": "odota/web/src/components/App/App.jsx",
"repo_id": "odota",
"token_count": 3295
} | 244 |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { patchDate } from '../../utility';
const setMapSizeStyle = (width, maxWidth) => ({
width,
height: width,
maxWidth,
maxHeight: maxWidth,
});
const dotaMaps = [
{ patch: '7.33', images: { jpg: '/asse... | odota/web/src/components/DotaMap/index.jsx/0 | {
"file_path": "odota/web/src/components/DotaMap/index.jsx",
"repo_id": "odota",
"token_count": 1117
} | 245 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import CheeseCircle from '../Cheese';
const Cheese = ({ strings }) => (
<div className="cheese">
<CheeseCircle />
<section>
<span style={{ fontSize: 'larger' }} >
{strings.app_donation_goal}
... | odota/web/src/components/Footer/Cheese.jsx/0 | {
"file_path": "odota/web/src/components/Footer/Cheese.jsx",
"repo_id": "odota",
"token_count": 275
} | 246 |
import styled from 'styled-components';
import constants from '../constants';
export const StyledDiv = styled.div`
margin-top: 15px;
margin-bottom: 4px;
margin-left: 3px;
&.top-heading {
width: 100vw;
margin: -57px -50vw 50px -50vw;
margin-top: 0px;
position: relative;
left: 50%;
right... | odota/web/src/components/Heading/Styled.jsx/0 | {
"file_path": "odota/web/src/components/Heading/Styled.jsx",
"repo_id": "odota",
"token_count": 1262
} | 247 |
import React from 'react';
import styled from 'styled-components';
import { shape } from 'prop-types';
import constants from '../constants';
import AttributesMain from './AttributesMain';
import Abilities from './Abilities';
import config from '../../config';
const getHeroImgSrc = (src) => config.VITE_IMAGE_CDN + src;... | odota/web/src/components/Hero/Header.jsx/0 | {
"file_path": "odota/web/src/components/Hero/Header.jsx",
"repo_id": "odota",
"token_count": 1245
} | 248 |
import Home from './Home';
export default Home;
| odota/web/src/components/Home/index.ts/0 | {
"file_path": "odota/web/src/components/Home/index.ts",
"repo_id": "odota",
"token_count": 14
} | 249 |
import React from 'react';
export default props => (
<svg {...props} viewBox="0 0 300 300">
<path
d="M150,4C67.3,4,0.3,71,0.3,153.7c0,66.1,42.9,122.2,102.4,142c7.5,1.4,10.2-3.2,10.2-7.2c0-3.6-0.1-13-0.2-25.5
c-41.6,9-50.4-20.1-50.4-20.1c-6.8-17.3-16.6-21.9-16.6-21.9c-13.6-9.3,1-9.1,1-9.1c15,1.1,22.9,... | odota/web/src/components/Icons/Github.jsx/0 | {
"file_path": "odota/web/src/components/Icons/Github.jsx",
"repo_id": "odota",
"token_count": 634
} | 250 |
export { default as IconCheese } from './Cheese';
export { default as IconSteam } from './Steam';
export { default as IconGithub } from './Github';
export { default as IconTwitter } from './Twitter';
export { default as IconDiscord } from './Discord';
export { default as IconTrophy } from './Trophy';
export { default a... | odota/web/src/components/Icons/index.js/0 | {
"file_path": "odota/web/src/components/Icons/index.js",
"repo_id": "odota",
"token_count": 383
} | 251 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { List } from 'react-content-loader';
import TabbedContent from '../TabbedContent';
import { getMatch } from '../../actions';
import MatchHeader from './MatchHeader';
import ma... | odota/web/src/components/Match/Match.jsx/0 | {
"file_path": "odota/web/src/components/Match/Match.jsx",
"repo_id": "odota",
"token_count": 916
} | 252 |
import React from 'react';
import PropTypes from 'prop-types';
import Checkbox from 'material-ui/Checkbox';
import Table from '../../Table';
import Heading from '../../Heading';
import PlayerThumb from '../PlayerThumb';
import config from '../../../config';
const data = [
{
type: 'observer',
image: <img hei... | odota/web/src/components/Match/Vision/VisionFilter.jsx/0 | {
"file_path": "odota/web/src/components/Match/Vision/VisionFilter.jsx",
"repo_id": "odota",
"token_count": 1231
} | 253 |
import React from 'react';
export default () => (
<div
style={{ backgroundImage: 'url(/assets/images/logo.png)' }}
/>
);
| odota/web/src/components/Player/Header/AppBadge.jsx/0 | {
"file_path": "odota/web/src/components/Player/Header/AppBadge.jsx",
"repo_id": "odota",
"token_count": 47
} | 254 |
const playerItemsColumns = strings => ([{
displayName: 'Name',
tooltip: strings.items_name,
field: 'name',
width: 1,
}]);
export default playerItemsColumns;
// "items_built"
// "items_matches": "Number of matches where this item was built",
// "items_uses": "Number of times this item was used",
// "items_uses... | odota/web/src/components/Player/Pages/Items/playerItemsColumns.jsx/0 | {
"file_path": "odota/web/src/components/Player/Pages/Items/playerItemsColumns.jsx",
"repo_id": "odota",
"token_count": 185
} | 255 |
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Card from './Card';
import { getPlayerTotals } from '../../../../actions';
import Container from '../../../Container';
const CardContainer = styled.div`
display: flex;
... | odota/web/src/components/Player/Pages/Totals/Totals.jsx/0 | {
"file_path": "odota/web/src/components/Player/Pages/Totals/Totals.jsx",
"repo_id": "odota",
"token_count": 986
} | 256 |
import Request from './Request';
export default Request;
| odota/web/src/components/Request/index.js/0 | {
"file_path": "odota/web/src/components/Request/index.js",
"repo_id": "odota",
"token_count": 14
} | 257 |
import React from 'react';
import ContentLoader from 'react-content-loader';
const MatchupsSkeleton = props => (
<ContentLoader
primaryColor="#666"
secondaryColor="#ecebeb"
width={400}
animate
{...props}
>
<rect x="0" y="10" rx="5" ry="5" width="300" height="5" />
<rect x="0" y="25" rx=... | odota/web/src/components/Skeletons/MatchupsSkeleton.jsx/0 | {
"file_path": "odota/web/src/components/Skeletons/MatchupsSkeleton.jsx",
"repo_id": "odota",
"token_count": 263
} | 258 |
import React from 'react';
import { connect } from 'react-redux';
import styled from 'styled-components';
import FlatButton from 'material-ui/FlatButton';
import Next from 'material-ui/svg-icons/hardware/keyboard-arrow-right';
import Prev from 'material-ui/svg-icons/hardware/keyboard-arrow-left';
import constants from ... | odota/web/src/components/Table/PaginatedTable/Pagination.jsx/0 | {
"file_path": "odota/web/src/components/Table/PaginatedTable/Pagination.jsx",
"repo_id": "odota",
"token_count": 2037
} | 259 |
import React from 'react';
import Container from '../Container';
import Table from '../Table';
import Overview from './Overview';
import { matchColumns, memberColumns, heroColumns } from './teamDataColumns';
const teamPages = strings => [Overview(strings), {
name: strings.tab_matches,
key: 'matches',
content: (g... | odota/web/src/components/Team/teamPages.jsx/0 | {
"file_path": "odota/web/src/components/Team/teamPages.jsx",
"repo_id": "odota",
"token_count": 815
} | 260 |
import React from 'react';
import PropTypes from 'prop-types';
import { gradient } from 'abcolor';
import { StyledContainer, PercentContainer, TitleContainer } from './Styled';
import constants from '../../constants';
const Percent = ({
percent, altValue, valEl, inverse = false,
}) => (
<StyledContainer>
<Titl... | odota/web/src/components/Visualizations/Table/Percent.jsx/0 | {
"file_path": "odota/web/src/components/Visualizations/Table/Percent.jsx",
"repo_id": "odota",
"token_count": 411
} | 261 |
{
"yes": "sim",
"no": "não",
"abbr_thousand": "k",
"abbr_million": "m",
"abbr_billion": "b",
"abbr_trillion": "t",
"abbr_quadrillion": "q",
"abbr_not_available": "N/D",
"abbr_pick": "P",
"abbr_win": "V",
"abbr_number": "Nº.",
"analysis_eff": "Eficiência",
"analysis_farm_drought": "Menor OPM no... | odota/web/src/lang/pt-BR.json/0 | {
"file_path": "odota/web/src/lang/pt-BR.json",
"repo_id": "odota",
"token_count": 21714
} | 262 |
import { requestActions } from '../actions/requestActions';
const initialState = {
progress: 0,
error: '',
loading: false,
};
export default (state = initialState, action) => {
switch (action.type) {
case requestActions.START:
return {
...state,
loading: true,
};
case reque... | odota/web/src/reducers/request.js/0 | {
"file_path": "odota/web/src/reducers/request.js",
"repo_id": "odota",
"token_count": 264
} | 263 |
{
"tracked_until": null,
"profile": {
"account_id": 101695162,
"personaname": "Mbappé",
"name": "fy",
"cheese": 0,
"steamid": "76561198061960890",
"avatar": "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/avatars/71/7137bb86c5fdbd79bd37222438a7b903f87fbbc3.jpg",
"avatarmedium": "htt... | odota/web/testcafe/cachedAjax/players_101695162_.json/0 | {
"file_path": "odota/web/testcafe/cachedAjax/players_101695162_.json",
"repo_id": "odota",
"token_count": 381
} | 264 |
{
"win": 3747,
"lose": 2328
} | odota/web/testcafe/cachedAjax/players_101695162_wl_.json/0 | {
"file_path": "odota/web/testcafe/cachedAjax/players_101695162_wl_.json",
"repo_id": "odota",
"token_count": 19
} | 265 |
[
{
"match_id": "4095440370",
"start_time": "1535849203",
"hero_id": "36",
"score": "1645"
},
{
"match_id": "4095440370",
"start_time": "1535849203",
"hero_id": "67",
"score": "1592"
},
{
"match_id": "4093423096",
"start_time": "1535763309",
"hero_id": "82",
"score": "1569"
},
{
"match_... | odota/web/testcafe/cachedAjax/records_xp_per_min_.json/0 | {
"file_path": "odota/web/testcafe/cachedAjax/records_xp_per_min_.json",
"repo_id": "odota",
"token_count": 5567
} | 266 |
FROM node:16-alpine AS deps
RUN apk add --no-cache libc6-compat git
WORKDIR /app
COPY frontend/package.json frontend/yarn.lock ./frontend/
RUN cd frontend && yarn install --frozen-lockfile
FROM node:16-alpine AS builder
RUN apk add --no-cache git
WORKDIR /app
# Copy everything
COPY . .
COPY --from=deps /app/frontend/... | openmultiplayer/web/Dockerfile.frontend/0 | {
"file_path": "openmultiplayer/web/Dockerfile.frontend",
"repo_id": "openmultiplayer",
"token_count": 275
} | 267 |
package server
import (
"context"
"os"
"strings"
"time"
"github.com/goccy/go-json"
"github.com/pkg/errors"
"go.uber.org/zap"
"github.com/openmultiplayer/web/internal/config"
"github.com/openmultiplayer/web/internal/db"
)
var _ Repository = &DB{}
type DB struct {
client *db.PrismaClient
cfg config.Con... | openmultiplayer/web/app/resources/server/db.go/0 | {
"file_path": "openmultiplayer/web/app/resources/server/db.go",
"repo_id": "openmultiplayer",
"token_count": 2954
} | 268 |
package scraper
import (
"context"
"github.com/openmultiplayer/web/app/resources/server"
)
type Scraper interface {
Scrape(context.Context, []string) chan server.All
}
type MockScraper struct{}
func (s *MockScraper) Scrape(ctx context.Context, addresses []string) chan server.All {
ch := make(chan server.All)
... | openmultiplayer/web/app/services/scraper/scraper.go/0 | {
"file_path": "openmultiplayer/web/app/services/scraper/scraper.go",
"repo_id": "openmultiplayer",
"token_count": 604
} | 269 |
package pawndex
import (
"github.com/go-chi/chi"
"go.uber.org/fx"
"github.com/openmultiplayer/web/app/resources/pawndex"
)
type service struct {
store pawndex.Repository
}
func Build() fx.Option {
return fx.Options(
fx.Provide(func(repo pawndex.Repository) *service { return &service{repo} }),
fx.Invoke(fun... | openmultiplayer/web/app/transports/api/pawndex/api.go/0 | {
"file_path": "openmultiplayer/web/app/transports/api/pawndex/api.go",
"repo_id": "openmultiplayer",
"token_count": 260
} | 270 |
package users
import (
"errors"
"net/http"
"github.com/go-chi/chi"
"github.com/openmultiplayer/web/app/services/authentication"
"github.com/openmultiplayer/web/internal/db"
"github.com/openmultiplayer/web/internal/web"
)
func (s *service) get(w http.ResponseWriter, r *http.Request) {
id := chi.URLParam(r, "i... | openmultiplayer/web/app/transports/api/users/h_get.go/0 | {
"file_path": "openmultiplayer/web/app/transports/api/users/h_get.go",
"repo_id": "openmultiplayer",
"token_count": 327
} | 271 |
---
title: Contributing
description: How to contribute to the SA-MP Wiki and open.mp documentation.
---
This documentation source is open for anyone to contribute changes to! All you need is a [GitHub](https://github.com) account and some spare time. You don't even need to know Git, you can do it all from the web inte... | openmultiplayer/web/docs/meta/Contributing.md/0 | {
"file_path": "openmultiplayer/web/docs/meta/Contributing.md",
"repo_id": "openmultiplayer",
"token_count": 2712
} | 272 |
---
title: OnNPCModeExit
description: This callback is called when a NPC script unloaded.
tags: ["npc"]
---
## Description
This callback is called when a NPC script unloaded.
## Examples
```c
public OnNPCModeExit()
{
print("NPC script unloaded");
return 1;
}
```
## Related Callbacks
The following callba... | openmultiplayer/web/docs/scripting/callbacks/OnNPCModeExit.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/callbacks/OnNPCModeExit.md",
"repo_id": "openmultiplayer",
"token_count": 146
} | 273 |
---
title: OnPlayerEditAttachedObject
description: This callback is called when a player ends attached object edition mode.
tags: ["player", "object", "attachment"]
---
## Description
This callback is called when a player ends attached object edition mode.
| Name | Description ... | openmultiplayer/web/docs/scripting/callbacks/OnPlayerEditAttachedObject.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/callbacks/OnPlayerEditAttachedObject.md",
"repo_id": "openmultiplayer",
"token_count": 1616
} | 274 |
---
title: OnPlayerLeavePlayerGangZone
description: This callback is called when a player exited a player gangzone
tags: ["player", "gangzone"]
---
<VersionWarn version='omp v1.1.0.2612' />
## Description
This callback is called when a player exited a player gangzone.
| Name | Description ... | openmultiplayer/web/docs/scripting/callbacks/OnPlayerLeavePlayerGangZone.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/callbacks/OnPlayerLeavePlayerGangZone.md",
"repo_id": "openmultiplayer",
"token_count": 460
} | 275 |
---
title: OnVehicleSpawn
description: This callback is called when a vehicle respawns.
tags: ["vehicle"]
---
:::warning
This callback is called **only** when vehicle **re**spawns! CreateVehicle and AddStaticVehicle(Ex) **won't** trigger this callback.
:::
## Description
This callback is called when a vehicle resp... | openmultiplayer/web/docs/scripting/callbacks/OnVehicleSpawn.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/callbacks/OnVehicleSpawn.md",
"repo_id": "openmultiplayer",
"token_count": 398
} | 276 |
---
title: AllowNickNameCharacter
description: Allows a character to be used in the nick name.
tags: []
---
<VersionWarn version='omp v1.1.0.2612' />
## Description
Allows a character to be used in the nick name.
| Name | Description |
| ---------- | -----------------------------------... | openmultiplayer/web/docs/scripting/functions/AllowNickNameCharacter.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/AllowNickNameCharacter.md",
"repo_id": "openmultiplayer",
"token_count": 336
} | 277 |
---
title: AttachPlayerObjectToPlayer
description: The same as AttachObjectToPlayer but for objects which were created for player.
tags: ["player", "object", "playerobject"]
---
## Description
The same as [AttachObjectToPlayer](AttachObjectToPlayer) but for objects which were created for player.
| Name | ... | openmultiplayer/web/docs/scripting/functions/AttachPlayerObjectToPlayer.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/AttachPlayerObjectToPlayer.md",
"repo_id": "openmultiplayer",
"token_count": 1146
} | 278 |
---
title: ChatTextReplacementToggled
description: Checks if the chat input filtering is enabled or disabled.
tags: []
---
<VersionWarn version='omp v1.1.0.2612' />
## Description
Checks if the chat input filtering is enabled or disabled.
## Returns
true: Enable.
false: Disable.
## Examples
```c
printf("Chat in... | openmultiplayer/web/docs/scripting/functions/ChatTextReplacementToggled.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/ChatTextReplacementToggled.md",
"repo_id": "openmultiplayer",
"token_count": 154
} | 279 |
---
title: CreatePlayerObject
description: Creates an object which will be visible to only one player.
tags: ["player", "object", "playerobject"]
---
## Description
Creates an object which will be visible to only one player.
| Name | Description ... | openmultiplayer/web/docs/scripting/functions/CreatePlayerObject.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/CreatePlayerObject.md",
"repo_id": "openmultiplayer",
"token_count": 2469
} | 280 |
---
title: DisableInteriorEnterExits
description: Disable all the interior entrances and exits in the game (the yellow arrows at doors).
tags: ["interior"]
---
## Description
Disable all the interior entrances and exits in the game (the yellow arrows at doors).
## Examples
```c
public OnGameModeInit()
{
Disable... | openmultiplayer/web/docs/scripting/functions/DisableInteriorEnterExits.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/DisableInteriorEnterExits.md",
"repo_id": "openmultiplayer",
"token_count": 295
} | 281 |
---
title: EnableVehicleFriendlyFire
description: Enable friendly fire for team vehicles.
tags: ["vehicle"]
---
## Description
Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!).
## Examples
```c
public OnGameModeInit()
{
EnableVehicleFrien... | openmultiplayer/web/docs/scripting/functions/EnableVehicleFriendlyFire.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/EnableVehicleFriendlyFire.md",
"repo_id": "openmultiplayer",
"token_count": 124
} | 282 |
---
title: GangZoneHideForAll
description: GangZoneHideForAll hides a gangzone from all players.
tags: ["gangzone"]
---
## Description
GangZoneHideForAll hides a gangzone from all players.
| Name | Description |
| ------ | ----------------- |
| zoneid | The zone to hide. |
## Returns
This function does not... | openmultiplayer/web/docs/scripting/functions/GangZoneHideForAll.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GangZoneHideForAll.md",
"repo_id": "openmultiplayer",
"token_count": 486
} | 283 |
---
title: GetActorHealth
description: Get the health of an actor.
tags: ["actor"]
---
<VersionWarn version='SA-MP 0.3.7' />
## Description
Get the health of an actor.
| Name | Description |
| ------------- | ------------------------------... | openmultiplayer/web/docs/scripting/functions/GetActorHealth.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GetActorHealth.md",
"repo_id": "openmultiplayer",
"token_count": 509
} | 284 |
---
title: GetGravity
description: Get the currently global gravity.
tags: []
---
## Description
Get the currently global gravity.
## Examples
**SA-MP server:**
```c
#include <a_samp>
#if !defined GetGravity
native Float:GetGravity();
#endif
public OnGameModeInit()
{
printf("Current gravity: %f", GetGrav... | openmultiplayer/web/docs/scripting/functions/GetGravity.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GetGravity.md",
"repo_id": "openmultiplayer",
"token_count": 277
} | 285 |
---
title: GetObjectMaterialText
description: Get the material text data from an index of the object.
tags: ["object"]
---
<VersionWarn version='omp v1.1.0.2612' />
## Description
Get the material text data from an index of the object.
| Name | Description ... | openmultiplayer/web/docs/scripting/functions/GetObjectMaterialText.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GetObjectMaterialText.md",
"repo_id": "openmultiplayer",
"token_count": 1476
} | 286 |
---
title: GetPickupPos
description: Gets the coordinates of a pickup.
tags: ["pickup"]
---
<VersionWarn version='omp v1.1.0.2612' />
## Description
Gets the coordinates of a pickup.
| Name | Description |
|----------|--------------------------------... | openmultiplayer/web/docs/scripting/functions/GetPickupPos.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GetPickupPos.md",
"repo_id": "openmultiplayer",
"token_count": 819
} | 287 |
---
title: GetPlayerAnimationIndex
description: Returns the index of any running applied animations.
tags: ["player", "animation"]
---
## Description
Returns the index of any running applied animations.
| Name | Description |
| -------- | ---------------------... | openmultiplayer/web/docs/scripting/functions/GetPlayerAnimationIndex.md/0 | {
"file_path": "openmultiplayer/web/docs/scripting/functions/GetPlayerAnimationIndex.md",
"repo_id": "openmultiplayer",
"token_count": 411
} | 288 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.