repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
Automattic/mongoose
https://github.com/Automattic/mongoose/blob/f5bfdb54182a1d1bbb5cea6aab87f523713d237c/lib/schema/operators/helpers.js
lib/schema/operators/helpers.js
'use strict'; /*! * Module requirements. */ const SchemaNumber = require('../number'); /*! * ignore */ exports.castToNumber = castToNumber; exports.castArraysOfNumbers = castArraysOfNumbers; /*! * ignore */ function castToNumber(val) { return SchemaNumber.cast()(val); } function castArraysOfNumbers(arr, ...
javascript
MIT
f5bfdb54182a1d1bbb5cea6aab87f523713d237c
2026-01-04T15:02:29.296852Z
false
Automattic/mongoose
https://github.com/Automattic/mongoose/blob/f5bfdb54182a1d1bbb5cea6aab87f523713d237c/lib/schema/operators/text.js
lib/schema/operators/text.js
'use strict'; const CastError = require('../../error/cast'); const castBoolean = require('../../cast/boolean'); const castString = require('../../cast/string'); /** * Casts val to an object suitable for `$text`. Throws an error if the object * can't be casted. * * @param {Any} val value to cast * @param {String}...
javascript
MIT
f5bfdb54182a1d1bbb5cea6aab87f523713d237c
2026-01-04T15:02:29.296852Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/make.js
make.js
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run --allow-sys // Usage: ./make.js command. Use -l to list commands. // This is a set of tasks for building and testing Vimium in development. import * as fs from "@std/fs"; import * as path from "@std/path"; import { abort, desc, ru...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/marks.js
content_scripts/marks.js
const Marks = { previousPositionRegisters: ["`", "'"], localRegisters: {}, currentRegistryEntry: null, mode: null, exit(continuation = null) { if (this.mode != null) { this.mode.exit(); } this.mode = null; if (continuation) { return continuation(); // TODO(philc): Is this return n...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/link_hints.js
content_scripts/link_hints.js
// // This implements link hinting. Typing "F" will enter link-hinting mode, where all clickable items // on the page have a hint marker displayed containing a sequence of letters. Typing those letters // will select a link. // // In our 'default' mode, the characters we use to show link hints are a user-configurable o...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
true
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/scroller.js
content_scripts/scroller.js
// activatedElement is different from document.activeElement -- the latter seems to be reserved // mostly for input elements. This mechanism allows us to decide whether to scroll a div or to // scroll the whole document. let activatedElement = null; // Previously, the main scrolling element was document.body. If the "...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode_normal.js
content_scripts/mode_normal.js
class NormalMode extends KeyHandlerMode { init(options) { if (options == null) { options = {}; } const defaults = { name: "normal", indicator: false, // There is normally no mode indicator in normal mode. commandHandler: this.commandHandler.bind(this), }; super.init(Objec...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/hud.js
content_scripts/hud.js
// // A heads-up-display (HUD) for showing Vimium page operations. // Note: you cannot interact with the HUD until document.body is available. // const HUD = { tween: null, hudUI: null, findMode: null, abandon() { if (this.hudUI) { this.hudUI.hide(false); } }, // Set by @pasteFromClipboard to...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/vomnibar.js
content_scripts/vomnibar.js
// // This wraps the vomnibar iframe, which we inject into the page to provide the vomnibar. // const Vomnibar = { vomnibarUI: null, // sourceFrameId here (and below) is the ID of the frame from which this request originates, which // may be different from the current frame. activate(sourceFrameId, registryEn...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode_key_handler.js
content_scripts/mode_key_handler.js
// Example key mapping (@keyMapping): // i: // command: "enterInsertMode", ... # This is a registryEntry object (as too are the other commands). // g: // g: // command: "scrollToTop", ... // t: // command: "nextTab", ... // // This key-mapping structure is generated by Commands.installKeySta...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode_visual.js
content_scripts/mode_visual.js
// Symbolic names for some common strings. const forward = "forward"; const backward = "backward"; const character = "character"; const word = "word"; const line = "line"; const sentence = "sentence"; const vimword = "vimword"; const lineboundary = "lineboundary"; // This implements various selection movements. class ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode.js
content_scripts/mode.js
// // A mode implements a number of keyboard (and possibly other) event handlers which are pushed onto // the handler stack when the mode is activated, and popped off when it is deactivated. The Mode // class constructor takes a single argument "options" which can define (amongst other things): // // name: // A name ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode_insert.js
content_scripts/mode_insert.js
class InsertMode extends Mode { constructor(options) { super(); if (options == null) { options = {}; } // There is one permanently-installed instance of InsertMode. It tracks focus changes and // activates/deactivates itself (by setting @insertModeLock) accordingly. this.permanent = opt...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/vimium_frontend.js
content_scripts/vimium_frontend.js
// // This content script must be run prior to domReady so that we perform some operations very early. // let isEnabledForUrl = true; let normalMode = null; // This is set by initializeFrame. We can only get this frame's ID from the background page. globalThis.frameId = null; // We track whther the current window ha...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/mode_find.js
content_scripts/mode_find.js
// NOTE(smblott). Ultimately, all of the FindMode-related code should be moved here. // This prevents unmapped printable characters from being passed through to underlying page; see // #1415. Only used by PostFindMode, below. class SuppressPrintable extends Mode { constructor(options) { super(); super.init(o...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/content_scripts/ui_component.js
content_scripts/ui_component.js
// A UIComponent is an iframe containing a Vimium extension page, like the Vomnibar. This class // provides methods that content scripts can use to interact with that page: // - show // - hide // - postMessage // // When the iframe has not yet been loaded, all messages will be queued until it's done loading. The // pag...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/vendor/shoulda.js
tests/vendor/shoulda.js
/* * A unit testing micro framework. Tests are grouped into "contexts", each of which can share common * setup and teardown functions. */ /* * Assertions. */ const assert = { isTrue(value) { if (!value) { this.fail("Expected true, but got " + value); } }, isFalse(value) { if (value) { ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/main_test.js
tests/unit_tests/main_test.js
import "./test_helper.js"; import "../../lib/settings.js"; import "../../background_scripts/main.js"; import { RegistryEntry } from "../../background_scripts/commands.js"; context("HintCoordinator", () => { should("prepareToActivateLinkHintsMode", async () => { let receivedMessages = []; const frameIdToHintD...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/vomnibar_page_test.js
tests/unit_tests/vomnibar_page_test.js
import * as testHelper from "./test_helper.js"; import "../../tests/unit_tests/test_chrome_stubs.js"; import { Suggestion } from "../../background_scripts/completion.js"; import * as vomnibarPage from "../../pages/vomnibar_page.js"; function newKeyEvent(properties) { return Object.assign( { type: "keydown"...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/tab_operations_test.js
tests/unit_tests/tab_operations_test.js
import "./test_helper.js"; import "../../lib/settings.js"; import * as to from "../../background_scripts/tab_operations.js"; context("TabOperations openurlInCurrentTab", () => { should("open a regular URL", async () => { let url = null; stub(chrome.tabs, "update", (id, args) => { url = args.url; })...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/handler_stack_test.js
tests/unit_tests/handler_stack_test.js
import "./test_helper.js"; import "../../lib/handler_stack.js"; context("handlerStack", () => { let handlerStack, handler1Called, handler2Called; setup(() => { stub(globalThis, "DomUtils", {}); stub(DomUtils, "consumeKeyup", () => {}); stub(DomUtils, "suppressEvent", () => {}); stub(DomUtils, "sup...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/settings_test.js
tests/unit_tests/settings_test.js
import "./test_helper.js"; import "../../lib/settings.js"; context("settings", () => { context("v2.0 migration", () => { setup(async () => { // Prior to Vimium 2.0.0, the settings values were encoded as JSON strings. await chrome.storage.sync.set({ scrollStepSize: JSON.stringify(123) }); }); ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/hud_page_test.js
tests/unit_tests/hud_page_test.js
import * as testHelper from "./test_helper.js"; import "../../tests/unit_tests/test_chrome_stubs.js"; import * as hudPage from "../../pages/hud_page.js"; import * as UIComponentMessenger from "../../pages/ui_component_messenger.js"; function newKeyEvent(properties) { return Object.assign( { type: "keydown"...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/url_utils_test.js
tests/unit_tests/url_utils_test.js
import "./test_helper.js"; import "../../lib/settings.js"; import "../../lib/url_utils.js"; context("isUrl", () => { should("accept valid URLs", async () => { assert.isTrue(await UrlUtils.isUrl("www.google.com")); assert.isTrue(await UrlUtils.isUrl("www.bbc.co.uk")); assert.isTrue(await UrlUtils.isUrl("y...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/rect_test.js
tests/unit_tests/rect_test.js
import "./test_helper.js"; import "../../lib/rect.js"; context("Rect", () => { should("set rect properties correctly", () => { const [x1, y1, x2, y2] = [1, 2, 3, 4]; const rect = Rect.create(x1, y1, x2, y2); assert.equal(rect.left, x1); assert.equal(rect.top, y1); assert.equal(rect.right, x2); ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/help_dialog_test.js
tests/unit_tests/help_dialog_test.js
import * as testHelper from "./test_helper.js"; import "../../tests/unit_tests/test_chrome_stubs.js"; import "../../background_scripts/completion.js"; import { allCommands } from "../../background_scripts/all_commands.js"; import { HelpDialogPage } from "../../pages/help_dialog_page.js"; context("help dialog", () => {...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/command_listing_test.js
tests/unit_tests/command_listing_test.js
import * as testHelper from "./test_helper.js"; import "../../tests/unit_tests/test_chrome_stubs.js"; import "../../lib/utils.js"; import "../../lib/settings.js"; import { allCommands } from "../../background_scripts/all_commands.js"; import * as commandListing from "../../pages/command_listing.js"; context("command l...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/completion_engines_test.js
tests/unit_tests/completion_engines_test.js
import "./test_helper.js"; import "../../background_scripts/bg_utils.js"; import * as Engines from "../../background_scripts/completion_engines.js"; import "../../background_scripts/completion.js"; context("Amazon completion", () => { should("parses results", () => { const response = JSON.stringify({ "sugg...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/ui_component_test.js
tests/unit_tests/ui_component_test.js
import * as testHelper from "./test_helper.js"; import "../../lib/utils.js"; import "../../lib/dom_utils.js"; import "../../content_scripts/ui_component.js"; function stubPostMessage(iframeEl, fn) { if (!iframeEl || !fn) throw new Error("iframeEl and fn are required."); Object.defineProperty(iframeEl, "contentWind...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/exclusion_test.js
tests/unit_tests/exclusion_test.js
import "./test_helper.js"; Utils.getCurrentVersion = () => "1.44"; import "../../lib/settings.js"; import "../../background_scripts/bg_utils.js"; import * as exclusions from "../../background_scripts/exclusions.js"; import "../../background_scripts/commands.js"; const isEnabledForUrl = (request) => exclusions.isEnab...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/completion_engines_page_test.js
tests/unit_tests/completion_engines_page_test.js
import * as testHelper from "./test_helper.js"; import "../../tests/unit_tests/test_chrome_stubs.js"; import "../../lib/utils.js"; import "../../lib/settings.js"; import * as completionEngines from "../../background_scripts/completion_engines.js"; import * as page from "../../pages/doc_completion_engines.js"; context(...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/test_chrome_stubs.js
tests/unit_tests/test_chrome_stubs.js
// // This file contains stubs for a number of browser and chrome APIs which are missing in Deno. // // There are 3 chrome.storage.* objects with identical APIs. // - areaName: one of "local", "sync", "session". const createStorageAPI = (areaName) => { const storage = { store: {}, async set(items) { l...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/bg_utils_test.js
tests/unit_tests/bg_utils_test.js
import "./test_helper.js"; import "../../lib/url_utils.js"; import "../../background_scripts/tab_recency.js"; import "../../background_scripts/bg_utils.js";
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/utils_test.js
tests/unit_tests/utils_test.js
import "./test_helper.js"; import "../../lib/settings.js"; import "../../lib/url_utils.js"; context("forTrusted", () => { should("invoke an event handler if the event is trusted", () => { let called = false; const f = forTrusted(() => called = true); const event = { isTrusted: true }; f(event); a...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/marks_test.js
tests/unit_tests/marks_test.js
import "./test_helper.js"; import * as marks from "../../background_scripts/marks.js"; context("marks", () => { const createMark = async (markProperties, tabProperties) => { const mark = Object.assign({ scrollX: 0, scrollY: 0 }, markProperties); const tab = Object.assign({ url: "http://example.com" }, tabPro...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/commands_test.js
tests/unit_tests/commands_test.js
import "./test_helper.js"; import "../../lib/settings.js"; import "../../lib/keyboard_utils.js"; import { allCommands } from "../../background_scripts/all_commands.js"; import { Commands, defaultKeyMappings, KeyMappingsParser, parseLines, } from "../../background_scripts/commands.js"; import "../../content_scri...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/tab_recency_test.js
tests/unit_tests/tab_recency_test.js
import "./test_helper.js"; import { TabRecency } from "../../background_scripts/tab_recency.js"; context("TabRecency", () => { let tabRecency; setup(() => tabRecency = new TabRecency()); context("order", () => { setup(async () => { stub(chrome.tabs, "query", () => Promise.resolve([])); await ta...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/user_search_engines_test.js
tests/unit_tests/user_search_engines_test.js
import "./test_helper.js"; import * as userSearchEngines from "../../background_scripts/user_search_engines.js"; import { UserSearchEngine } from "../../background_scripts/user_search_engines.js"; context("UserSearchEngines", () => { should("parse out search engine text", () => { const config = [ "g: http...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/test_helper.js
tests/unit_tests/test_helper.js
import * as shoulda from "../vendor/shoulda.js"; import * as jsdom from "jsdom"; import "./test_chrome_stubs.js"; import "../../lib/utils.js"; const shouldaSubset = { assert: shoulda.assert, context: shoulda.context, ensureCalled: shoulda.ensureCalled, setup: shoulda.setup, should: shoulda.should, shoulda:...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/link_hints_test.js
tests/unit_tests/link_hints_test.js
import "./test_helper.js"; import "../../lib/keyboard_utils.js"; import "../../lib/settings.js"; import "../../content_scripts/mode.js"; import "../../content_scripts/link_hints.js"; context("With insufficient link characters", () => { setup(async () => { await Settings.onLoaded(); }); teardown(async () => ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/unit_tests/completion_test.js
tests/unit_tests/completion_test.js
import "./test_helper.js"; import "../../background_scripts/tab_recency.js"; import "../../background_scripts/bg_utils.js"; import "../../background_scripts/completion_engines.js"; import "../../background_scripts/completion_search.js"; import * as userSearchEngines from "../../background_scripts/user_search_engines.js...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/dom_tests/dom_tests.js
tests/dom_tests/dom_tests.js
let commandCount = null; let commandName = null; // Some tests have side effects on the handler stack and the active mode, so these are reset on // setup. Also, some tests affect the focus (e.g. Vomnibar tests), so we make sure the window has // the focus. const initializeModeState = () => { globalThis.focus(); Mo...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
true
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/dom_tests/dom_test_setup.js
tests/dom_tests/dom_test_setup.js
globalThis.vimiumDomTestsAreRunning = true; import * as shoulda from "../vendor/shoulda.js"; // Attach shoulda's functions -- like setup, context, should -- to the global namespace. Object.assign(globalThis, shoulda); globalThis.shoulda = shoulda; document.addEventListener("DOMContentLoaded", async () => { isEnabl...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/tests/dom_tests/dom_utils_test.js
tests/dom_tests/dom_utils_test.js
context("Check visibility", () => { should("detect visible elements as visible", () => { document.getElementById("test-div").innerHTML = `\ <div id='foo'>test</div>`; assert.isTrue((DomUtils.getVisibleClientRect(document.getElementById("foo"), true)) !== null); }); should("detect display:none links...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/all_content_scripts.js
pages/all_content_scripts.js
// This is the set of all content scripts required to make Vimium's functionality work. This file is // imported by background pages that we want to work with Vimium's key mappings, e.g. the options // page. This should be the same list of files as in manifest.js's content_scripts section. import "../lib/types.js"; im...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/command_listing.js
pages/command_listing.js
import "./all_content_scripts.js"; import { allCommands } from "../background_scripts/all_commands.js"; // The ordering we show key bindings is alphanumerical, except that special keys sort to the end. function compareKeys(a, b) { a = a.replace("<", "~"); b = b.replace("<", "~"); if (a < b) { return -1; } ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/vomnibar_page.js
pages/vomnibar_page.js
// // This controls the contents of the Vomnibar iframe. We use an iframe to avoid changing the // selection on the page (useful for bookmarklets), ensure that the Vomnibar style is unaffected by // the page, and simplify key handling in vimium_frontend.js // import "../lib/types.js"; import "../lib/utils.js"; import ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/ui_component_messenger.js
pages/ui_component_messenger.js
// // These are functions for a page in a UIComponent iframe to communicate to its parent frame. // let ownerPagePort = null; let handleMessage = null; export async function registerPortWithOwnerPage(event) { if (event.source !== globalThis.parent) return; // The Vimium content script that's running on the parent...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/doc_completion_engines.js
pages/doc_completion_engines.js
import "./all_content_scripts.js"; import * as completionEngines from "../background_scripts/completion_engines.js"; function cleanUpRegexp(re) { return re.toString() .replace(/^\//, "") .replace(/\/$/, "") .replace(/\\\//g, "/"); } export function populatePage() { const template = document.querySelec...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/hud_page.js
pages/hud_page.js
import "../lib/chrome_api_stubs.js"; import "../lib/utils.js"; import "../lib/dom_utils.js"; import "../lib/settings.js"; import "../lib/keyboard_utils.js"; import "../lib/find_mode_history.js"; import * as UIComponentMessenger from "./ui_component_messenger.js"; let findMode = null; // Chrome creates a unique port f...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/help_dialog_page.js
pages/help_dialog_page.js
import "./all_content_scripts.js"; import * as UIComponentMessenger from "./ui_component_messenger.js"; import { allCommands } from "../background_scripts/all_commands.js"; // The ordering we show key bindings is alphanumerical, except that special keys sort to the end. function compareKeys(a, b) { a = a.replace("<"...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/options.js
pages/options.js
import "./all_content_scripts.js"; import { ExclusionRulesEditor } from "./exclusion_rules_editor.js"; import { allCommands } from "../background_scripts/all_commands.js"; import { Commands, KeyMappingsParser } from "../background_scripts/commands.js"; import * as userSearchEngines from "../background_scripts/user_sear...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/action.js
pages/action.js
import "../lib/utils.js"; import "../lib/dom_utils.js"; import "../lib/settings.js"; import * as bgUtils from "../background_scripts/bg_utils.js"; import { ExclusionRulesEditor } from "./exclusion_rules_editor.js"; const ActionPage = { async init() { // Is it possible for the current tab's URL to change while t...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/pages/exclusion_rules_editor.js
pages/exclusion_rules_editor.js
// The table-editor used for exclusion rules. const ExclusionRulesEditor = { // When the Add rule button is clicked, use this as the pattern for the new rule. This is used by // the action.html toolbar popup. defaultPatternForNewRules: null, init() { document.querySelector("#exclusion-add-button").addEvent...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/test_harnesses/vomnibar_harness.js
test_harnesses/vomnibar_harness.js
import "../pages/all_content_scripts.js"; import "../pages/vomnibar_page.js"; function setup() { Vomnibar.activate(0, {}); } document.addEventListener("DOMContentLoaded", setup, false);
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/build_scripts/write_command_listing_page.js
build_scripts/write_command_listing_page.js
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env // Write a static version of the command_listing.html page to dist, to be hosted on vimium.github.io // as an online reference. import * as testHelper from "../tests/unit_tests/test_helper.js"; import "../tests/unit_tests/test_chrome_stubs.js"; import *...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/handler_stack.js
lib/handler_stack.js
class HandlerStack { constructor() { this.debug = false; this.eventNumber = 0; this.stack = []; this.counter = 0; // A handler should return this value to immediately discontinue bubbling and pass the event on // to the underlying page. this.passEventToPage = new Object(); // A handl...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/find_mode_history.js
lib/find_mode_history.js
// This // implements find-mode query history as a list of raw queries, most recent first. // This is under lib/ since it is used by both content scripts and iframes from pages/. const FindModeHistory = { storage: chrome.storage.session, key: "findModeRawQueryList", max: 50, rawQueryList: null, async init() ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/types.js
lib/types.js
// A centralized file of types which can be shared by both content scripts and background pages. globalThis.VomnibarShowOptions = { // The name of the completer to fetch results from. completer: "string", // Text to prefill the Vomnibar with. query: "string", // Whether to open the result in a new tab. new...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/chrome_api_stubs.js
lib/chrome_api_stubs.js
// // Mock the Chrome extension API for our tests. In Deno and Pupeteer, the Chrome extension APIs are // not available. // const shouldInstallStubs = globalThis.document?.location.pathname.includes("dom_tests.html") || // This query string is added to pages that we load in iframes from dom_tests.html, like // hud...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/url_utils.js
lib/url_utils.js
const UrlUtils = { chromeNewTabUrl: "about:newtab", // A set of top-level domains, e.g. ["com"] recognized by https://www.iana.org/domains/root/db tlds: null, // Other hard-coded TLDs that we want to recognize as URLs. otherTlds: [ // Multicast DNS uses 'local' to resolve hostnames to IP addresses withi...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/dom_utils.js
lib/dom_utils.js
const DomUtils = { // // Runs :callback if the DOM has loaded, otherwise runs it on load // isReady() { return document.readyState !== "loading"; }, // Returns a promise which resolves when the DOMContentLoaded event has been fired. documentReady() { return new Promise((resolve) => { if (th...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/rect.js
lib/rect.js
// Commands for manipulating rects. const Rect = { // Create a rect given the top left and bottom right corners. create(x1, y1, x2, y2) { return { bottom: y2, top: y1, left: x1, right: x2, width: x2 - x1, height: y2 - y1, }; }, copy(rect) { return { bottom:...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/settings.js
lib/settings.js
// The possible destinations for new tabs opened using Vimium's `createTab` command. const newTabDestinations = { browserNewTabPage: "browserNewTabPage", vimiumNewTabPage: "vimiumNewTabPage", customUrl: "customUrl", }; const vimiumNewTabPageUrl = "https://vimium.github.io/new-tab/"; const defaultOptions = { s...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/keyboard_utils.js
lib/keyboard_utils.js
let mapKeyRegistry = {}; Utils.monitorChromeSessionStorage("mapKeyRegistry", (value) => { return mapKeyRegistry = value; }); const KeyboardUtils = { // This maps event.key key names to Vimium key names. keyNames: { "ArrowLeft": "left", "ArrowUp": "up", "ArrowRight": "right", "ArrowDown": "down", ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/lib/utils.js
lib/utils.js
// Only pass events to the handler if they are marked as trusted by the browser. // This is kept in the global namespace for brevity and ease of use. if (globalThis.forTrusted == null) { globalThis.forTrusted = (handler) => { return function (event) { if (event && event.isTrusted) { return handler.a...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/exclusions.js
background_scripts/exclusions.js
// This module manages manages the exclusion rule setting. An exclusion is an object with two // attributes: pattern and passKeys. The exclusion rules are an array of such objects. const ExclusionRegexpCache = { cache: {}, clear(cache) { this.cache = cache || {}; }, get(pattern) { if (pattern in this.c...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/marks.js
background_scripts/marks.js
import * as TabOperations from "./tab_operations.js"; // This returns the key which is used for storing mark locations in chrome.storage.sync. // Exported for tests. export function getLocationKey(markName) { return `vimiumGlobalMark|${markName}`; } // Get the part of a URL we use for matching here (that is, everyt...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/main.js
background_scripts/main.js
import "../lib/utils.js"; import "../lib/settings.js"; import "../lib/url_utils.js"; import "../background_scripts/tab_recency.js"; import * as bgUtils from "../background_scripts/bg_utils.js"; import "../background_scripts/all_commands.js"; import { Commands } from "../background_scripts/commands.js"; import * as excl...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
true
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/completion_engines.js
background_scripts/completion_engines.js
// A completion engine provides search suggestions for a custom search engine. A custom search // engine is identified by a "searchUrl". An "engineUrl" is used for fetching suggestions, whereas a // "searchUrl" is used for the actual search itself. // // Each completion engine defines: // // 1. An "engineUrl". This i...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/reload.js
background_scripts/reload.js
// Used as part of a debugging workflow when developing the extension. const tabs = await chrome.tabs.query({}); // Clear the background page's console log, if its console window is open. console.clear(); await chrome.runtime.reload(); // Chrome does not execute past this point. This is for Firefox-based browsers. No...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/tab_recency.js
background_scripts/tab_recency.js
// TabRecency associates an integer with each tab id representing how recently it has been accessed. // The order of tabs as tracked by TabRecency is used to provide a recency-based ordering in the // tabs vomnibar. // // The values are persisted to chrome.storage.session so that they're not lost when the extension's /...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/commands.js
background_scripts/commands.js
import { allCommands } from "./all_commands.js"; // A specification for a command that's currently bound to a key sequence, as defined by the default // key bindings, or as it appears in the user's keymapping settings. export class RegistryEntry { // Array of keys. keySequence; // Name of the command. command;...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/bg_utils.js
background_scripts/bg_utils.js
import { TabRecency } from "./tab_recency.js"; // We're using browser.runtime to determine the browser name and version for Firefox. That API is // only available on the background page. We're not using window.navigator because it's unreliable. // Sometimes browser vendors will provide fake values, like when `privacy....
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/tab_operations.js
background_scripts/tab_operations.js
// // Functions for opening URLs in tabs. // import * as bgUtils from "../background_scripts/bg_utils.js"; import "../lib/url_utils.js"; // Opens request.url in the current tab. If the URL is keywords, search for them in the default // search engine. If the URL is a javascript: snippet, execute it in the current tab....
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/completion_search.js
background_scripts/completion_search.js
import * as completionEngines from "./completion_engines.js"; // This is a wrapper class for completion engines. It handles the case where a custom search engine // includes a prefix query term (or terms). For example: // // https://www.google.com/search?q=javascript+%s // // In this case, we get better suggestions ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/completion.js
background_scripts/completion.js
// This file contains the definition of the completers used for the Vomnibox's suggestion UI. A // completer will take a query (whatever the user typed into the Vomnibox) and return a list of // Suggestions, e.g. bookmarks, domains, URLs from history. // // The Vomnibox frontend script makes a "filterCompleter" request...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
true
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/user_search_engines.js
background_scripts/user_search_engines.js
import "../lib/url_utils.js"; import * as commands from "./commands.js"; // A struct representing a search engine entry in the "searchEngine" setting. export class UserSearchEngine { keyword; url; description; constructor(o) { Object.seal(this); if (o) Object.assign(this, o); } } // Parses a user's ...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
philc/vimium
https://github.com/philc/vimium/blob/e57c0f593b6594748fb05d814e4b23eaa91a0a5e/background_scripts/all_commands.js
background_scripts/all_commands.js
// This is the order they will be shown in the help dialog. // // Properties: // - advanced: advanced commands are not shown in the help dialog by default. // - background: whether this command has to be run by the background page. // - desc: shown in the help dialog and command listing page. // - details: extra help i...
javascript
MIT
e57c0f593b6594748fb05d814e4b23eaa91a0a5e
2026-01-04T15:04:06.275774Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/Gruntfile.js
Gruntfile.js
const sass = require('sass'); module.exports = function (grunt) { // Full list of files that must be included by RequireJS includes = [ 'jquery.select2', 'almond', 'jquery-mousewheel' // shimmed for non-full builds ]; fullIncludes = [ 'jquery', 'select2/dropdown/attachContainer', 'se...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/jquery.shim.js
src/js/jquery.shim.js
/* global jQuery:false, $:false */ define(function () { var _$ = jQuery || $; if (_$ == null && console && console.error) { console.error( 'Select2: An instance of jQuery or a jQuery-compatible library was not ' + 'found. Make sure that you are including jQuery before Select2 on your ' + 'web...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/wrapper.end.js
src/js/wrapper.end.js
// Autoload the jQuery bindings // We know that all of the modules exist above this, so we're safe var select2 = S2.require('jquery.select2'); // Hold the AMD module references on the jQuery function that was just loaded // This allows Select2 to use the internal loader outside of this file, such // as in ...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/banner.start.js
src/js/banner.start.js
(function () { // Restore the Select2 AMD loader so it can be used // Needed mostly in the language files, where the loader is not inserted if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { var S2 = jQuery.fn.select2.amd; }
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/jquery.mousewheel.shim.js
src/js/jquery.mousewheel.shim.js
define([ 'jquery' ], function ($) { // Used to shim jQuery.mousewheel for non-full builds. return $; });
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/banner.end.js
src/js/banner.end.js
// Return the AMD loader configuration so it can be used outside of this file return { define: S2.define, require: S2.require }; }());
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/jquery.select2.js
src/js/jquery.select2.js
define([ 'jquery', 'jquery-mousewheel', './select2/core', './select2/defaults', './select2/utils' ], function ($, _, Select2, Defaults, Utils) { if ($.fn.select2 == null) { // All methods that should return the element var thisMethods = ['open', 'close', 'destroy']; $.fn.select2 = function (op...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/wrapper.start.js
src/js/wrapper.start.js
/*! * Select2 <%= package.version %> * https://select2.github.io * * Released under the MIT license * https://github.com/select2/select2/blob/master/LICENSE.md */ ;(function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory)...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/core.js
src/js/select2/core.js
define([ 'jquery', './options', './utils', './keys' ], function ($, Options, Utils, KEYS) { var Select2 = function ($element, options) { if (Utils.GetData($element[0], 'select2') != null) { Utils.GetData($element[0], 'select2').destroy(); } this.$element = $element; this.id = this._gen...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/keys.js
src/js/select2/keys.js
define([ ], function () { var KEYS = { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 }; return KEYS; });
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/translation.js
src/js/select2/translation.js
define([ 'jquery', 'require' ], function ($, require) { function Translation (dict) { this.dict = dict || {}; } Translation.prototype.all = function () { return this.dict; }; Translation.prototype.get = function (key) { return this.dict[key]; }; Translation.prototype.extend = function (...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/defaults.js
src/js/select2/defaults.js
define([ 'jquery', './results', './selection/single', './selection/multiple', './selection/placeholder', './selection/allowClear', './selection/search', './selection/selectionCss', './selection/eventRelay', './utils', './translation', './diacritics', './data/select', './data/array', '....
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/dropdown.js
src/js/select2/dropdown.js
define([ 'jquery', './utils' ], function ($, Utils) { function Dropdown ($element, options) { this.$element = $element; this.options = options; Dropdown.__super__.constructor.call(this); } Utils.Extend(Dropdown, Utils.Observable); Dropdown.prototype.render = function () { var $dropdown = ...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/options.js
src/js/select2/options.js
define([ 'jquery', './defaults', './utils' ], function ($, Defaults, Utils) { function Options (options, $element) { this.options = options; if ($element != null) { this.fromElement($element); } if ($element != null) { this.options = Defaults.applyFromElement(this.options, $element...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/diacritics.js
src/js/select2/diacritics.js
define([ ], function () { var diacritics = { '\u24B6': 'A', '\uFF21': 'A', '\u00C0': 'A', '\u00C1': 'A', '\u00C2': 'A', '\u1EA6': 'A', '\u1EA4': 'A', '\u1EAA': 'A', '\u1EA8': 'A', '\u00C3': 'A', '\u0100': 'A', '\u0102': 'A', '\u1EB0': 'A', '\u1EAE': 'A', '\...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/results.js
src/js/select2/results.js
define([ 'jquery', './utils' ], function ($, Utils) { function Results ($element, options, dataAdapter) { this.$element = $element; this.data = dataAdapter; this.options = options; Results.__super__.constructor.call(this); } Utils.Extend(Results, Utils.Observable); Results.prototype.rende...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/utils.js
src/js/select2/utils.js
define([ 'jquery' ], function ($) { var Utils = {}; Utils.Extend = function (ChildClass, SuperClass) { var __hasProp = {}.hasOwnProperty; function BaseConstructor () { this.constructor = ChildClass; } for (var key in SuperClass) { if (__hasProp.call(SuperClass, key)) { Child...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/i18n/ko.js
src/js/select2/i18n/ko.js
define(function () { // Korean return { errorLoading: function () { return '결과를 불러올 수 없습니다.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = '너무 깁니다. ' + overChars + ' 글자 지워주세요.'; return message; }, inputTooShort: func...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/i18n/hsb.js
src/js/select2/i18n/hsb.js
define(function () { // Upper Sorbian var charsWords = ['znamješko', 'znamješce', 'znamješka','znamješkow']; var itemsWords = ['zapisk', 'zapiskaj', 'zapiski','zapiskow']; var pluralWord = function pluralWord(numberOfChars, words) { if (numberOfChars === 1) { return words[0]; } else if (numberO...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/i18n/pa.js
src/js/select2/i18n/pa.js
define(function () { // Punjabi return { errorLoading: function () { return 'ਨਤੀਜੇ ਲੋਡ ਨਹੀਂ ਕੀਤੇ ਜਾ ਸਕਦੇ ।'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var charCount = (overChars != 1) ? ' ਅੱਖਰਾਂ ਨੂੰ ' : ' ਅੱਖਰ '; var message = 'ਕ੍ਰਿਪਾ ...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false
select2/select2
https://github.com/select2/select2/blob/595494a72fee67b0a61c64701cbb72e3121f97b9/src/js/select2/i18n/sl.js
src/js/select2/i18n/sl.js
define(function () { // Slovene return { errorLoading: function () { return 'Zadetkov iskanja ni bilo mogoče naložiti.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = 'Prosim zbrišite ' + overChars + ' znak'; if (overChars ==...
javascript
MIT
595494a72fee67b0a61c64701cbb72e3121f97b9
2026-01-04T15:04:04.887474Z
false