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 |
|---|---|---|---|---|---|---|---|---|
PierfrancescoSoffritti/doodles | https://github.com/PierfrancescoSoffritti/doodles/blob/9090a3a441b322593c2468caafb4aa3f3eba7706/22_flow_painter/perlin.js | 22_flow_painter/perlin.js | /*
* A speed-improved perlin and simplex noise algorithms for 2D.
*
* Based on example code by Stefan Gustavson (stegu@itn.liu.se).
* Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
* Better rank ordering method by Stefan Gustavson in 2012.
* Converted to Javascript by Joseph Gentle.
*
* Version... | javascript | Apache-2.0 | 9090a3a441b322593c2468caafb4aa3f3eba7706 | 2026-01-05T03:43:45.246895Z | false |
PierfrancescoSoffritti/doodles | https://github.com/PierfrancescoSoffritti/doodles/blob/9090a3a441b322593c2468caafb4aa3f3eba7706/22_flow_painter/main.js | 22_flow_painter/main.js | function onLoad() {
window.onresize = onResize
const canvas = document.getElementById("canvas")
const imageCanvas = document.getElementById("imageCanvas")
const screenInfo = {
pixelRatio: getPixelRatio(canvas.getContext('2d')),
width: -1,
height: -1
}
resizeCanvas()
const images = [
{... | javascript | Apache-2.0 | 9090a3a441b322593c2468caafb4aa3f3eba7706 | 2026-01-05T03:43:45.246895Z | false |
PierfrancescoSoffritti/doodles | https://github.com/PierfrancescoSoffritti/doodles/blob/9090a3a441b322593c2468caafb4aa3f3eba7706/22_flow_painter/flow.js | 22_flow_painter/flow.js |
function Flow(canvas, imageCanvas, screenInfo, image) {
const context = canvas.getContext('2d')
const imageCanvasContext = imageCanvas.getContext('2d')
noise.seed(Math.random())
drawBackground(imageCanvasContext, image.bg)
drawBackground(context, image.bg)
let particles = []
let imageData
loadImage... | javascript | Apache-2.0 | 9090a3a441b322593c2468caafb4aa3f3eba7706 | 2026-01-05T03:43:45.246895Z | false |
PierfrancescoSoffritti/doodles | https://github.com/PierfrancescoSoffritti/doodles/blob/9090a3a441b322593c2468caafb4aa3f3eba7706/22_flow_painter/utils.js | 22_flow_painter/utils.js | function getRandom(min, max) {
return Math.random() * (max - min) + min;
}
function getRandomInt(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
function clamp01(value) {
return Math.min(Math.max(value, 0), 1);
}
function toRad(deg) {
return deg * (Math.PI / 180);
}
function toDeg(... | javascript | Apache-2.0 | 9090a3a441b322593c2468caafb4aa3f3eba7706 | 2026-01-05T03:43:45.246895Z | false |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/jester.js | jester.js | // Jester version 1.5
// Released October 25th, 2007
// Compatible, tested with Prototype 1.6.0.2
// Copyright 2007, thoughtbot, inc.
// Released under the MIT License.
Jester = {}
Jester.Resource = function(){};
// Doing it this way forces the validation of the syntax but gives flexibility enough to rename the new... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | true |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/test/jsunit/app/xbDebug.js | test/jsunit/app/xbDebug.js | // xbDebug.js revision: 0.003 2002-02-26
/* ***** BEGIN LICENSE BLOCK *****
* Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
* Full Terms at /xbProjects-srce/license/mpl-tri-license.txt
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express ... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | false |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/test/jsunit/app/jsUnitTestSuite.js | test/jsunit/app/jsUnitTestSuite.js | /* @author Edward Hieatt, edward@jsunit.net */
function jsUnitTestSuite() {
this.isjsUnitTestSuite = true;
this.testPages = Array();
this.pageIndex = 0;
}
jsUnitTestSuite.prototype.addTestPage = function (pageName)
{
this.testPages[this.testPages.length] = pageName;
}
jsUnitTestSuite.prototy... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | false |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/test/jsunit/app/jsUnitTracer.js | test/jsunit/app/jsUnitTracer.js | /* @author Edward Hieatt, edward@jsunit.net */
function jsUnitTracer() {
this._traceWindow = null;
this.TRACE_LEVEL_WARNING = 1;
this.TRACE_LEVEL_INFO = 2;
this.TRACE_LEVEL_DEBUG = 3;
this.popupWindowsBlocked = false;
}
jsUnitTracer.prototype.initialize = function ()
{
if (this._traceWindow !... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | false |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/test/jsunit/app/jsUnitTestManager.js | test/jsunit/app/jsUnitTestManager.js | /* @author Edward Hieatt, edward@jsunit.net */
function jsUnitTestManager()
{
this._windowForAllProblemMessages = null;
this.container = top.frames.testContainer
this.documentLoader = top.frames.documentLoader;
this.mainFrame = top.frames.mainFrame;
this.containerController = t... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | false |
thoughtbot/jester | https://github.com/thoughtbot/jester/blob/fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb/test/jsunit/app/jsUnitCore.js | test/jsunit/app/jsUnitCore.js | /* @author Edward Hieatt, edward@jsunit.net */
var JSUNIT_UNDEFINED_VALUE;
var JSUNIT_VERSION="2.1";
var isTestPageLoaded = false;
//hack for NS62 bug
function jsUnitFixTop() {
var tempTop = top;
if (!tempTop) {
tempTop = window;
while (tempTop.parent) {
tempTop = tempTop.parent;
if (tempTop.t... | javascript | MIT | fd7d84ccfd623c0f8fe8279fa647c07af00d8cfb | 2026-01-05T03:44:03.520027Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/main.js | src/main.js | import { AlgebraicGameClient } from './algebraicGameClient.js';
import { SimpleGameClient } from './simpleGameClient.js';
import { UCIGameClient } from './uciGameClient.js';
export const create = (opts) => AlgebraicGameClient.create(opts);
export const createSimple = () => SimpleGameClient.create();
export const fromF... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/boardValidation.js | src/boardValidation.js | /**
BoardValidation determines viable move options for all pieces
given the current state of the board. If it's the White sides turn
to attack, only White piece move options are evaluated (and visa versa).
BoardValidation is intended to be the 2nd phase of move
validation that is capable of taking into account fa... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/algebraicGameClient.js | src/algebraicGameClient.js | /* eslint sort-imports: 0 */
import { EventEmitter } from 'events';
import { Board } from './board.js';
import { Game } from './game.js';
import { GameValidation } from './gameValidation.js';
import { Piece } from './piece.js';
import { PieceType } from './piece.js';
import { SideType } from './piece.js';
// private m... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/gameValidation.js | src/gameValidation.js | /**
GameValidation is the 3rd phase of validation for the game
and is intended to support Game level events. Examples of Game
scope validation include Check, Checkmate, 3-fold position
repetition and pawn promotion.
*/
import { BoardValidation } from './boardValidation.js';
import { PieceType } from './piece.js';
... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/pieceValidation.js | src/pieceValidation.js | /**
The general idea behind PieceValidation is to examine an individual piece
and determine (with the information available from about that single piece)
what move options are available for that piece.
The PieceValidation doesn't alter any properties of the piece, the board
or any squares. Additionally, the Piece... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/square.js | src/square.js | /**
The simple definition of a rank & file within a board.
Additionally, if a Piece occupies a square on a board, the
square contains the reference to the piece.
*/
export class Square {
constructor (file, rank) {
this.file = file;
this.piece = null;
this.rank = rank;
}
static create (file, rank) {
ret... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/board.js | src/board.js | /**
The Board is the representation of the current position of the pieces on
the squares it contains.
*/
import { Piece, PieceType, SideType } from './piece.js';
import { EventEmitter } from 'events';
import { Square } from './square.js';
// types
export var NeighborType = {
Above : { offset : 8 },
AboveLeft : { o... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/simpleGameClient.js | src/simpleGameClient.js | import { EventEmitter } from 'events';
import { Game } from './game.js';
import { GameValidation } from './gameValidation.js';
import { Piece } from './piece.js';
// private methods
function isMoveValid (src, dest, validMoves) {
let
i = 0,
isFound = (expr, sq) => {
return ((typeof expr === 'string' && sq.file ... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/piece.js | src/piece.js | /**
The Piece is a definition of a piece that can be played on the board.
The uid property of the Piece is not intended to be durable across
sessions, but only to uniquely identify the piece on the board. Right
now the property is used by board.getSquareByPiece as pieces are not
otherwise uniquely identifiable (i... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/uciGameClient.js | src/uciGameClient.js | /* eslint sort-imports: 0 */
import { EventEmitter } from 'events';
import { Game } from './game.js';
import { GameValidation } from './gameValidation.js';
import { Piece } from './piece.js';
import { PieceType } from './piece.js';
// private helpers
function parseUCI(uci) {
if (typeof uci !== 'string') {
retur... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/src/game.js | src/game.js | /**
Games contain the history of a board and the board itself.
At time of writing this, the game is also intended to store some
degree of information regarding the opponents and keys that
could be used for storage, etc.
*/
import base64 from 'crypto-js/enc-base64.js'
import { Board } from './board.js';
import { Ev... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/main.js | test/src/main.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import chess, { create, createSimple, createUCI } from '../../src/main.js';
import { AlgebraicGameClient } from '../../src/algebraicGameClient.js';
import { SimpleGameClient } from '../../src/simpleGameClient.js';
describe('main entry', () ... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/boardValidation.js | test/src/boardValidation.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { BoardValidation } from '../../src/boardValidation.js';
import { Game } from '../../src/game.js';
describe('BoardValidation', () => {
let getValidSquares = (sq, validMoves) => {
let i = 0;
for (; i < validMoves.length; i++) {
... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/algebraicGameClient.js | test/src/algebraicGameClient.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { Piece, PieceType, SideType } from '../../src/piece.js';
import { AlgebraicGameClient } from '../../src/algebraicGameClient.js';
describe('AlgebraicGameClient', () => {
// test create and getStatus
it('should have proper status on... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/gameValidation.js | test/src/gameValidation.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { Game } from '../../src/game.js';
import { GameValidation } from '../../src/gameValidation.js';
describe('GameValidation', () => {
// validate check
it('should properly indicate check', () => {
let
b,
g = Game.create(),
... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/pieceValidation.js | test/src/pieceValidation.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { Board } from '../../src/board.js';
import { PieceType } from '../../src/piece.js';
import { PieceValidation } from '../../src/pieceValidation.js';
describe('PieceValidation', () => {
function checkForSquare (f, r, s) {
let i = 0... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/board.js | test/src/board.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { Board, NeighborType } from '../../src/board.js';
import { PieceType, SideType } from '../../src/piece.js';
describe('Board', () => {
describe('#create()', () => {
// ensure 64 squares
it('should return 64 squares', () => {
... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/simpleGameClient.js | test/src/simpleGameClient.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { Piece, PieceType, SideType } from '../../src/piece.js';
import { SimpleGameClient } from '../../src/simpleGameClient.js';
describe('SimpleGameClient', () => {
// test create and getStatus
it('should properly create simple game cl... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/uciGameClient.js | test/src/uciGameClient.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { PieceType, SideType, Piece } from '../../src/piece.js';
import { UCIGameClient } from '../../src/uciGameClient.js';
describe('UCIGameClient', () => {
it('should have proper status once board is created', () => {
const gc = UC... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/test/src/game.js | test/src/game.js | /* eslint no-magic-numbers:0 */
import { assert, describe, it } from 'vitest';
import { PieceType, SideType } from '../../src/piece.js';
import { Game } from '../../src/game.js';
describe('Game', () => {
// make sure there is no move history when game is created
it('should have no move history when game is created',... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
brozeph/node-chess | https://github.com/brozeph/node-chess/blob/dae34f23aede046086a3ec616c4a9fd34d1657a7/examples/usage.js | examples/usage.js | import chess from 'chess';
// create a game client
const gameClient = chess.create({ PGN : true });
let move, status;
// look at the status and valid moves
status = gameClient.getStatus();
// make a move
move = gameClient.move('a4');
// look at the status again after the move to see
// the opposing side's available... | javascript | MIT | dae34f23aede046086a3ec616c4a9fd34d1657a7 | 2026-01-05T03:43:45.337977Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/nwb.config.js | nwb.config.js | module.exports = {
type: 'react-component',
npm: {
esModules: true,
umd: false
}
}
| javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/src/index.js | src/index.js | import './css/style.css';
import FbGridImages from './components/Images'
export default FbGridImages; | javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/src/components/Modal.js | src/components/Modal.js | import React, { Component } from 'react';
import { Image, Modal, Grid, Row, Col } from 'react-bootstrap';
import Lightbox from 'react-image-lightbox';
import 'react-image-lightbox/style.css'; // This only needs to be imported once in your app
class ModalComponent extends Component {
constructor(props) {
su... | javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/src/components/Images.js | src/components/Images.js | import React, { Component } from 'react';
import { Image, Grid, Row, Col } from 'react-bootstrap';
import Modal from './Modal'
import PropTypes from 'prop-types';
class Images extends Component {
static defaultProps = {
images: [],
hideOverlay: false,
renderOverlay: () => 'Preview Image',
overlayBack... | javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/tests/index-test.js | tests/index-test.js | import expect from 'expect'
import React from 'react'
import {render, unmountComponentAtNode} from 'react-dom'
import Component from 'src/'
describe('Component', () => {
let node
beforeEach(() => {
node = document.createElement('div')
})
afterEach(() => {
unmountComponentAtNode(node)
})
it('dis... | javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
Expertizo/react-fb-image-grid | https://github.com/Expertizo/react-fb-image-grid/blob/8d133b7da1fd0d53cb159bd0022cb5a18f58d442/demo/src/index.js | demo/src/index.js | import React, {Component} from 'react'
import {render} from 'react-dom'
import '../../src/css/style.css';
import FbImageLibrary from '../../src'
const images = ['https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&h=350',
'https://www.gettyimages.ie/gi-resources/images/Homepa... | javascript | MIT | 8d133b7da1fd0d53cb159bd0022cb5a18f58d442 | 2026-01-05T03:44:05.756542Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/cote.js | cote.js | /* Really simple cote example for testing purpose, based on env var this will create
- a requester
- a responder
Run this command to build the container image:
docker build -t kalisio/cote -f dockerfile.cote .
Then launch multiple instances like this to see if everything works fine in your network:
docker run -... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/test/index.test.js | test/index.test.js | import { authenticate } from '@feathersjs/authentication'
import auth from '@feathersjs/authentication-client'
import restClient from '@feathersjs/rest-client'
import socketClient from '@feathersjs/socketio-client'
import express from '@feathersjs/express'
import feathers from '@feathersjs/feathers'
import request from... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | true |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/test/failures.test.js | test/failures.test.js | import express from '@feathersjs/express'
import utils from 'util'
import chai, { expect, util, assert } from 'chai'
import chailint from 'chai-lint'
import { MemoryService } from '@feathersjs/memory'
import { createApp, waitForService, clone } from './utils.js'
import plugin, { finalize } from '../lib/index.js'
const... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/test/utils.js | test/utils.js | import feathers from '@feathersjs/feathers'
import { AuthenticationService, JWTStrategy } from '@feathersjs/authentication'
import { LocalStrategy } from '@feathersjs/authentication-local'
import express from '@feathersjs/express'
import socketio from '@feathersjs/socketio'
import { expect } from 'chai'
export functio... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/channels.js | example/service/src/channels.js | export default function(app) {
if (typeof app.channel !== 'function') {
// If no real-time functionality has been configured just return
return;
}
app.on('connection', connection => {
// On a new real-time connection, add it to the all channel
app.channel('all').join(connection);
});
app.pub... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/app.hooks.js | example/service/src/app.hooks.js | // Application hooks that run for every service
import logger from './hooks/logger.js';
export default {
before: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [ logger() ],
find: [],
get: [],
create: [],
update: [],
... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/index.js | example/service/src/index.js | /* eslint-disable no-console */
import logger from 'winston';
import app from './app.js';
const port = app.get('port');
const server = await app.listen(port);
process.on('unhandledRejection', (reason, p) =>
logger.error('Unhandled Rejection at: Promise ', p, reason)
);
server.on('listening', () =>
logger.info('Fe... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/app.js | example/service/src/app.js | import path from 'path';
import favicon from 'serve-favicon';
import compress from 'compression';
import cors from 'cors';
import helmet from 'helmet';
import feathers from '@feathersjs/feathers';
import express from '@feathersjs/express';
import configuration from '@feathersjs/configuration';
import socketio from '@f... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/services/index.js | example/service/src/services/index.js | import todos from './todos/todos.service.js';
export default function () {
const app = this; // eslint-disable-line no-unused-vars
app.configure(todos);
// Initialize default data
let todoService = app.service('todos');
todoService.find({})
.then(todos => {
if (todos.total === 0) {
todoService.cr... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/services/todos/todos.hooks.js | example/service/src/services/todos/todos.hooks.js | export default {
before: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/services/todos/todos.service.js | example/service/src/services/todos/todos.service.js | // Initializes the `todos` service on path `/todos`
import createService from 'feathers-nedb';
import createModel from '../../models/todos.model.js';
import hooks from './todos.hooks.js';
export default function () {
const app = this;
const Model = createModel(app);
const paginate = app.get('paginate');
const... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/middleware/index.js | example/service/src/middleware/index.js | export default function () {
// Add your custom middleware here. Remember, that
// in Express the order matters
const app = this; // eslint-disable-line no-unused-vars
};
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/hooks/logger.js | example/service/src/hooks/logger.js | // A hook that logs service method before, after and error
import logger from 'winston';
export default function () {
return function (hook) {
let message = `${hook.type}: ${hook.path} - Method: ${hook.method}`;
if (hook.type === 'error') {
message += `: ${hook.error.message}`;
}
if (hook.err... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/src/models/todos.model.js | example/service/src/models/todos.model.js | import NeDB from 'nedb';
import path from 'path';
export default function (app) {
const dbPath = app.get('nedb');
const Model = new NeDB({
filename: path.join(dbPath, `todos${app.get('port')}.db`),
autoload: true
});
return Model;
};
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/test/app.test.js | example/service/test/app.test.js | import assert from 'assert';
import rp from 'request-promise';
import app from '../src/app.js';
describe('Feathers application tests', () => {
before(function(done) {
this.server = app.listen(3030);
this.server.once('listening', () => done());
});
after(function(done) {
this.server.close(done);
})... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/service/test/services/todos.test.js | example/service/test/services/todos.test.js | import assert from 'assert';
import app from '../../src/app.js';
describe('\'todos\' service', () => {
it('registered the service', () => {
const service = app.service('todos');
assert.ok(service, 'Registered the service');
});
});
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/channels.js | example/gateway/src/channels.js | export default function(app) {
if (typeof app.channel !== 'function') {
// If no real-time functionality has been configured just return
return;
}
app.on('connection', connection => {
// On a new real-time connection, add it to the anonymous channel
app.channel('anonymous').join(connection);
})... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/app.hooks.js | example/gateway/src/app.hooks.js | // Application hooks that run for every service
import logger from './hooks/logger.js';
export default {
before: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [ logger() ],
find: [],
get: [],
create: [],
update: [],
... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/index.js | example/gateway/src/index.js | /* eslint-disable no-console */
import logger from 'winston';
import app from './app.js';
const port = app.get('port');
const server = await app.listen(port);
process.on('unhandledRejection', (reason, p) =>
logger.error('Unhandled Rejection at: Promise ', p, reason)
);
server.on('listening', () =>
logger.info('Fe... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/app.js | example/gateway/src/app.js | import path from 'path';
import favicon from 'serve-favicon';
import compress from 'compression';
import cors from 'cors';
import helmet from 'helmet';
import feathers from '@feathersjs/feathers';
import express from '@feathersjs/express';
import configuration from '@feathersjs/configuration';
import socketio from '@f... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/authentication.js | example/gateway/src/authentication.js | import { AuthenticationService, JWTStrategy } from '@feathersjs/authentication'
import { LocalStrategy } from '@feathersjs/authentication-local'
export default function () {
const app = this;
const authentication = new AuthenticationService(app)
authentication.register('jwt', new JWTStrategy())
authenticat... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/services/index.js | example/gateway/src/services/index.js | import users from './users/users.service.js';
export default function () {
const app = this; // eslint-disable-line no-unused-vars
app.configure(users);
// Initialize default user
let userService = app.service('users');
userService.find({})
.then(users => {
if (users.total === 0) {
userService.cre... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/services/users/users.hooks.js | example/gateway/src/services/users/users.hooks.js | import authentication from '@feathersjs/authentication';
import commonHooks from 'feathers-hooks-common';
import local from '@feathersjs/authentication-local'
const { hashPassword } = local.hooks;
const { authenticate } = authentication.hooks;
export default {
before: {
all: [],
find: [ authenticate('jwt') ... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/services/users/users.service.js | example/gateway/src/services/users/users.service.js | // Initializes the `users` service on path `/users`
import createService from 'feathers-nedb';
import createModel from '../../models/users.model.js';
import hooks from './users.hooks.js';
export default function () {
const app = this;
const Model = createModel(app);
const paginate = app.get('paginate');
const... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/middleware/index.js | example/gateway/src/middleware/index.js | export default function () {
// Add your custom middleware here. Remember, that
// in Express the order matters
const app = this; // eslint-disable-line no-unused-vars
};
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/hooks/logger.js | example/gateway/src/hooks/logger.js | // A hook that logs service method before, after and error
import logger from 'winston';
export default function () {
return function (hook) {
let message = `${hook.type}: ${hook.path} - Method: ${hook.method}`;
if (hook.type === 'error') {
message += `: ${hook.error.message}`;
}
if (hook.err... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/src/models/users.model.js | example/gateway/src/models/users.model.js | import NeDB from 'nedb';
import path from 'path';
export default function (app) {
const dbPath = app.get('nedb');
const Model = new NeDB({
filename: path.join(dbPath, 'users.db'),
autoload: true
});
Model.ensureIndex({ fieldName: 'email', unique: true });
return Model;
};
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/test/app.test.js | example/gateway/test/app.test.js | import assert from 'assert';
import rp from 'request-promise';
import app from '../src/app.js';
describe('Feathers application tests', () => {
before(function(done) {
this.server = app.listen(3030);
this.server.once('listening', () => done());
});
after(function(done) {
this.server.close(done);
})... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/example/gateway/test/services/users.test.js | example/gateway/test/services/users.test.js | import assert from 'assert';
import app from '../../src/app.js';
describe('\'users\' service', () => {
it('registered the service', () => {
const service = app.service('users');
assert.ok(service, 'Registered the service');
});
});
| javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/lib/publish.js | lib/publish.js | import { stripSlashes, _ } from '@feathersjs/commons'
import feathers from '@feathersjs/feathers'
import makeDebug from 'debug'
import { DEFAULT_EVENTS, getService, isInternalService, getDistributedServiceOptions } from './utils.js'
const { getServiceOptions } = feathers
const debug = makeDebug('feathers-distributed:p... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/lib/index.js | lib/index.js | import { promisify } from 'util'
import errors from '@feathersjs/errors'
import makeCote from 'cote'
import makeDebug from 'debug'
import portfinder from 'portfinder'
import { v4 as uuid } from 'uuid'
import { DEFAULT_METHODS, DEFAULT_EVENTS, COMPONENTS, HealthcheckService } from './utils.js'
import { publishService, u... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/lib/service.js | lib/service.js | import makeDebug from 'debug'
import errors from '@feathersjs/errors'
import { DEFAULT_METHODS } from './utils.js'
const { convert } = errors
const debug = makeDebug('feathers-distributed:service')
// This is the Feathers service abstraction for a cote requester on remote
class RemoteService {
constructor (app, opt... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/lib/register.js | lib/register.js | import { promisify } from 'util'
import makeDebug from 'debug'
import { stripSlashes } from '@feathersjs/commons'
import { DEFAULT_EVENTS, COMPONENTS, isDiscoveredService, getServicePath, getService } from './utils.js'
import { publishServices } from './publish.js'
import RemoteService from './service.js'
const debug ... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
kalisio/feathers-distributed | https://github.com/kalisio/feathers-distributed/blob/2f7beb3debbc1fe905a894b437f93fe3241557b6/lib/utils.js | lib/utils.js | import { stripSlashes } from '@feathersjs/commons'
import errors from '@feathersjs/errors'
const { Unavailable, NotFound } = errors
export const DEFAULT_EVENTS = ['created', 'updated', 'patched', 'removed']
export const DEFAULT_METHODS = ['find', 'get', 'create', 'update', 'patch', 'remove']
export const COMPONENTS =... | javascript | MIT | 2f7beb3debbc1fe905a894b437f93fe3241557b6 | 2026-01-05T03:44:06.869929Z | false |
DreaMinder/nuxt-payload-extractor | https://github.com/DreaMinder/nuxt-payload-extractor/blob/3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6/example/nuxt.config.js | example/nuxt.config.js | module.exports = {
head: {
title: 'Demo',
meta: [
{ charset: 'utf-8' }
],
link: [
{ rel: 'stylesheet', href: '//fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic' }
],
},
modules: [
'@nuxtjs/axios',
['@/../lib/module.js', {
blacklist: ['/'],
ver... | javascript | MIT | 3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6 | 2026-01-05T03:44:08.452087Z | false |
DreaMinder/nuxt-payload-extractor | https://github.com/DreaMinder/nuxt-payload-extractor/blob/3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6/lib/plugin.js | lib/plugin.js | import { getUrlFileName } from './helpers'
export default (ctx, options) => {
ctx.$payloadURL = route => {
const base = '<%= options.base %>'
const timestamp = '<%= options.timestamp %>'
const subFolders = '<%= options.subFolders %>'
const filePath = getUrlFileName({
extension: 'json',
... | javascript | MIT | 3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6 | 2026-01-05T03:44:08.452087Z | false |
DreaMinder/nuxt-payload-extractor | https://github.com/DreaMinder/nuxt-payload-extractor/blob/3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6/lib/helpers.js | lib/helpers.js | import path from 'path'
export const getFsFileName = ({
root,
route,
extension,
timestamp = '',
subFolders,
}) => {
// Index route
if (route === '/') return path.join(root, `payload${timestamp}.${extension}`);
// Not using subfolders
if (subFolders === false || subFolders === 'false')
return `${p... | javascript | MIT | 3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6 | 2026-01-05T03:44:08.452087Z | false |
DreaMinder/nuxt-payload-extractor | https://github.com/DreaMinder/nuxt-payload-extractor/blob/3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6/lib/module.js | lib/module.js | const fs = require('fs')
const path = require('path')
const { getFsFileName, getUrlFileName } = require('./helpers')
const payloadKey = '__NUXT__'
let extractPayload = function(html, route, base, timestamp, subFolders){
let chunks = html.split(`<script>window.${payloadKey}=`)
let pre = chunks[0]
let payload = ... | javascript | MIT | 3853a7c1d9e59242c6d6fd3e0ee5bbfae8af60c6 | 2026-01-05T03:44:08.452087Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/storage.js | src/storage.js | 'use strict';
// https://github.com/extend-chrome/storage#interface-bucket-
import { getBucket } from '@extend-chrome/storage'
export const options_enum = {
hideAds: 'hideAds',
hideSevere: 'hideSevere',
ignoredText: 'ignoredText'
}
export const options = getBucket('options')
export const ads = getBucket('ads')
... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/adDetail.js | src/adDetail.js | 'use strict';
import {ads, blocked_store, get_blocked_store} from "./storage";
function add_extra_message_sections(phone_number) {
const phone_number_regex = new RegExp('0 \\((\\d{3})\\) (\\d{3}) (\\d{2}) (\\d{2})', 'i');
const phone_number_formatted = phone_number.replace(phone_number_regex, '0$1$2$3$4');
cons... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/background.js | src/background.js | 'use strict';
// With background scripts you can communicate with popup
// and contentScript files.
// For more information on background script,
// See https://developer.chrome.com/extensions/background_pages
| javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/popup.js | src/popup.js | 'use strict';
import './popup.scss';
import {options_enum, options} from "./storage";
import {open_settings} from "./helpers";
(function () {
const hideAds = options_enum.hideAds;
const hide_ads_element = document.getElementById('hide_ads');
const hideSevere = options_enum.hideSevere;
const hide_severe_eleme... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/injected.js | src/injected.js | (function(xhr) {
var XHR = XMLHttpRequest.prototype;
var open = XHR.open;
var send = XHR.send;
var setRequestHeader = XHR.setRequestHeader;
XHR.open = function(method, url) {
this._method = method;
this._url = url;
this._requestHeaders = {};
this._startTime = (new Date()).toISOString();
... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/contentScript.js | src/contentScript.js | 'use strict';
import {ads, blocked_store, options} from "./storage";
import {ads_page} from "./adDetail";
import {custom_style} from "./helpers";
import {ads_list_page, makeHide} from "./adsList";
import {filter} from "rxjs";
const path = window.location.pathname;
const is_ads = path.indexOf("/ilan/") > -1;
const is... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/helpers.js | src/helpers.js | 'use strict';
import { damageTypeEnum } from "@/enums";
export function reformattedContent(content) {
let value = content;
const turkish = 'çğıöşüÇĞİÖŞÜ';
const english = 'cgiosuCGIOSU';
for (let i = 0; i < turkish.length; i++) {
value = value.replace(new RegExp(turkish[i], 'g'), english[i]);
}
value =... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/adsList.js | src/adsList.js | 'use strict';
import { damageTypeEnum } from "@/enums";
import {
ads,
get_ads_displayed,
get_blocked_store,
options,
options_enum
} from "./storage";
import { adDetail } from "./adDetail";
import { is_damage, is_painted, reformattedContent } from "./helpers";
const hideAds = options_enum.hideAds;
const hideS... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/enums/index.js | src/enums/index.js | export { default as damageTypeEnum } from './damageTypeEnum'
| javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/src/enums/damageTypeEnum.js | src/enums/damageTypeEnum.js | export default {
CLEAR: 0,
SEVERE: 1,
LIGHT: 2
}
| javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/config/webpack.common.js | config/webpack.common.js | 'use strict';
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const PATHS = require('./paths');
// used in the module rules and in the stats exlude list
const IMAGE_TYPES = /\.(png|jpe?g|gif|svg)$/i;
// To re-use webpack configuration across... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/config/webpack.config.js | config/webpack.config.js | 'use strict';
const path = require('path')
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const PATHS = require('./paths');
// Merge webpack configuration files
const config = (env, argv) =>
merge(common, {
entry: {
popup: PATHS.src + '/popup.js',
content... | javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
apo-bozdag/sarisite-pro-extension | https://github.com/apo-bozdag/sarisite-pro-extension/blob/85be9797880f3c337dedd52ef29c6cf39e4504aa/config/paths.js | config/paths.js | 'use strict';
const path = require('path');
const PATHS = {
src: path.resolve(__dirname, '../src'),
build: path.resolve(__dirname, '../build'),
};
module.exports = PATHS;
| javascript | MIT | 85be9797880f3c337dedd52ef29c6cf39e4504aa | 2026-01-05T03:44:08.494577Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/build.js | build.js | ({
appDir: '.',
baseUrl: '.',
dir: './build',
skipDirOptimize: false, //TODO: change to false if you have a pretty comprehensive build modules defined in this file, and want to speed up the build - only files recuirsively referenced in build modules will be optimized
generateSourceMaps: false, //TODO: change ... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/app.js | app.js | require(['common'], function () {
require(['app/shared/config', 'util/error-reporter', 'util/google-analytics', 'sugar'], function (
Config, ErrorReporter, GA) {
ErrorReporter.init(''); // TODO: change to your app's frontend error logger API url
Config.refresh().done(function (config) {
var local... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/common.js | common.js | require.config({
paths: {
//lib
cytoscape: 'node_modules/cytoscape/dist/cytoscape',
director: 'node_modules/director/build/director',
highlightjs: '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min',
'highlightjs-css': '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/def... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/server.js | server.js | var fallback = require('express-history-api-fallback');
var compression = require('compression');
var express = require('express');
var app = express();
var madge = require('madge');
var fs = require('fs');
require('sugar');
var apiRes = {
config: {
credentials: {
google: {
analytics: 'UA-74965434-... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/storage.js | util/storage.js | define(function () {
var serialize = function (value) {
try {
return JSON.stringify(value);
} catch (e) {
if (window.console) {
window.console.error(e.message);
}
}
}, deserialize = function (value) {
try {
return JSON.parse(value);
} catch (e) {
if (window.... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/google-analytics.js | util/google-analytics.js | /*! knockout-spa (https://github.com/onlyurei/knockout-spa) * Copyright 2015-2017 Cheng Fan * MIT Licensed (https://raw.githubusercontent.com/onlyurei/knockout-spa/master/LICENSE) */
define(['jquery', 'sugar'], function () {
var initialized = false;
function initListenOnBody() {
// Google Analytics click trac... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/keyboard-event-handler.js | util/keyboard-event-handler.js | /*! knockout-spa (https://github.com/onlyurei/knockout-spa) * Copyright 2015-2017 Cheng Fan * MIT Licensed (https://raw.githubusercontent.com/onlyurei/knockout-spa/master/LICENSE) */
define(['sugar'], function () {
var forbiddenTagNames = ['input', 'textarea'];
var keyCodes = {
enter: 13,
esc: 27,
left... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/cache.js | util/cache.js | /*! knockout-spa (https://github.com/onlyurei/knockout-spa) * Copyright 2015-2017 Cheng Fan * MIT Licensed (https://raw.githubusercontent.com/onlyurei/knockout-spa/master/LICENSE) */
define(['jsface', 'util/storage', 'sugar'], function (Class, Storage) {
var Cache = Class({
constructor: function (size, storageKe... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/persisted-observable.js | util/persisted-observable.js | /*! knockout-spa (https://github.com/onlyurei/knockout-spa) * Copyright 2015-2017 Cheng Fan * MIT Licensed (https://raw.githubusercontent.com/onlyurei/knockout-spa/master/LICENSE) */
define(['util/json', 'util/storage', 'jsface', 'ko', 'sugar'], function (Json, Storage, Class, ko) {
var PersistedObservable = Class({... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/error-reporter.js | util/error-reporter.js | /*! knockout-spa (https://github.com/onlyurei/knockout-spa) * Copyright 2015-2017 Cheng Fan * MIT Licensed (https://raw.githubusercontent.com/onlyurei/knockout-spa/master/LICENSE) */
define(['util/google-analytics', 'jquery', 'sugar'], function (GA) {
var apiUrl = '';
var additionalInfo = {};
function makeError... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/geolocation.js | util/geolocation.js | /* jshint ignore:start */
if (typeof define !== 'function') { var define = require('amdefine')(module) }
/* jshint ignore:end */
define([], function () {
function deg2rad(deg) {
return deg * (Math.PI / 180);
}
var Geolocation = {
getDistanceFromLatLon: function (latitude1, longitude1, latitude2, longitud... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
onlyurei/knockout-spa | https://github.com/onlyurei/knockout-spa/blob/6e2f0e0623d8ee8bccee6b599708f3931fa89b78/util/dom.js | util/dom.js | define(['jquery', 'sugar'], function () {
var isIE = null;
var isIE9AndBelow = null;
function getOriginFromLocation(location) {
//IE Fix
var port = location.port;
if (((location.protocol == 'http:') && (port == '80')) || ((location.protocol == 'https:') && (port == '443'))) {
port = '';
}
... | javascript | MIT | 6e2f0e0623d8ee8bccee6b599708f3931fa89b78 | 2026-01-05T03:44:09.042915Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.