commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
65be961c47274c0eabcc8f9e303e1cbf5c46fcc3
add controls. more tests.
test/fragment.js
test/fragment.js
function canPlayVideos() { var elem = document.createElement('video'), bool = false; try { bool = !!elem.canPlayType; } catch (e) {} return bool; } jasmine.DEFAULT_TIMEOUT_INTERVAL = 30 * 60 * 1000; describe("", function () { var sources = [ { src: "http://techslides.com/demos/sample-videos/small.w...
JavaScript
0
@@ -881,16 +881,56 @@ ideo%22);%0A + video.setAttribute(%22controls%22, %22%22);%0A %7D);%0A%0A @@ -2673,12 +2673,1138 @@ %0A %7D);%0A%0A + it(%22can jump after fragments%22, function (done) %7B%0A expect(canPlayVideos()).toEqual(true);%0A%0A loadSources(%22#t=1,3%22);%0A%0A var firstUpdate = true;%...
385a7c93c7938b34ec134f60322257edff4b3020
Use private variables
Resources/public/js/adapter/fancytree.js
Resources/public/js/adapter/fancytree.js
/** * A tree browser adapter for the Fancytree library. * * @author Wouter J <wouter@wouterj.nl> * @see https://github.com/mar10/fancytree */ var FancytreeAdapter = function (data_url) { if (!window.jQuery || !jQuery.fn.fancytree) { throw 'The FancytreeAdapter requires both jQuery and the FancyTree lib...
JavaScript
0.000001
@@ -177,18 +177,17 @@ on (data -_u +U rl) %7B%0A @@ -1082,91 +1082,126 @@ %7D;%0A -%0A return %7B + // FancyTree instance %0A - +var tree -: null,%0A $elem: null,%0A data_url: data_url,%0A +;%0A // jQuery instance of the tree output element%0A var $tree;%0A%0A return %7B %0...
d842c197c774c08816df7b6ab1fc941a4953a317
Fix path in GOL test
test/home/gol.js
test/home/gol.js
// Test the game of life script /* eslint-disable no-console */ const test = require('ava'); const gol = require('../../app/js/home/gol.js'); test('Game of life is properly initialized', (t) => { const g = new gol.Game(15, 15); t.true(g instanceof gol.Game); t.is(g.board.length, 15); t.is(g.board[0].length, ...
JavaScript
0.000001
@@ -119,18 +119,20 @@ /../app/ -js +main /home/go
905b0488cec446b823f6fc88eaa79aafbbf2f8e4
fix getUserDetails url
dist/backand.min.js
dist/backand.min.js
/* * Angular SDK to use with backand * @version 1.7.2 - 2015-08-02 * @link https://backand.com * @author Itay Herskovits * @license MIT License, http://www.opensource.org/licenses/MIT */ !function(){"use strict";var a=/\?(data|error)=(.+)/,b=a.exec(location.href);if(b&&b[1]&&b[2]){var c={};c[b[1]]=JSON.parse(decode...
JavaScript
0.000078
@@ -2620,17 +2620,19 @@ piUrl+%22/ -1 +api /account @@ -5214,8 +5214,9 @@ )%7D%5D)%7D(); +%0A
6f74159e959fb7b8ed7e90a93a8c46667362c63a
remove logging
test/override.js
test/override.js
require('should'); var _s = require('underscore.string'); var DeDot = require('../dedot.js'); describe("DeDot test:", function () { it("Redefinition should _not_ fail if override is true", function (done) { DeDot.override = true; var obj = { 'some': 'value', 'already': 'set' }; DeDot...
JavaScript
0.000001
@@ -1226,30 +1226,8 @@ ds); -%0A console.log(row); %0A%0A
9f984def17031bb943b8a753a18c9b517d3dee10
Switch copy name back to 'n'
app/itemIdCopy.js
app/itemIdCopy.js
const logger = require('logger.js'); const $ = jQuery = require('jquery'); require('jquery-toast-plugin'); let mousePositionX; let mousePositionY; $("body").mousemove(function(event) { // When scrolling, need to take viewport in to account mousePositionX = event.pageX - window.pageXOffset; mousePositionY = even...
JavaScript
0.000025
@@ -1297,17 +1297,17 @@ p.bind(' -m +n ', funct
546b58b359a45d3f9dc831026cc07c1973d6a332
Allow url-loader to embed all sort of images
config/webpack-base.js
config/webpack-base.js
const path = require('path'); const paths = require('../config/paths'); // Webpack plugins const StyleLintPlugin = require('stylelint-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: paths.indexJs, output: { // Needs to be an absolute path path...
JavaScript
0
@@ -2553,49 +2553,149 @@ low -importing SVG files%0A %7B%0A test: +embedding assets smaller than specified limit in bytes as data URLs to avoid requests.%0A %7B%0A test: %5B/%5C.gif$/, /%5C.jpe?g$/, /%5C.png$/, /%5C. @@ -2699,16 +2699,17 @@ /%5C.svg$/ +%5D ,%0A @@ -2702,35 +2702,38 @...
781c31452dfbf77f82007b8046d8327a8c285551
use new context API: withStripes()
Pluggable.js
Pluggable.js
import React from 'react'; import PropTypes from 'prop-types'; import { modules } from 'stripes-config'; // eslint-disable-line import/no-unresolved const Pluggable = (props, context) => { const plugins = modules.plugin || []; let best; const wanted = context.stripes.plugins[props.type]; // "@@" is a special ...
JavaScript
0.000001
@@ -56,16 +56,86 @@ types';%0A +import %7B withStripes %7D from '@folio/stripes-core/src/StripesContext';%0A import %7B @@ -194,29 +194,8 @@ line - import/no-unresolved %0A%0Aco @@ -220,17 +220,8 @@ rops -, context ) =%3E @@ -289,31 +289,29 @@ st wanted = -context +props .stripes.plu @@ -653,23 +653,21 @@ Chi...
40040353cc11aef7a853eef9dd7d3906528d7da2
Update Pong.js
Pong/Pong.js
Pong/Pong.js
var BY, BX, T, BDY, BDX; var Pb, Bot; var PtsA = 0, PtsB = 0; function setup() { background(0); createCanvas(1080, 720); BY = height/2; BX = width/2; BDY = random(-7, 7); BDX = 2; T = random(1, 10); Pb = height/2-15; } function draw() { background(0); textSize(20); fill(255); text("©Javi", wid...
JavaScript
0.000001
@@ -670,17 +670,17 @@ 2 && Pb -%3E +%3C width-6 @@ -687,17 +687,17 @@ 0 && Pb -%3C +%3E 0) %7B%0A
7962e1a571a31ede0e6b04ed820e548676c300d7
Fix a bug in Node.js of WinOS
tests/specs/module/cache/main.js
tests/specs/module/cache/main.js
global.cache_g = 0 // For Node.js var _require = typeof require === 'function' ? require : { cache: {} } define(function(require) { var test = require('../../../test') var a = require('./a') test.assert(a.name === 'a', a.name) test.assert(cache_g === 1, 'cache_g = ' + cache_g) var cache = find('module...
JavaScript
0.000031
@@ -674,13 +674,16 @@ ess. -cwd() +execPath .ind
9ddbaca699a7788de5d6f10e46a4cb490034822c
Remove path from io.connect()
game/src/main.js
game/src/main.js
(function(){ 'use strict'; var game = new Phaser.Game(1056, 700, Phaser.AUTO, 'game-container'); // Connect to the socket.io server and add the connection to the current game for future reference: game.state.game.socket = io.connect('http://localhost:3000'); game.state.add('Boot', require('./states/boot')); game.st...
JavaScript
0.000001
@@ -232,31 +232,8 @@ ect( -'http://localhost:3000' );%0A%0A
3a5de0c7f5c6ad58ffee0c07e8e8bb72382598a3
Add testRef assertion to innerRef test
src/test/basic.test.js
src/test/basic.test.js
// @flow import React, { Component } from 'react' import expect from 'expect' import { shallow, mount } from 'enzyme' import jsdom from 'mocha-jsdom' import styleSheet from '../models/StyleSheet' import { resetStyled, expectCSSMatches } from './utils' let styled describe('basic', () => { /** * Make sure the set...
JavaScript
0
@@ -2095,68 +2095,27 @@ c -onst StyledComp = styled.div%60%60%0A class WrappedStyledComp +lass InnerComponent ext @@ -2123,14 +2123,8 @@ nds -React. Comp @@ -2171,22 +2171,21 @@ urn -(%0A +null%0A %3CSty @@ -2184,140 +2184,93 @@ -%3CStyledComp %7B...this.props%7D /%3E%0A )%...
9fbac29486954da738c88933ab605ebc64dec690
Correct mocks placement in gql-server
src/test/gql-server.js
src/test/gql-server.js
import graphqlHTTP from "express-graphql" import express from "express" import bodyParser from "body-parser" import { makeExecutableSchema, addMockFunctionsToSchema } from "graphql-tools" export const invokeError = status => (req, res, next) => { const err = new Error() err.status = status next(err) } const exa...
JavaScript
0
@@ -559,19 +559,8 @@ ma,%0A - mocks,%0A %7D) @@ -607,16 +607,23 @@ ecSchema +, mocks %7D)%0A ap
017dcb03b86233b32aebefdcc9dff7bb8877b15f
Remove unused code.
src/test/index-spec.js
src/test/index-spec.js
import assert from 'assert'; describe('tests run', function() { it('should', function() { assert.equal(1, 1); }); }); /** x get out all paths out of the JSON x group the katas - sort the kata groups (somehow???) - generate the tddbin link object */ describe('convert github data', function() { it('to a ...
JavaScript
0
@@ -27,106 +27,8 @@ ';%0A%0A -describe('tests run', function() %7B%0A it('should', function() %7B%0A assert.equal(1, 1);%0A %7D);%0A%7D);%0A%0A /**%0A @@ -121,17 +121,17 @@ ow???)%0A -- +x generat
f17f82885d8bb38403f5c155c1733e7d399bb2b6
insert trackingId
gatsby-config.js
gatsby-config.js
module.exports = { siteMetadata: { title: 'Medienformatik Richard Sternagel', domain: 'rsternagel.de' }, plugins: [ { resolve: `gatsby-source-filesystem`, options: { path: `${__dirname}/src/pages`, name: 'pages', }, }, `gatsby-transformer-remark`, `gatsby-...
JavaScript
0
@@ -1095,10 +1095,8 @@ -// trac @@ -1107,35 +1107,23 @@ Id: -%60ADD YOUR TRACKING ID HERE%60 +'UA-22466234-1' ,%0A
07a76e878734d2546bdc585173da9d0e42fb89fa
update gatsby-config
gatsby-config.js
gatsby-config.js
const { version, homepage, repository } = require('./package.json'); module.exports = { plugins: [ { resolve: '@antv/gatsby-theme-antv', options: { GATrackingId: 'UA-148148901-4', }, }, ], // Customize your site metadata: siteMetadata: { title: 'G6', description: 'A co...
JavaScript
0.000001
@@ -216,16 +216,62 @@ %0A %7D,%0A + '@babel/plugin-proposal-class-properties'%0A %5D,%0A /
0a5559f19c21f456704d64411a813ebbb15b7936
Fix location to savegraph.html
app/scripts/edit.js
app/scripts/edit.js
/* jshint devel:true */ /* global ace, cytoscape, saveAs, require */ (function(){'use strict'; var editor; var collector = require('./collectdata'); var graph; var graphPane; var graphStyleP = $.ajax({ url: 'styles/main.cycss', type: 'GET', dataType: 'text' }); editor = ace.edit('jsoneditor'); editor.set...
JavaScript
0.000001
@@ -2625,17 +2625,16 @@ w.open(' -/ savegrap
da5a1ea6335317d8b82e1ff707c60552ecb988a0
Allow data to be sent back in AJAX response
controllers/helpers.js
controllers/helpers.js
exports.toObjectId = function (str) { var ObjectId = (require('mongoose').Types.ObjectId); return new ObjectId(str); }; exports.respondToAjax = function (res) { return function (err) { var error = null; if (err) { error = err; } res.json({ error: erro...
JavaScript
0
@@ -183,24 +183,30 @@ unction (err +, data ) %7B%0A @@ -322,16 +322,40 @@ error,%0A + data: data,%0A
9fd5c00f9a3ea3934ac4921c40990b3ccc56dcb5
fix the error in autocomplete.js
portality/static/js/autocomplete.js
portality/static/js/autocomplete.js
function autocomplete(selector, doc_field, doc_type, mininput, include_input, allow_clear) { var doc_type = doc_type || "journal"; var mininput = mininput === undefined ? 3 : mininput; var include_input = include_input === undefined ? true : include_input; var allow_clear = allow_clear === undefined ? ...
JavaScript
0.998523
@@ -450,37 +450,16 @@ + doc_f -function autocomplete ield,%0A
c18a8ff286ed7ea515ca8e5527d525f8860d7410
fix bug
src/toaster/Toaster.js
src/toaster/Toaster.js
import React from 'react'; import cx from 'classnames'; import ReactTransitionGroup from 'react/lib/ReactTransitionGroup'; import cloneWithProps from 'react/lib/cloneWithProps'; import { warn } from '../utils/log'; import TransitionWrapper from '../transition-wrapper/TransitionWrapper'; /** * ### Renders and animates...
JavaScript
0.000001
@@ -1571,24 +1571,26 @@ r : -this.get +React.find DOMNode( ).pa @@ -1585,16 +1585,20 @@ DOMNode( +this ).parent
5a42eac8e53cacdb56c5610238dd5167b966f87f
Remove unnecessary declarations
tests/unit/models/custom-test.js
tests/unit/models/custom-test.js
import DS from 'ember-data'; import Ember from 'ember'; import { test, moduleForModel } from 'ember-qunit'; import startApp from '../../helpers/start-app'; import ApplicationSerializer from 'prototype-ember-cli-application/serializers/application'; var CustomModel; var CustomSerializer; var App; // TODO: remove it, i...
JavaScript
0.001063
@@ -62,28 +62,20 @@ t %7B -test, moduleForModel +module, test %7D f @@ -79,22 +79,16 @@ %7D from ' -ember- qunit';%0A @@ -282,91 +282,56 @@ p;%0A%0A -// TODO: remove it, it is custom model, not employee.%0AmoduleForModel('employee +module('Test detail load for custom class ', %7B%0A + // @@ -390,16 +390,18...
2a2485e7cdae28cd10155294baaebf7ac6e875a0
Update tooltip.js
src/tooltip/tooltip.js
src/tooltip/tooltip.js
var pk = pk || {}; /** Class used for creating tooltips HTML <span id='tooltip'>Show Tooltip</span> Javascript: pk.tooltip({ element:document.getElementById('tooltip'), content:'Tooltip content', position:'left' }); @class pk.tooltip @constructor @param options {Object} @param options.element {Object} ...
JavaScript
0.000001
@@ -50,16 +50,312 @@ oltips%0A%0A +%3Cdiv class='info-well'%3E%0AThe value passed to the %60position%60 attribute is added to the tooltip as a CSS class of the format %60pk-*position*%60. Custom positions containing the keywords %60top%60, %60left%60, %60bottom%60 and/or %60right%60 can be applied to assume the releva...
57aa0f63361ec95c1ec871162ccf681ff833b6dc
Include the huntgroup for first request
the-graph/the-graph-clipboard.js
the-graph/the-graph-clipboard.js
/** * Created by mpricope on 05.09.14. */ (function (context) { "use strict"; var TheGraph = context.TheGraph; TheGraph.Clipboard = {}; var clipboardContent = {}; var cloneObject = function (obj) { return JSON.parse(JSON.stringify(obj)); }; var makeNewId = function (label) { var num = 604661...
JavaScript
0
@@ -2534,20 +2534,16 @@ node) %7B%0A - %0A var @@ -2973,16 +2973,32 @@ rence%22,%0A + %22huntgrp%22%0A %5D;%0A%0A
f71dff316ec06e8dcd65f54c7b65cfa95bad4eca
update timeout bumped to 48 hours
src/utils/constants.js
src/utils/constants.js
#!/usr/bin/env node 'use strict'; const homedir = require('homedir'); const Chalk = require('chalk'); const HIVE_GITHUB_URL = 'https://github.com/cesarferreira/drone-hive'; const DRONE_HOME_DIR = `${homedir()}/.drone`; const HIVE_HOME_DIR = `${DRONE_HOME_DIR}/drone-hive`; const HIVE_LIBS_DIR = `${HIVE_HOME_DIR}/hive`...
JavaScript
0
@@ -473,19 +473,26 @@ * 60 + * 48 ; // -1 +48 hour +s in
35a3bb7023433f17555fdeb1e966e7816d9e8f60
Fix early return for cached `false` values in `importLocalName` (#234)
src/utils/detectors.js
src/utils/detectors.js
const VALID_TOP_LEVEL_IMPORT_PATHS = [ 'styled-components', 'styled-components/no-tags', 'styled-components/native', 'styled-components/primitives', ] export const isValidTopLevelImport = x => VALID_TOP_LEVEL_IMPORT_PATHS.includes(x) const localNameCache = {} export const importLocalName = (name, state, by...
JavaScript
0.000008
@@ -410,16 +410,28 @@ Cache && + cacheKey in localNa @@ -437,26 +437,16 @@ ameCache -%5BcacheKey%5D ) %7B%0A
3bc38971d405b07e8a0a847fd35623bb7e280d33
Rename `assert` to `okay`.
prolific.collector/t/collector.t.js
prolific.collector/t/collector.t.js
require('proof')(15, prove) function prove (assert) { var Chunk = require('prolific.chunk') var Collector = require('../collector') var collector = new Collector(false) collector.scan(Buffer.from('x\n')) assert(collector.stderr.shift().toString(), 'x\n', 'stdout not header') collector.scan(Buf...
JavaScript
0.000779
@@ -38,22 +38,20 @@ prove ( -assert +okay ) %7B%0A @@ -209,38 +209,36 @@ rom('x%5Cn'))%0A -assert +okay (collector.stder @@ -346,30 +346,28 @@ 0%5Cn'))%0A -assert +okay (collector.s @@ -654,30 +654,28 @@ uffer)%0A%0A -assert +okay (collector.c @@ -763,38 +763,36 @@ k.checksum%0A%0A -asser...
696422ec6ae32ca09a8f8f6f32720bef199ea894
Add error handling on travis reporting
ci/report.js
ci/report.js
#!/usr/bin/env node /** * Send reports. */ 'use strict' process.chdir(`${__dirname}/..`) const apeTasking = require('ape-tasking') const apeReporting = require('ape-reporting') apeTasking.runTasks('report', [ () => apeReporting.sendToCodeclimate('coverage/lcov.info', {}) ], true)
JavaScript
0
@@ -273,16 +273,59 @@ fo', %7B%7D) +.catch(%0A (err) =%3E console.error(err)%0A ) %0A%5D, true
f7578fec797d8d3ac99b40f083d615d2c4cca9c9
Make links from @login in posts and comments
public/js/app/helpers/Handlebars.js
public/js/app/helpers/Handlebars.js
define(["app/app", "ember"], function(App, Ember) { Ember.Handlebars.registerBoundHelper('prettifyText', function(content) { var text = $('<span/>').text(content) // wrap anchor tags around links in post text text.anchorTextUrls() // please read // https://github.com/kswedberg/jquery-expander/is...
JavaScript
0
@@ -610,16 +610,331 @@ // %7D)%0A%0A + var html = text.html()%0A%0A // make links from @login%0A var parts = html.split(/(%3C.*?%3E)/g), i%0A for (i = 0; i %3C parts.length; i += 4) %7B%0A parts%5Bi%5D = parts%5Bi%5D.replace(/%5CB@(%5Ba-z0-9%5D+)/g, function(u) %7B%0A return '%3Ca href=%22/' +...
624b6a3ce307d2410ace18343a7a4c6c5237b219
修复 avalon 执行 bug
static/src/js/build.js
static/src/js/build.js
({ // RequireJS 通过一个相对的路径 baseUrl来加载所有代码。baseUrl通常被设置成data-main属性指定脚本的同级目录。 baseUrl: "./js", // 第三方脚本模块的别名,jquery比libs/jquery-1.11.1.min.js简洁明了; paths: { jquery: "empty:", avalon: "lib/avalon/avalon", editor: "utils/editor", uploader: "utils/uploader", formValidation: "uti...
JavaScript
0
@@ -201,25 +201,14 @@ n: %22 -lib/avalon/avalon +empty: %22,%0A @@ -3019,50 +3019,1241 @@ : %5B%0A -%0A %7B%0A name: %22addContest_1 + %7B%0A name: %22addProblem_0_pack%22%0A %7D,%0A %7B%0A name: %22addContest_1_pack%22%0A %7D,%0A %7B%0A ...
e9b9bbc46b93c62cfbb4daede055f362211db007
Update DIG wallet balance fetch error
SBSE.meta.js
SBSE.meta.js
// ==UserScript== // @version 1.13.0 // ==/UserScript==
JavaScript
0
@@ -32,9 +32,9 @@ .13. -0 +1 %0A//
7630fc97636c27244cd65bd93152f0489e145a03
Update templates to add a key and length of all templates in collection
Templates.js
Templates.js
/** * TEMPLATES * Template parsing with jQuery and Hogan * * Hogan: http://twitter.github.io/hogan.js/ * Mustache: http://mustache.github.io/ * * Templates with `x-template` get indexed by their name and injected into the * DOM where `x-template-inject` matches the template's name. * * To inject a specific te...
JavaScript
0
@@ -2437,16 +2437,73 @@ .__name; +%0A data%5Bi%5D%5B'@key'%5D = i;%0A data%5Bi%5D.count = length; %0A%0A
1d9f52e765786b9f545a8348200ec8f326667667
Use jquery instead of jQuery with AMD
Templates.js
Templates.js
/** * TEMPLATES * Template parsing with jQuery and Hogan * * Hogan: http://twitter.github.io/hogan.js/ * Mustache: http://mustache.github.io/ * * Templates with `x-template` get indexed by their name and injected into the * DOM where `x-template-inject` matches the template's name. * * To inject a specific te...
JavaScript
0.000001
@@ -3900,17 +3900,17 @@ es', %5B'j -Q +q uery', '
0542d4bc2b4113b9d9e374f252b237b2dcd76426
Check & warn if pools use SQLite3 :memory: databases (#46)
any-db/index.js
any-db/index.js
var ConnectionPool = require('any-db-pool') var parseDbUrl = require('./lib/parse-url') var Transaction = require('./lib/transaction') Object.defineProperty(exports, 'adapters', { get: function () { throw new Error( "Replace require('any-db').adapters.<blah> with require('any-db-<blah>')" ) } ...
JavaScript
0
@@ -882,16 +882,447 @@ dbUrl);%0A + %0A if (adapterConfig.adapter === 'sqlite3' && /:memory:$/i.test(adapterConfig.database)) %7B%0A if (poolConfig.min %3E 1 %7C%7C poolConfig.max %3E 1) %7B%0A console.warn(%0A %22Pools of more than 1 connection do not work for in-memory SQLite3 databases%5Cn%22 +%0A ...
6e7eaa5b9a21e1f0e3511d7fe3f7d9ad89a0554b
Redefine method calls to use this
jasmine/src/invertedIndex.js
jasmine/src/invertedIndex.js
/* This file require running it on HTTP Server for the JQuery AJAX file reading functionality to work */ // uncomment the variable and equate it to the file path to load file contents //var dataSource = 'books.json'; //main get index function var Index = function(source, searchKeys) {}; //function to read file con...
JavaScript
0.000006
@@ -89,17 +89,16 @@ ality to - %0Awork */ @@ -379,16 +379,17 @@ eck file +s type if @@ -710,25 +710,199 @@ -bookData = files; +if (typeof files === typeof JSON && files !== null && files !== %7B%7D) %7B%0A bookData = files;%0A %7D else %7B%0A console.log('cannot read data, please provide a file...
dc3cdd726868647c198c05083030170ccbdd2442
Enable grok the docs ssl
media/javascript/rtd.js
media/javascript/rtd.js
(function () { var checkVersion = function (slug, version) { var versionURL = ["//readthedocs.org/api/v1/version/", slug, "/highest/", version, "/?callback=?"].join(""); $.getJSON(versionURL, onData); function onData (data) { if (data.is_highest) { return; } ...
JavaScript
0.000001
@@ -1760,13 +1760,8 @@ l: ' -http: //ap @@ -2871,53 +2871,149 @@ var -page = page_name%0A var id = element.id%0A +id = element.id%0A if (typeof page_name != %22undefined%22) %7B%0A var page = page_name%0A %7D else %7B%0A var page = null%0A %7D%0A @@ -3058,34 +3058,32 @@...
96a9d809d24a626e28970a6e90fef05bdfedb2f6
Update dom.js
javascript/dom.js
javascript/dom.js
function id(x) {return document.getElementById(x);} function cls(x) {return document.getElementsByClassName(x);} function value(x) {return id(x).value;}
JavaScript
0.000001
@@ -146,8 +146,68 @@ value;%7D%0A +function setHTML(to, from) %7Bto.innerHTML = from.innerHTML;%7D%0A
2cd77cd04691b38d593b009366f420877a3d3534
Update tests to use .type() instead of .a()
test/profiles.js
test/profiles.js
var should = require('should'); var profiler = require('../'); describe('profiles', function () { var test; function validateNode (node) { var numbers = [ 'childrenCount' , 'callUid' , 'selfSamplesCount' , 'totalSamplesCount' , 'selfTime' , 'totalTime' , 'lineNumber' ...
JavaScript
0
@@ -383,17 +383,20 @@ ould.be. -a +type ('number @@ -429,33 +429,36 @@ tName.should.be. -a +type ('string');%0A @@ -485,17 +485,20 @@ ould.be. -a +type ('string @@ -723,33 +723,36 @@ iling.should.be. -a +type ('function');%0A%0A @@ -822,33 +822,36 @@ iling.should.be. -a +type ('function');%0A @@ -1224,...
6c7fc1284e7506e45f9b489bc032c01da132b73b
Connect and Config
fruit.js
fruit.js
/* بسم الله الرحمن الرحيم */ module.exports = (function () { var defer = require('./lib/defer') , modelFactory = require('./lib/model-factory') function Fruit (adapter) { var _adapter = adapter; this.adapterType = adapter.type function getResponseHandler (deferred, forma...
JavaScript
0
@@ -491,32 +491,376 @@ %7D%0A %7D%0A %0A + this.connect = function (config) %7B%0A var deferred = defer();%0A _adapter.connect(config, function(err) %7B%0A if(err) deferred.reject(err);%0A else deferred.resolve();%0A %7D);%0A return deferred.getPromise();%0A %7D%0A ...
6cbdb65f6e21f96dd32826bf377aeacf70bbe030
Add tests ensuring correct escaping of ANSI chars on line refresh
test/readline.js
test/readline.js
var assert = require("assert"); var rawReadline = require("readline"); var readline2 = require(".."); var _ = require("lodash"); var through2 = require("through2"); var chalk = require("chalk"); var sinon = require("sinon"); /** * Assert an Object implements an interface * @param {Object} subject - subject im...
JavaScript
0
@@ -1716,298 +1716,118 @@ %0A%0A -// FIXME: When line is refreshed, ANSI deleted char are printed, we'd need to get%0A // rid of those to compare the result%0A xit(%22escape ANSI character in prompt%22, function() %7B%0A var content = %22%22;%0A this.rl.output.on(%22data%22, function( chunk ) %7B%0A con...
3cf845ce6b2527911c1eb94f779d0506914b7d2c
Update package dependencies. Temporarily use appworkshop:push to use latest cordova plugins.
package.js
package.js
Package.describe({ name: 'appworkshop:raix-push-config', version: '1.0.0', // Brief, one-line summary of the package. summary: 'Configure raix:push with sensible defaults for both client and server', // URL to the Git repository containing the source code for this package. git: 'https://github.com/AppWorksh...
JavaScript
0
@@ -68,17 +68,17 @@ n: '1.0. -0 +1 ',%0A // @@ -571,13 +571,13 @@ ('1. -3.2.4 +4.1.1 ');%0A @@ -694,17 +694,17 @@ 1.0. -2 +5 %22,%0A %22 raix @@ -699,20 +699,27 @@ %22,%0A %22 -raix +appworkshop :push@3. @@ -725,17 +725,17 @@ .0.3-rc. -5 +8 %22,%0A %22 @@ -804,25 +804,43 @@ (%5B%0A ' -raix:pus...
6ae60a98ea48100d9f69e1371b2065cde7aaf013
Fix issue with multiple PluginInstance plugins
core/PluginInstance.js
core/PluginInstance.js
var fs = require('fs'); function PluginCreateInstance(pluginInst) { var inst = new PluginInstance(); inst.prototype = pluginInst; return inst; } var PluginInstance = function () { this.pinst = this; this.files = []; }; PluginInstance.prototype.events = {}; PluginInstance.prototype.events.onLoad ...
JavaScript
0
@@ -18,16 +18,34 @@ 'fs');%0A%0A +var events = %7B%7D;%0A%0A function @@ -253,288 +253,136 @@ %5B%5D;%0A -%7D;%0A%0APluginInstance.prototype.events = %7B%7D;%0A%0APluginInstance.prototype.events.onLoad = function (_plugin) %7B%0A this.plugin = _plugin;%0A this.manager = _plugin.manager;%0A this.core = this....
5ef533c0897a2813a0dc0697e393e3d0ea2252c7
Add missing GamePad supporting function
Web/Siv3D.js
Web/Siv3D.js
mergeInto(LibraryManager.library, { glfwGetKeysSiv3D: function (windowid) { const window = GLFW.WindowFromId(windowid); if (!window) return 0; if (!window.keysBuffer) { window.keysBuffer = Module._malloc(349 /* GLFW_KEY_LAST + 1 */) } Module.HEAPU8.set(window.keys...
JavaScript
0
@@ -29,16 +29,312 @@ rary, %7B%0A + //%0A // GamePads%0A //%0A siv3dGetJoystickInfo: function(joystickId) %7B%0A return GLFW.joys%5BjoystickId%5D.id;%0A %7D,%0A siv3dGetJoystickInfo__sig: %22iiiii%22,%0A%0A glfwGetJoystickHats: function () %7B%0A // Not supported.%0A return 0;...
0c2b06d337e8f667434be69c2faddadc5e8a2bc0
remove useless line
jest.config.js
jest.config.js
module.exports = { browser: true, verbose: false, collectCoverage: true, collectCoverageFrom: [ 'src/app/**/*.js', ], setupFiles: [ 'jest-localstorage-mock', 'jest-mock-console', ], moduleNameMapper: { '\\.scss$': '<rootDir>/test/mocks/style.js', '@/(.*)$': '<rootDir>/src/app/$1', ...
JavaScript
0.000026
@@ -360,12 +360,11 @@ ',%0A %7D,%0A -%0A %7D;%0A
a11cf7f5adc87446df1fe74a5d628bd7b373a785
Add missing tests
test/test-url.js
test/test-url.js
var url = require("./url"); var targetClean = "http://redirection.target.com/?some=parameter&some-other=parameter;yet-another=parameter#some-fragment"; var targetEncoded = encodeURIComponent(targetClean); var tests = [ [targetClean, undefined], ["http://some.website.com/?target=" + targetEncoded, targetClean...
JavaScript
0.00007
@@ -199,16 +199,77 @@ tClean); +%0Avar targetDoubleEncoded = encodeURIComponent(targetEncoded); %0A%0Avar te @@ -744,16 +744,484 @@ fined%5D,%0A + %5B%22http://some.website.com/?target=%22 + targetDoubleEncoded, targetClean%5D,%0A %5B%22http://some.website.com/?target=%22 + targetDoubleEncoded + %22&some=param...
be7d4c2f2dc4e39af8c863ba7604688c4a1c4d93
remove unused import
addon/utils/update.js
addon/utils/update.js
import Ember from 'ember'; const { get, set, assign } = Ember; // Usage: update(person, 'name', (name) => name.toUpperCase()) export default function update(obj, key, updateFn) { let property = get(obj, key); let newValue = updateFn(property); set(obj, key, newValue); }
JavaScript
0.000001
@@ -41,16 +41,8 @@ set -, assign %7D =
007761b1e7b413b9dce3d97ac267028189ec2293
add csrf capabilities to form register header using axios.
web/project/dashboard/src/actions/authActions.js
web/project/dashboard/src/actions/authActions.js
import axios from 'axios'; import setAuthorizationToken from '../utils/setAuthorizationToken'; export function login(data){ var headers = { 'Content-Type':'application/json' } return dispatch => { return axios.post('api/login', data, headers).then( res => { const is_staff = res.data.i...
JavaScript
0
@@ -89,16 +89,109 @@ oken';%0A%0A +axios.defaults.xsrfCookieName = 'csrftoken';%0Aaxios.defaults.xsrfHeaderName = 'X-CSRFToken';%0A%0A export f @@ -233,16 +233,18 @@ = %7B%0A + 'Content @@ -272,16 +272,17 @@ son'%0A %7D +; %0A retur @@ -669,8 +669,9 @@ )%0A%7D%7D%0A +%0A
c06d516cfdf072c8e7b020328034aabf76eb9f16
add link to export format docs
ui/app/components/ChooseFormats.js
ui/app/components/ChooseFormats.js
import React from "react"; import { FormattedMessage } from "react-intl"; import { Row } from "react-bootstrap"; import { Link } from "react-router-dom"; import { Field } from "redux-form"; import { AVAILABLE_EXPORT_FORMATS, getFormatCheckboxes, renderCheckboxes } from "./utils"; export default ({ next }) => ...
JavaScript
0
@@ -426,16 +426,146 @@ %7D%0A %3E%0A + &nbsp; See %3CLink to=%22/learn/export_formats%22 target=%22_blank%22%3ELearn (Export Formats)%3C/Link%3E for details on each file format.%0A %7Bg
77661282202f25c6bafa9afc0047e0306d1427aa
add time to twitter endpoint
jobs/social.js
jobs/social.js
//get username keys from config file var config = require('../config.js'); //save.js to save json var save = require('../save.js'); //request for simple http calls var request = require('request'); // async to make batch HTTP easy var async = require('async'); // twitter for ... twitter var Twitter = require('twitter')...
JavaScript
0.000016
@@ -2568,16 +2568,54 @@ t_count; +%0A%09 %09tweet.time = data%5Bi%5D.created_at; %0A%0A%09 %09/
d11bfa5a4d165f70eb0864ca7ded1fd34f219cbb
Remove default prefix.
jquery.thar.js
jquery.thar.js
/*! * thar - Automatic content anchors * https://github.com/gocom/jquery.thar * * Copyright (C) 2013 Jukka Svahn * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction,...
JavaScript
0
@@ -2097,21 +2097,16 @@ fix' : ' -thar- ',%0A%09%09%09'a
dde1d80cc3d98a35f0e9e058a225dd87c54694dc
Fix one off error in broken test
test/time-ago.js
test/time-ago.js
suite('time-ago', function() { let dateNow function freezeTime(expected) { dateNow = Date function MockDate(...args) { if (args.length) { return new dateNow(...args) } return new dateNow(expected) } MockDate.UTC = dateNow.UTC MockDate.parse = dateNow.parse MockDa...
JavaScript
0.000575
@@ -2499,18 +2499,17 @@ e(2018, -10 +9 , 1).toI
68fc23983985f691d40e40d87cdf54d3cc154319
Clean up tests a little bit. Clarify problems with IE in comments next to tests that ensure their behaviour.
test/unit/dom.js
test/unit/dom.js
import helpers from '../lib/helpers'; import skate from '../../src/skate'; describe('DOM', function () { describe('General DOM node interaction.', function () { it('Modules should pick up nodes already in the DOM.', function (done) { var calls = 0; helpers.fixture('<div><my-element-1></my-element-1>...
JavaScript
0
@@ -254,32 +254,43 @@ lls = 0;%0A%0A +skate.init( helpers.fixture( @@ -336,48 +336,11 @@ v%3E') -;%0A skate.init(helpers.fixture() );%0A -%0A @@ -771,32 +771,43 @@ %7D);%0A%0A +skate.init( helpers.fixture( @@ -853,44 +853,8 @@ v%3E') -;%0A skate.init(helpers.fixture() );%0A @@ ...
49b126c78ae10b18d73631b5ad739f275b98c72b
Update AllSites.js
js/AllSites.js
js/AllSites.js
/* How this works: this takes what you write and change it into HTML code (see Sites.js for more info) How to use: NedTool("Name", "Link to site", "Link to image"); <-- This has been replaced (for the most part) with DNedTool DNedTool("Name", "Link to image"); <-- This is a direct version of NedTool where t...
JavaScript
0
@@ -716,16 +716,101 @@ %22);%0A*/%0A%0A +// All the images are found on Google with usage rights set to 'Labeled for reuse'.%0A%0A function @@ -1087,118 +1087,20 @@ i%22); -%0A DNedTool(%22Calendar%22, %22pixabay.com/static/uploads/photo/2016/01/20/10/52/maintenance-1151312_960_720.png%22); + Not working %0A @...
e95bf23b70d78e91e22b26eaaa60a7e1f96d875a
add test
test/unittest.js
test/unittest.js
/*jslint node: true */ "use strict"; var assert = require("assert"); var PDCP = require("../lib/pdcp"); var e_key = new Buffer([0xb0, 0x8c, 0x70, 0xcf, 0xbc, 0xb0, 0xeb, 0x6c, 0xab, 0x7e, 0x82, 0xc6, 0xb7, 0x5d, 0xa5, 0x20, 0x72, 0xae, 0x62, 0xb2, 0xbf, 0x4b, 0x99, 0x0b, 0xb8, 0x0a, 0x48, 0xd8, 0x14, 0x1e, 0xec, 0x...
JavaScript
0.000002
@@ -1546,24 +1546,427 @@ e();%0A%09%7D);%0A%0A%0A +%09it('crypt same price twice with same iv provide diferent result', function(done) %7B%0A%09%09var price = 10000000;%0A%09%09var iv = new Buffer(%5B0x00, 0x8c, 0x70, 0xcf, 0xbc, 0xb0, 0xeb, 0x6c, 0xab, 0x7e, 0x82, 0xc6, 0xb7, 0x5d, 0xa5, 0x21%5D);%0A%09%09var enc_p...
9c3dd9d7c6c9843aa4e17e67bc7172e77f59a483
Make ShowCard a clickable link to show details page.
js/ShowCard.js
js/ShowCard.js
import React from 'react' const { shape, string } = React.PropTypes const ShowCard = React.createClass({ // propTypes are things I expect to get from my parent. propTypes: { show: shape({ poster: string, title: string, year: string, description: string }) }, render () { co...
JavaScript
0
@@ -19,16 +19,53 @@ 'react'%0A +import %7B Link %7D from 'react-router'%0A%0A const %7B @@ -309,16 +309,38 @@ ription: + string,%0A imdbID: string%0A @@ -410,16 +410,24 @@ cription +, imdbID %7D = thi @@ -452,16 +452,57 @@ eturn (%0A + %3CLink to=%7B%60/details/$%7BimdbID%7D%60%7D%3E%0A %3C...
655bfda8ff9e9b0e15abe52c164945761c7d1b81
Add defualt grunt task -> `tdd`
grunt/aliases.js
grunt/aliases.js
module.exports = { // Linting // ------------------------- lint: ['jshint:all'], // Testing // ------------------------- test: ['karma:unit'], coverage: ['karma:coverage'], tdd: ['karma:tdd'] };
JavaScript
0.000026
@@ -195,13 +195,76 @@ ma:tdd'%5D +,%0A%0A%0A%09// Default%0A%09// -------------------------%0A%09default: %5B'tdd'%5D %0A%0A%7D;%0A
e940fa22df15dcb59f44fff0e8e7b56bac1d528a
Update 'query' key to 'influxql'
ui/src/dashboards/actions/index.js
ui/src/dashboards/actions/index.js
import { getDashboards as getDashboardsAJAX, updateDashboard as updateDashboardAJAX, deleteDashboard as deleteDashboardAJAX, updateDashboardCell as updateDashboardCellAJAX, addDashboardCell as addDashboardCellAJAX, deleteDashboardCell as deleteDashboardCellAJAX, } from 'src/dashboards/apis' import {publish...
JavaScript
0
@@ -3113,21 +3113,24 @@ ,%0A -query +influxql : 'SHOW
c64ac0a237b29cf8315a042db8a3536ca9e857ab
Add a condition for the end of a subreddit.
js/behavior.js
js/behavior.js
document.getElementById( 'settings' ).onclick = function( e ) { $( '.bubble' ).toggle(); e.stopPropagation(); return false; }; document.onclick = function() { $( '.bubble' ).hide(); }; $( '.bubble' ).click( function( e ) { e.stopPropagation(); } ); var items = [], current = -1, downloading = false;...
JavaScript
0.000031
@@ -1109,16 +1109,55 @@ false;%0A + var prevlength = items.length;%0A @@ -1199,24 +1199,326 @@ children );%0A + var newlength = items.length;%0A%0A if ( prevlength == newlength ) %7B%0A // we ran out of pages%0A console.log( 'End of subreddit.' );%0A $(...
b41bda569d96a516cf1374509e51ff2ea03070ae
Change method for check if pass dev parameter
js/electron.js
js/electron.js
/* jshint esversion: 6 */ "use strict"; const Server = require(__dirname + "/server.js"); const electron = require("electron"); const core = require(__dirname + "/app.js"); // Config var config = {}; // Module to control application life. const app = electron.app; // Module to create native browser window. const Bro...
JavaScript
0
@@ -1462,16 +1462,17 @@ dev%22%0A%09if + (process @@ -1480,21 +1480,25 @@ argv -%5B2%5D == +.includes( %22dev%22) +) %7B%0A%09
6c201e3999a0062a11bc613365a113512223be6b
Disable menu bar completely
js/electron.js
js/electron.js
import {app, BrowserWindow, Menu} from "electron"; // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow; function createWindow () { // This sets the initial window size. // If Sozi has been op...
JavaScript
0
@@ -495,88 +495,8 @@ 00,%0A - autoHideMenuBar: true, // Temporary fix for the non-removable menu bar.%0A @@ -517,16 +517,16 @@ nces: %7B%0A + @@ -566,24 +566,69 @@ %7D%0A %7D);%0A%0A + mainWindow.setMenuBarVisibility(false);%0A%0A if (proc @@ -703,339 +703,15 @@ ();%0A + %7D%...
5c443285c890162e9c9654bad8e9d116654a12d5
fix a warning
js/extended.js
js/extended.js
var extended = {}; // the object that contains the function to make the extended views extended.make = {} extended.make.response = function(context, json) { var key = responseCollectionName(json); var objs = key ? json[key] : []; var type = getType(key); if (! type) { return 'Unknown request type'; }...
JavaScript
0.999951
@@ -2357,41 +2357,8 @@ se;%0A - var type = getType(key);%0A @@ -2481,36 +2481,44 @@ r(context, obj, -type +getType(key) , key, i));%0A @@ -2599,20 +2599,28 @@ n%5Bkey%5D, -type +getType(key) , key));
a53a94b87b066dfde5723a1a7fb8f2ae27f015f9
add image lazyload
js/get_data.js
js/get_data.js
$(function() { $.getJSON("https://mywebservice.info/beautyUniversity/data_out.php", function(data) { var str = ""; for (var i = data.length - 1; i >= 0; i--) { str += "<p><img data-src='"+"https://graph.facebook.com/"+ data[i]["object_id"] + "/picture"+ "' width='300' height='200'></p>"; } $("#main-content...
JavaScript
0.000002
@@ -8,16 +8,60 @@ ion() %7B%0A +%09$('#marker').on('lazyshow', function () %7B%0A%09 %09$.getJS @@ -141,16 +141,17 @@ ta) %7B%0A%09%09 +%09 var str @@ -156,16 +156,17 @@ r = %22%22;%0A +%09 %09%09for (v @@ -204,16 +204,17 @@ i--) %7B%0A +%09 %09%09%09str + @@ -343,11 +343,13 @@ ;%0A%09%09 +%09 %7D%0A%0A +%0...
4265cd00928484fa67ced8d79dda64a1f3d78bc8
Fix humanized editor injection time. Update humanized editor value after image insert dialog background is closed.
js/humanize.js
js/humanize.js
(function () { var originalEditorSelector = '#postingHtmlBox'; function switchToHtmlMode() { var composeModeButtonSelector = 'span.tabs button:first-of-type()'; var composeModeIsOn = $(composeModeButtonSelector).attr('aria-selected') === 'true'; if (composeModeIsOn) { var ht...
JavaScript
0
@@ -2053,41 +2053,8 @@ %7D%0A%0A - // TODO: Intercept image add%0A @@ -2375,177 +2375,414 @@ itor -ContainerSelector = 'div.GCUXF0KCL5';%0A // TODO: Replace with observer.%0A $(document).on('DOMSubtreeModified', originalEditorContainerSelector, function () %7B +Observer = new MutationObserver(...
1c4fcdaf7c8a3ff1af3c1e59ced0f3b6a251f3a5
add click event for wind tap
js/mod/wind.js
js/mod/wind.js
window.Wind = (function (undefined) { 'use strict'; function _calculateRotate (p_touch_x, p_touch_y, p_target_x, p_target_y) { var _PI = Math.atan2(p_touch_x - p_target_x, p_touch_y - p_target_y); return (2 - (_PI/Math.PI + 1))*180; } return function (opt) { var op...
JavaScript
0
@@ -1070,24 +1070,89 @@ Up, false);%0D +%0A options.main.addEventListener('click', touchUp, false);%0D %0A%0D%0A /
455c44730fec831837d2ec29551d09e442b8e401
Increase the pipe gap to deal with clunky hit boxes
js/obstacle.js
js/obstacle.js
function createObstacle(obstacleId, scoreManager) { return { /** * Internal properties, DO NOT write directly to them, used to maintain internal state. **/ props: { id: obstacleId, upperPipe: null, lowerPipe: null, randomChunk: -1, position: -300, hasPassed: false...
JavaScript
0
@@ -2476,17 +2476,17 @@ FSET = 3 -2 +6 0; // Ac
755b0d9ad5e7a433b06b1107b86fb265f13e489a
修改 ChapterObj parse相關方法.
js/readfile.js
js/readfile.js
// 定義 TextContent function TextContent(content){ this.content = content || ""; } TextContent.prototype = { isEmpty : function () { return (this.content == "" || this.content == null); }, AddContent : function (content) { this.content += content; } } // 定義 ChapterObj function ChapterObj(title, content)...
JavaScript
0
@@ -398,16 +398,41 @@ %7C%7C %22%22);%0A + this.parsedTitle = %22%22;%0A this.p @@ -463,16 +463,67 @@ is.parse +AllTitles = function () %7B%7D;%0A this.parseAllContents = funct @@ -1005,16 +1005,21 @@ %7D,%0A set +Title ParseFun @@ -1062,16 +1062,123 @@ is.parse +AllTitles = parseFunction;%0A %7D,%0A set...
078c32e3b8caf277ded636b9b772ae2baa8ae7d2
Remove cosole.log
js/services.js
js/services.js
var Service = function() {}; Service.prototype.get = function(options) { options = $.extend({ cache: true }, options); options.data = $.extend({}, this.defaults, options.data); var method = options.queue ? $.ajaxQueue : $.ajax; return method(options); }; var PubMed = function(options) { this.defa...
JavaScript
0.000001
@@ -5630,35 +5630,8 @@ oc); -%0A console.log(data); %0A%0A
3b6bd3d6c1ed6640b0837577ac40846c35d8e7f7
Update spoilers.js
js/spoilers.js
js/spoilers.js
(function($) { 'use strict'; function init() { $('.spoilers-button').each(function() { var $this = $(this), $parent = $this.parent(), showMsg = $parent.attr('data-showtext') || mw.msg('spoilers_show_default'), hideMsg = $parent.attr('data-hidetext') || mw.msg('spoilers_hide_default'); $this ....
JavaScript
0
@@ -332,32 +332,33 @@ t.children('.spo +i lers-body:visibl
cc2ea98859556ebf1489f92b77fcf7e0dd390c0f
Simplify get
jsonpointer.js
jsonpointer.js
var console = require("console"); var traverse = function(obj, pointer, value) { // assert(isArray(pointer)) var part = unescape(pointer.shift()); if(typeof obj[part] === "undefined") { throw("Value for pointer '" + pointer + "' not found."); return; } if(pointer.length != 0) { // keep traversin! ...
JavaScript
0.000005
@@ -919,36 +919,27 @@ urn obj;%0A %7D - else %7B%0A +%0A - pointer = po @@ -957,34 +957,32 @@ (%22/%22).slice(1);%0A - return travers @@ -998,20 +998,16 @@ inter);%0A - %7D%0A %7D%0A%0Avar s
8ff339f08e827a4db4c856c40f09bd3342cecc5b
Add use strict directive
vendor/assets/javascripts/scrollinity.js
vendor/assets/javascripts/scrollinity.js
$(document).ready(function(){ function load_new_items(){ var sign = load_path.indexOf('?') >= 0 ? '&' : '?' $.get(load_path + sign + 'page=' + (++page_num), function(data, e) { if(data.length < 5) { var page_num = 0; return false; } data_container.append(data); }).comple...
JavaScript
0.000004
@@ -24,16 +24,33 @@ ion()%7B%0A%0A + 'use strict';%0A%0A functi
11b8856af3fae78f548b88ce2f2f7ed59f9f313e
Add function cart_get_orders
public/app.js
public/app.js
function something() { // получаем значение из LocalStorage var x = window.localStorage.getItem('aaa'); //увеличиваем значение на 1 x = x*1 + 1; //устанавливаем значение ключа равному переменной window.localStorage.setItem('aaa',x); alert(x); } function add_to_cart(id) { var key = 'product_' + id...
JavaScript
0.000009
@@ -973,8 +973,467 @@ tems%22;%0A%7D +%0A%0Afunction cart_get_orders()%0A%7B%0A%09var orders = '';%0A%09for (var i = 0; i %3C localStorage.length; i++)%7B%0A %09var key = window.localStorage.key(i) // %D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B0%D0%B5%D0%BC %D0%BA%D0%BB%D1%8E%D1%87%0A %09var value = window.localStorage....
aea72ac2517eb65f8c7e78f6f56a5167da19a912
Use element name for vulcanize
gulpfile.babel.js
gulpfile.babel.js
import gulp from 'gulp'; import del from 'del'; import webpack from 'webpack-stream'; import named from 'vinyl-named'; import csswring from 'csswring'; import autoprefixer from 'autoprefixer'; import wct from 'web-component-tester'; import notify from 'gulp-notify'; import vulcanize from 'gulp-vulcanize'; import gulpif...
JavaScript
0.000003
@@ -581,35 +581,8 @@ nst -name = 'simpla-img',%0A impo @@ -2253,20 +2253,36 @@ p/$%7B -name%7D/$%7Bname +ELEMENT_NAME%7D/$%7BELEMENT_NAME %7D.ht @@ -2293,20 +2293,28 @@ %60.tmp/$%7B -name +ELEMENT_NAME %7D.html%60%5D
c4be18dfea2e57c0dc9a904bc25b8ae6471c6e23
not not not not
public/js/main.js
public/js/main.js
var $ = require('jquery'); var Webrtc2images = require('webrtc2images'); var Fingerprint = require('fingerprintjs'); var crypto = require('crypto'); var music = require('./music'); var services = require('./services'); var socket = io(); var rtc = false; var mp4Support = false; rtc = new Webrtc2images({ width: 200,...
JavaScript
0.998931
@@ -3635,17 +3635,16 @@ if ( -! hidden)
402146360112ecd5e3773d809a94b8aa1f5eef1b
test query strings
tests/inf_cli.js
tests/inf_cli.js
/* informix cli using nodejs-db-informix */ var readline = require('readline'), rl = readline.createInterface(process.stdin, process.stdout); /* * Connection configurations */ // var settings = JSON.parse(require('fs').readFileSync('./tests/db_conf.json','utf8')); var settings = { "host": "" , "user"...
JavaScript
0.000723
@@ -2045,29 +2045,30 @@ %22 -select first +SELECT FIRST 1 +0 * -from +FROM sys @@ -2844,32 +2844,32 @@ )%0A - @@ -2877,24 +2877,1021 @@ execute();%0A%0A + /*%0A var rs = this%0A .query(%0A %22%22%0A , %5B%5...
cd8b30435e2221e0cf35523eceafcfb7245dfec1
Print actual error message instead of generic type
site/Home.js
site/Home.js
/* global JSZip saveAs */ let haikunate = require('haikunator'); let url = require('url'); let base64url = require('base64-url'); import React from 'react'; import ReactDOM from 'react-dom'; import {isArray, forOwn, clone} from 'lodash'; import { createHistory, useQueries } from 'history'; import Header from './Heade...
JavaScript
0.000063
@@ -2225,22 +2225,24 @@ , jqXHR. -status +response Text, 2.
7d78d07abee797a1df77397624d211a9109aac80
add {max,min}{Width,Height}
src/Block.js
src/Block.js
/** * @copyright 2016-present, Prometheus Research, LLC * @flow */ import * as React from 'react'; import {wrapWithStylesheet} from './stylesheet'; import {chooseValue} from './Utils'; import * as theme from './theme'; type Props = { inline?: boolean; noWrap?: boolean; position?: 'relative' | 'absolute' | 'f...
JavaScript
0.999961
@@ -340,17 +340,103 @@ mber;%0A -h +maxWidth?: number;%0A minWidth?: number;%0A height?: number;%0A maxHeight?: number;%0A minH eight?: @@ -1121,39 +1121,85 @@ tive',%0A width, -height, +maxWidth, minWidth,%0A height, maxHeight, minHeight,%0A top, left, bott @@ -2181,23 +2181,73 @@ width, -height, +m...
fe4f2c92faf6cbff247570220380bb6551b7e54f
add filter condition for text and select filter
src/Const.js
src/Const.js
export default { SORT_DESC: 'desc', SORT_ASC: 'asc', SIZE_PER_PAGE: 10, NEXT_PAGE: '>', LAST_PAGE: '>>', PRE_PAGE: '<', FIRST_PAGE: '<<', PAGE_START_INDEX: 1, ROW_SELECT_BG_COLOR: '', ROW_SELECT_NONE: 'none', ROW_SELECT_SINGLE: 'radio', ROW_SELECT_MULTI: 'checkbox', CELL_EDIT_NONE: 'none', C...
JavaScript
0
@@ -938,16 +938,54 @@ r'%0A %7D,%0A + FILTER_CONDITION: %5B 'eq', 'like' %5D,%0A EXPAND
9cd12f6ad120e9e9ea5a266e29c006e54ad35525
add #getData
src/Index.js
src/Index.js
var Component = require('yacomponent'), inheritClass = require('inherit-class'), Item = Collection.Item = require('./Item'); function Collection() { this.items = []; this.fakeItem = undefined; } Collection.defaults = { dName: 'list', parent: null, Item: Item }; inheritClass(Collection, Compon...
JavaScript
0
@@ -3062,16 +3062,112 @@ %5D;%0D%0A%09%7D,%0D +%0A%0D%0A%09getData: function() %7B%0D%0A%09%09return this.items.map(function(i) %7B%0D%0A%09%09%09return i.data;%0D%0A%09%09%7D);%0D%0A%09%7D,%0D %0A%7D);%0D%0ACo
843bdb4e675be37c19a902dbe5c3ae4bca081b0e
change React Router to hash router when deploying on ghpages
web-app/src/index.js
web-app/src/index.js
/* global document, window */ import React from 'react'; import { render } from 'react-dom'; import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom'; import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; import thunk from 'redux-thunk'; import rootRe...
JavaScript
0
@@ -112,12 +112,14 @@ uter - as +, Hash Rout @@ -1295,57 +1295,90 @@ %7D;%0A%0A -// TODO: need to think about the onboarding url's +const Router = process.env.NODE_ENV === 'github'%0A ? HashRouter%0A : BrowserRouter; %0A%0Aco
23118f088d7b0ee0c418f058194d429eaee489d6
Handle null cohort.
js/AppControls.js
js/AppControls.js
/*global require: false, module: false */ 'use strict'; var React = require('react'); var CohortSelect = require('./views/CohortSelect'); var DatasetSelect = require('./views/DatasetSelect'); var Button = require('react-bootstrap/lib/Button'); var Tooltip = require('react-bootstrap/lib/Tooltip'); var OverlayTrigger =...
JavaScript
0
@@ -399,16 +399,53 @@ sheet'); +%0Avar _ = require('./underscore_ext'); %0A%0Avar mo @@ -1210,37 +1210,21 @@ rt: -%5B%7Bname: cohort, samplesFrom%7D%5D +activeCohorts , co @@ -1261,16 +1261,126 @@ .props,%0A +%09%09%09cohort = _.getIn(activeCohorts, %5B0, 'name'%5D),%0A%09%09%09samplesFrom = _.getIn(activeCohorts...
ebfb17acfef4eae6478a071afdecd14c9bf5dee9
clear tiles
web/script/canvas.js
web/script/canvas.js
function CanvasLayer (map) { var me = {}; var minZoom = 4; var maxZoom = 20; var radius = 3; var updateFunctions = []; var markers = []; me.setPoints = function (list) { markers = list; layoutLevels(); me.redraw(); } me.redraw = function () { updateFunctions.forEach(function (update) { update() }...
JavaScript
0.000001
@@ -782,24 +782,58 @@ awTile () %7B%0A +%09%09%09ctx.clearRect(0,0,size,size);%0A%0A %09%09%09markers.f
4489d680cb9e04bbc3e000363d8d45747c2613d6
refactor array interation
scripts-available/disk-usage/process.js
scripts-available/disk-usage/process.js
module.exports = function (data) { var lines = data.chunk.split ("\n"), statuses = []; data.mysql_connection.connect(); for (var linesIndex = 0; linesIndex < lines.length; linesIndex++) { var this_line = lines[linesIndex].replace(/\s+/g, ' ').split(" "), path = this_line[0], percent = ...
JavaScript
0.000196
@@ -130,111 +130,64 @@ ;%0A%0A%09 -for (var linesIndex = 0; linesIndex %3C lines.length; linesIndex++) %7B%0A%09%09var this_line = lines%5BlinesIndex%5D +lines.forEach (function (line) %7B%0A%09%09var line_split = line .rep @@ -232,27 +232,29 @@ th + = -this_line +line_split %5B0%5D,%0A%09%09 @@ -270,19 +...
965d72b5691a4f403069fe54dc9b1e9c793881a4
Fix link to Github
js/application.js
js/application.js
$(document).ready(function() { $('.content a').click(function(e) { e.preventDefault(); $('body').toggleClass('sidebar-open'); }); });
JavaScript
0.000006
@@ -40,16 +40,23 @@ ontent a +.switch ').click
9fec6e9fdd4cfaafefe33af83a782b0e2cbd518c
Fix id ref
angular-collection.js
angular-collection.js
(function(angular, _){ 'use strict'; // Create local references to array methods we'll want to use later. var array = []; var push = array.push; var slice = array.slice; var splice = array.splice; angular.module('ngCollection', ['ngResource']) .factory('$model', ['$resource', '$q', function($resource, $q){ var ...
JavaScript
0.000001
@@ -946,16 +946,22 @@ %7C%7C this. +model. id;%0A
2da62d284dd7375768cff3966f9056d77e716aec
add heart.graphics.get{Width,Height}
heart.js
heart.js
/* heart.js v0.0.1 copyright (c) 2012 darkf licensed under the terms of the MIT license, see LICENSE for details A Canvas-based graphics library inspired by (i.e. cloned from) Love 2D (https://love2d.org/) It's currently in its pre-alpha development stage, so don't expect anything to work, and feel free...
JavaScript
0.99965
@@ -1399,16 +1399,123 @@ %22;%0A%09%7D,%0A%0A +%09getWidth: function() %7B%0A%09%09return heart._size.w;%0A%09%7D,%0A%0A%09getHeight: function() %7B%0A%09%09return heart._size.h;%0A%09%7D,%0A%0A %09newImag
9a4894a328468807e422a768f17a98d99d45cbc5
Fix walkthrough
js/id/ui/intro.js
js/id/ui/intro.js
iD.ui.intro = function(context) { var step; function intro(selection) { context.enter(iD.modes.Browse(context)); // Save current map state var history = context.history().toJSON(), hash = window.location.hash, background = context.background().baseLayerSource(...
JavaScript
0.000003
@@ -517,18 +517,42 @@ entities +,%0A introGraph ;%0A - %0A @@ -679,24 +679,187 @@ ().reset();%0A + %0A introGraph = JSON.parse(iD.introGraph);%0A for (var key in introGraph) %7B%0A introGraph%5Bkey%5D = iD.Entity(introGraph%5Bkey%5D);%0A %7D%0A cont ...
cc52563d9cef8e4c2ab251cf1576ade001fdbd18
Update tp-link-prettifier.user.js
tp-link-prettifier.user.js
tp-link-prettifier.user.js
// ==UserScript== // @name TP-LINK Prettifier // @author Giuseppe Bertone, Brainmote s.r.l.s. // @namespace http://www.brainmote.com // @version 1.1 // @updateURL https://raw.githubusercontent.com/Brainmote/TP-Link-Prettifier/master/tp-link-prettifier.user.js // @downloadURL https://raw.githubusercontent.com/Brain...
JavaScript
0
@@ -4504,141 +4504,8 @@ ) %7B%0A - console.log(hostData%5B%22MAC%22%5D + hostData%5B%22HOSTNAME%22%5D + hostData%5B%22DESC%22%5D + hostData%5B%22IP%22%5D);%0A
b3eee12d267565537f02fe41b4acbb910941e528
Disable the Nagle algorithm
transformers/uws/server.js
transformers/uws/server.js
'use strict'; var parse = require('url').parse , http = require('http'); /** * Server of µWebSockets transformer. * * @runat server * @api private */ module.exports = function server() { var uws = require('uws').uws , Spark = this.Spark; var service = this.service = new uws.Server(); service.onMess...
JavaScript
0.000023
@@ -820,24 +820,52 @@ h === 24) %7B%0A + soc.setNoDelay(true);%0A ticket
2ec221850888fe6a66af389186d3f0b93bd2854e
Fix on month change firstDay issue
tiny-calendar.js
tiny-calendar.js
'use strict'; angular.module('angular-tiny-calendar', []).directive('tinyCalendar', [ function() { function removeTime(date) { return date.startOf('day'); } function firstSelected(month, date) { var s = null; for (var i = 0; i < month.length; i++) { if (date...
JavaScript
0
@@ -5160,36 +5160,52 @@ th, scope.events +, attrs.firstDay );%0D%0A - @@ -5487,32 +5487,48 @@ th, scope.events +, attrs.firstDay );%0D%0A @@ -5871,24 +5871,40 @@ scope.events +, attrs.firstDay );%0D%0A%0D%0A @@ -6056,32 +6056,32 @@ (1, 'months');%0D%0A - @@ -...
434fca1b246a4b2ffc7e6b0a2bf875f94fa6c17d
read bug from removed id.
read/index.js
read/index.js
var Survey = require('./survey'); var Question = require('./question'); var Option = require('./option'); module.exports = function(Obj, cb){ if(Obj){ var search = Obj; if(Obj.id){ search._id = Obj.id; delete search.id; } Survey(search, function(err, survey){ if(err) return cb(err, Obj); else { ...
JavaScript
0
@@ -326,36 +326,40 @@ uestion(%7Bsurvey: -Obj. +search._ id%7D, function(er @@ -502,20 +502,24 @@ %7Bsurvey: -Obj. +search._ id%7D, fun
c6cba9f82ee843d793a4bc2a9b341cddfbf84411
Add rejectOnNull to ttl()
src/cache.js
src/cache.js
'use strict'; import extend from 'extend'; const DEFAULT_OPTIONS = { 'expire': 60 * 60, // 1hr 'json': true, 'rejectOnNull': false, 'prefix': null }; export class RedisCache { constructor(client, options = {}) { if(!client) throw new Error('redis client required'); this._client = client; this._options = e...
JavaScript
0
@@ -2376,16 +2376,120 @@ t(err);%0A +%09%09%09%09if(this._options.rejectOnNull && reply === -2)%0A%09%09%09%09%09return reject(new Error('key does not exist'));%0A
fe2cc155059cb64f169d4aa86237200252c250f5
fix defect
routes/melody.js
routes/melody.js
var MelodyDao = require("../dao/MelodyDao"); var MelodyModel = require("../models").Melody; var TrackDao = require("../dao/TrackDao"); var TrackModel = require("../models").Track; var mongoose = require('mongoose'); var fs = require('fs'); var utils = require("../libs/util"); exports.getMelodyCollection=function(r...
JavaScript
0.000001
@@ -1674,17 +1674,17 @@ e:0,guid -, +: data._id
6069976b56a7cf1d365da8b9d5e19bb498fea3bf
Fix seeder.
seeders/20161204173948-default-admin.js
seeders/20161204173948-default-admin.js
'use strict'; var passwordHash = require('password-hash'); module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.create('Admin', { username: process.env.SEED_ADMIN_USERNAME, passwordHash.generate(process.env.SEED_ADMIN_PASSWORD) }); }, down: function (queryInterface, Sequelize...
JavaScript
0
@@ -148,24 +148,30 @@ ace. -create +bulkInsert ('Admin +s ', +%5B %7B us @@ -210,16 +210,26 @@ SERNAME, + password: passwor @@ -275,17 +275,60 @@ ASSWORD) - +, createdAt: Date(), updatedAt: Date() %7D%5D, %7B %7D);%0A %7D,
80da3b031a7649474e9fdf7b2ad70a5e296f9b98
Add comments on section/update server method.
server/admin/forum/section/update.js
server/admin/forum/section/update.js
// Update a set of basic fields on section. 'use strict'; var _ = require('lodash'); var async = require('async'); var updateInheritedSectionData = require('nodeca.forum/lib/admin/update_inherited_section_data'); module.exports = function (N, apiPath) { N.validate(apiPath, { _id: { type: 'st...
JavaScript
0
@@ -37,16 +37,166 @@ ection.%0A +//%0A// NOTE: This method is used for both:%0A// - section/index page for section reordering.%0A// - section/edit page for changing certain section fields.%0A %0A%0A'use s @@ -1981,32 +1981,113 @@ er%60.%0A //%0A + // NOTE: Used when user changes %60parent%60 field via ...
d3e66faff0009fcbf8e23c266938fc4671ace211
Fix incorrect array construction for class catgs, closes #17
server/graph/helpers/pwPropParser.js
server/graph/helpers/pwPropParser.js
'use strict'; const _ = require('lodash'); class PWPropParser { constructor({smwDataArbitrator}) { this._smwDataArbitrator = smwDataArbitrator; this._rgx = { /* durations */ range_dur: /(.*?)_(.*?)_(.*?)_time$/i, /* doses */ range_dose: /(.*?)_(.*?...
JavaScript
0.000022
@@ -2181,32 +2181,34 @@ cat(prop - && String( +).map(prop =%3E prop -) .replace @@ -2406,24 +2406,26 @@ prop - && String( +).map(prop =%3E prop -) .rep
c87411687ec4eeb0940da734e5d48b12d594ffc3
Fix minor typo that would cause crashes
imports/api/families/methods.js
imports/api/families/methods.js
import {Families} from './families'; import Schemas from '../../modules/schemas'; import {Meteor} from 'meteor/meteor'; import {SimpleSchema} from 'meteor/aldeed:simple-schema'; import {ValidateMethod} from 'meteor/mdg:validated-method'; const insertFamily = new ValidatedMethod({ name: 'families.insert', validate...
JavaScript
0.000269
@@ -188,16 +188,17 @@ Validate +d Method%7D
95bd9b72c774c12d4f119b6d42b4c9de4e4a7cdb
update export to improve commonjs exp
src/index.js
src/index.js
// dist :: String, Int, String, Int -> Int function dist(s, sLen, t, tLen) { if (sLen === 0) { return tLen; } else if(tLen === 0) { return sLen; } const cost = (s[sLen -1] === t[tLen - 1]) ? 0 : 1; return Math.min( dist(s, sLen - 1, t, tLen) + 1, dist(s, sLen, t, tLen - 1) + 1, dist(s,...
JavaScript
0
@@ -398,16 +398,23 @@ String%0A +export function
0ab8dfa363e5f114207f504c9979995c0c8b6a51
Remove redirect
imports/startup/client/index.js
imports/startup/client/index.js
import './router.js'; import './i18n.js'; import './lib/accountUI.js'; import './moment.js'; window.location.href = "http://eklore.fr/";
JavaScript
0.000001
@@ -90,49 +90,4 @@ s';%0A -%0Awindow.location.href = %22http://eklore.fr/%22;%0A
614bb73ea682f25705536fa11a5c7ee0ae92d0de
update log for multiple insatnces
src/index.js
src/index.js
import ControllerModel from './controller/controller-model'; import RouteModel from './route/route-model'; import DirectiveModel from './directive/directive-model'; import FactoryModel from './factory/factory-model'; var local = { storage: Symbol('storage') }; var version = '0.0.96'; class Manager { constructor(...
JavaScript
0
@@ -2331,13 +2331,12 @@ ole. -error +info ('Se @@ -2384,17 +2384,16 @@ lent');%0A -%0A %7D else %7B
03d4ff09677e369258e52e929b0d9f37360ef20f
create attach: add public function for models attaching
src/index.js
src/index.js
const ld = require('lodash'); const debug = require('debug')('restify-utils'); const glob = require('glob'); const path = require('path'); const { METHODS } = require('http'); /** * Load module, separate it's name and pushed to container * @param {Object} container */ function loadModule(container) { return func...
JavaScript
0.000001
@@ -3215,24 +3215,93 @@ );%0A %7D);%0A%0A + attach.attachModels();%0A %7D%0A%0A attach.attachModels = function() %7B%0A config.m @@ -3383,24 +3383,25 @@ %0A %7D);%0A %7D +; %0A%0A attach.f
daa46254fe75be01410615ed0aa51ff1c7a19019
Fix grid to support single child
src/index.js
src/index.js
import React, { Component } from 'react'; import upperFirst from 'lodash.upperfirst'; import contrib from 'blessed-contrib'; import ReactBlessedComponent from 'react-blessed/dist/ReactBlessedComponent'; import solveClass from 'react-blessed/dist/solveClass'; const blacklist = [ 'OutputBuffer', 'InputBuffer', 'createSc...
JavaScript
0
@@ -892,16 +892,104 @@ %7B%7D %7D%7D);%0A + const children = props.children instanceof Array ? props.children : %5Bprops.children%5D;%0A return @@ -1024,22 +1024,16 @@ t', %7B%7D, -props. children