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
bfe4fb2bb1ead89da54918631daea9556211e1a3
Work directly with transformers config in file.js.
bin/file.js
bin/file.js
var Transformer = require('./../lib/transformer'); var _ = require('lodash'); module.exports = function (program, file) { // Enable all transformers by default var options = { transformers: { classes: true, stringTemplates: true, arrowFunctions: true, let: true, defaultArguments: ...
JavaScript
0
@@ -166,24 +166,8 @@ var -options = %7B%0A tran @@ -178,18 +178,17 @@ mers -: + = %7B%0A - clas @@ -194,26 +194,24 @@ sses: true,%0A - stringTe @@ -229,18 +229,16 @@ ue,%0A - - arrowFun @@ -255,18 +255,16 @@ ue,%0A - let: tru @@ -270,18 +270,16 @@ ue,%0A - - defaultA @@ ...
b4bb171d7b8143c7183eed3ec34a809d1dc450fd
Fix keycloak sample code eslint issues
examples/keycloak-auth-hook.js
examples/keycloak-auth-hook.js
'use strict'; /** * Keycloak hook for securing an Unleash server * * This example assumes that all users authenticating via * keycloak should have access. You would probably limit access * to users you trust. * * The implementation assumes the following environement variables: * * - AUTH_HOST * - AUTH_REAL...
JavaScript
0.000001
@@ -262,17 +262,16 @@ environ -e ment var @@ -488,17 +488,16 @@ .js');%0A%0A -%0A const Ke @@ -521,17 +521,17 @@ require( -%22 +' @exlinc/ @@ -547,17 +547,17 @@ passport -%22 +' );%0Aconst @@ -600,43 +600,25 @@ nst -kcConfig = %7B%0A host: %22 +host = %60 http:// -%22 + +$%7B proc @@ -638,20 +638,25 @@...
cf46a6ea82cbbb38bcd66069fdf06438edbc922c
Clean up spacing
server/db/apiController.js
server/db/apiController.js
/* eslint strict: 0*/ const api = require('../../API_KEYS'); const httpRequest = require('http-request'); const parseString = require('xml2js').parseString; module.exports = { dictionary: (req, res) => { 'use strict'; const reqWord = req.params.word; const webster = `http://www.dictionaryapi.com/api/v1/...
JavaScript
0.000454
@@ -1883,16 +1883,64 @@ j = %7B%7D;%0A + if (thesaurusEntries !== undefined) %7B%0A @@ -1978,32 +1978,34 @@ 1) %7B%0A + + if (typeof thesa @@ -2054,32 +2054,34 @@ ) %7B%0A + thesaurusObj.syn @@ -2125,32 +2125,34 @@ %5D%5B0%5D;%0A + + %7D else %7B%0A ...
0dfa91dad41ea89316a58a7b1aa3cce6d87931a6
Allow CSS to work offline
htmlifier/offlineifier.js
htmlifier/offlineifier.js
function offlineify ({ log = console.log } = {}) { function toDataURI (response) { return response.blob().then(blob => new Promise(resolve => { const reader = new FileReader() reader.addEventListener('load', e => { resolve(reader.result) }, { once: true }) reader.readAsDataURL(bl...
JavaScript
0.000001
@@ -1340,16 +1340,54 @@ DataURI) +,%0A fetch('./main.css').then(toText) %0A %5D).th @@ -1457,16 +1457,21 @@ template +, css %5D) =%3E %7B%0A @@ -2292,16 +2292,107 @@ rHTML%60)%0A + .replace('%3Clink rel=%22stylesheet%22 href=%22./main.css%22%3E', () =%3E %60%3Cstyle%3E$%7Bcss%7D%3C/style%3E%60)%0A ...
9ddae47086699d1a8e578b87cec0b828e6fe067d
Remove route.currentModel
src/classes/route.js
src/classes/route.js
'use strict' const Http = require('./http') const middleware = new WeakMap() /** * The Ash route class extends the @see Http class and so has access * to request and response properties. * * Routes execute via a series of hooks in the following order * * 1. deserialize * 2. beforeModel * 3. model * 4. afterM...
JavaScript
0.000001
@@ -3074,309 +3074,8 @@ %7D%0A%0A - /**%0A * The model for the route as returned from the model hook.%0A * Provided for access in later hooks such as %60afterModel%60 or %60serialize%60%0A *%0A * Example:%0A * %60%60%60%0A *%0A * afterModel () %7B%0A * this.currentModel.color = 'red'%0A * %7D%0A ...
53dc2e279cee360554b2c42a5ec5897e24de78b1
Enable API authentication in production mode
server/boot/authentication.js
server/boot/authentication.js
module.exports = function enableAuthentication(server) { // enable authentication server.enableAuth(); };
JavaScript
0.000001
@@ -56,33 +56,55 @@ %7B%0A -// enable authentication%0A +if (process.env.NODE_ENV === 'production') %7B%0A se @@ -122,11 +122,15 @@ Auth();%0A + %7D%0A %7D;%0A
81a261dd37fff88f4bf958111e94c9b94ecb9a89
update geoFactory
client/components/geoFactory/geoFactory.service.js
client/components/geoFactory/geoFactory.service.js
'use strict'; angular.module('hackshareApp') .factory('geoFactory', function ($rootScope, $http, $q) { // Service logic var geocoder; var map; var infowindow = new google.maps.InfoWindow(); var marker; var initialized = false; function initialize() { ...
JavaScript
0.000001
@@ -541,16 +541,18 @@ +// map = ne @@ -1608,32 +1608,90 @@ ion(position) %7B%0A + return $q(function(resolve, reject) %7B%0A @@ -1788,32 +1788,36 @@ + geocoder.geocode @@ -1881,24 +1881,28 @@ + + if (status = @@ -1956,24 +1956,28...
0b4c6f31ccbfa6a0837984881563c379b11c1cf2
Fix classic JavaScript bug
server/lib/userIntroducer.js
server/lib/userIntroducer.js
// // Copyright 2014 Ilkka Oksanen <iao@iki.fi> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by app...
JavaScript
0.000018
@@ -4003,16 +4003,34 @@ 'object' + && value !== null ) %7B%0A
30c6893bd91ded7fa38709bcad85c19b64e2e6c7
update bin to remove favoritism
bin/gulp.js
bin/gulp.js
#!/usr/bin/env node var path = require('path'); var argv = require('optimist').argv; var completion = require('../lib/completion'); var semver = require('semver'); if (argv.completion) { return completion(argv.completion); } var resolve = require('resolve'); var findup = require('findup-sync'); var gutil = requir...
JavaScript
0
@@ -3307,18 +3307,8 @@ .js' -,'.coffee' %5D;%0A
4ee51720a355351f13b678663643cb35c958b576
Use const instead of var in Vue instance
resources/assets/js/app.js
resources/assets/js/app.js
/** * First we will load all of this project's JavaScript dependencies which * include Vue and Vue Resource. This gives a great starting point for * building robust, powerful web applications using Vue and Laravel. */ require('./bootstrap'); /** * Next, we will create a fresh Vue application instance and attach...
JavaScript
0
@@ -533,11 +533,13 @@ );%0A%0A -var +const app
d98c5ab50f71254a3e54227dc0713fdcb66752a4
create build
dist/angular-swiper.js
dist/angular-swiper.js
!function(e,i,t){"use strict";function n(){for(var e=[],i="0123456789abcdef",t=0;36>t;t++)e[t]=i.substr(Math.floor(16*Math.random()),1);e[14]="4",e[19]=i.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-";var n=e.join("");return n}function r(e){return{restrict:"E",transclude:!0,scope:{onReady:"&",slidesPerView:"=",slidesPe...
JavaScript
0.000012
@@ -338,24 +338,60 @@ Between:%22=%22, +parallax:%22=%22,parallaxTransition:%22@%22, paginationIs @@ -1223,17 +1223,17 @@ ));%7Bvar -o +a ;e.conta @@ -1305,17 +1305,17 @@ hild,r), -o +a =e.swipe @@ -1317,17 +1317,17 @@ swiper): -o +a =new Swi @@ -1382,17 +1382,17 @@ %7Bswiper: -o +a %7D)%7D%7D%5D,li @@ -1414...
caef599fb389998bc88ac05f0e805863170ba8cf
Update HighfathersMachination.js
src/Parser/Core/Modules/Items/HighfathersMachination.js
src/Parser/Core/Modules/Items/HighfathersMachination.js
import SPELLS from 'common/SPELLS'; import ITEMS from 'common/ITEMS'; import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; class HighfathersMachination extends Analyzer { static dependencies = { combatants: Combatants, }; healing ...
JavaScript
0
@@ -90,16 +90,61 @@ react';%0A +import %7B formatNumber %7D from 'common/format'; %0Aimport @@ -1262,17 +1262,20 @@ stacks. - +%3Cbr%3E $%7Bthis.p @@ -1324,24 +1324,37 @@ amount of $%7B +formatNumber( this.healing @@ -1357,11 +1357,15 @@ ling +) %7D. - +%3Cbr%3E $%7Bth
d88e9822432dbd2c846725026fc49110ebb9db02
Improve unique() function
day3_1.js
day3_1.js
/* Puzzle input - check /input/day3.js */ var input = require('./input/day3.js'); /* Variables */ var santasVisits = [ [ 0, 0 ] ], coordX = 0, coordY = 0; // Function to uniquify an array function unique(array){ var uniqueArray = array; for (var i = 0; i < array.length; i++) { if (uniqueArray.indexOf...
JavaScript
0.000183
@@ -235,21 +235,18 @@ Array = -array +%5B%5D ;%0A%0A for @@ -323,17 +323,17 @@ y%5Bi%5D - ! +) = == -1) -) %7B%0A @@ -353,27 +353,29 @@ ray. -splice(i, 1 +push(array%5Bi%5D );%0A %7D ;%0A @@ -374,14 +374,12 @@ %7D -; %0A %7D -; %0A%0A
d4418ab3399cfeff1afb05a602cce7faf6c3b2f2
Update SeparableConv2d_test.js
CNN/SeparableConv2d_test.js
CNN/SeparableConv2d_test.js
var inChannels = 4; var intParams = [ 2, 3, 2, 7, 6, 3 ]; var intDepthwiseFilter = [ 111, 112, 113, 114, 115, 116, 121, 122, 123, 124, 125, 126, 211, 212, 213, 214, 215, 216, 221, 222, 223, 224, 225, 226, 311, 312, 313, 314, 315, 316, 321, 322, 323, 324, 325, 326, 411, 412, 413, 41...
JavaScript
0
@@ -1115,16 +1115,17 @@ (%0A +%5B strEncod @@ -1133,16 +1133,17 @@ dWeights +%5D , encode
400823ce78721769bb07ca7df437e9f6a636b2f9
Add user Settings
server/config/route.config.js
server/config/route.config.js
'use strict'; const controllers = require('../controllers/base.controller'); const csrf = require('csurf') ({ cookie: true }); const auth = { isAuthenticated: (req, res, next) => { if (req.isAuthenticated()) { next(); } else { res.redirect('/'); } }, isInRol...
JavaScript
0.000003
@@ -1158,32 +1158,159 @@ .updateProfile)%0A + .get('/user/settings', controllers.user.showSettings)%0A .post('/user/settings', controllers.user.updateSettings)%0A .get('/d
657e7209768ed5e41b06054c8a5b789bd12a07d4
Remove custom Table#all implementation
lib/assets/javascripts/monarch/relations/table.js
lib/assets/javascripts/monarch/relations/table.js
(function(Monarch) { Monarch.Relations.Table = new JS.Class('Monarch.Relations.Table', Monarch.Relations.Relation, { initialize: function(recordClass) { this.recordClass = recordClass; this.name = recordClass.displayName; this.remoteName = _.underscoreAndPluralize(recordClass.displayName); ...
JavaScript
0
@@ -1399,77 +1399,8 @@ %7D,%0A%0A - all: function() %7B%0A return this.contents().values();%0A %7D,%0A%0A
fad04548c801beef1284922be4a914cc9e11ada9
Remove custom UA (see #47)
ice/modules/ice-config.js
ice/modules/ice-config.js
/** * @file Ingress-ICE, configurations * @license MIT */ /*global fs */ /*global quit */ /*global args */ var cookiespath = '.iced_cookies'; var config = configure(args[1]); // Check if no login/password/link provided if (config.login === '' || config.password === '' || config.area === '') { quit('No login/passwo...
JavaScript
0
@@ -1258,16 +1258,18 @@ %7D%0A%7D;%0A%0A +// page.set
a67f2b69996d6356f73ff6729043c1b492d52a42
support new usage format
bin/help.js
bin/help.js
var path = require('path'), fs = require('fs'); fs.existsSync || (fs.existsSync = path.existsSync); var help = function(args, callback) { if (args.length >= 1) { var cmd = args[0], cmdPath = path.join(__dirname, cmd + ".js"); if (fs.existsSync(cmdPath)) { console.lo...
JavaScript
0.000003
@@ -307,20 +307,20 @@ -console.log( +var usage = requ @@ -337,18 +337,160 @@ h).usage -) ; +%0A%0A if (usage instanceof Function) %7B%0A usage();%0A %7D else %7B%0A console.log(usage);%0A %7D%0A %0A
4964b40009dd9e876df4233a91a7097494c85f8d
Update demo.js
demo/demo.js
demo/demo.js
$(function() { $.getJSON('http://www.bbc.co.uk/bbcone/programmes/schedules/london/today.json', function(data) { console.log(data); $('textarea').html(JSON.stringify(data, null, ' ')); }); });
JavaScript
0.000001
@@ -111,31 +111,8 @@ ) %7B%0A - console.log(data);%0A @@ -174,8 +174,9 @@ %7D);%0A%7D); +%0A
bbc949fb4415aac92b04dbd91935fb044e79a5bc
Save scroll position of the preview mode
javascripts/default.js
javascripts/default.js
var strings = { // Titles "import-button-title-plain" : "Import a text file from your system", "import-button-title-textile" : "Import a Textile file from your system", "import-button-title-markdown" : "Import a Markdown file from your system", // Menus "export-text-plain" : "Text file", "export-te...
JavaScript
0
@@ -451,16 +451,37 @@ xtile%22;%0A + var scrollPos = 0;%0A $('#la @@ -3156,27 +3156,131 @@ -%7D,%0A function() %7B + $('#preview').attr(%7B scrollTop: scrollPos %7D);%0A %7D,%0A function() %7B%0A scrollPos = $('#preview').attr('scrollTop');%0A %0A
9e51fb666780a10bc1799a9398ddd1125348e34c
Update guildbot messages
server/services/discord.js
server/services/discord.js
// 3rd const debug = require('debug')('app:services:discord') const assert = require('better-assert') // 1st const Client = require('../discord/client') const config = require('../config') const pre = require('../presenters') // // TODO: DRY up these functions. // TODO: Avoid the #staff-channel lookup on every functi...
JavaScript
0
@@ -1054,16 +1054,18 @@ hammer: +** $%7Bnuker. @@ -1070,16 +1070,18 @@ r.uname%7D +** nuked $ @@ -1812,16 +1812,18 @@ k_mark: +** $%7Bnuker. @@ -1828,16 +1828,18 @@ r.uname%7D +** UN-nuke @@ -4319,16 +4319,18 @@ :wave: +** $%7Buser.u @@ -4334,16 +4334,18 @@ r.uname%7D +** created
63669ea4d0a2b23157275e7f7869e24f0dee96df
Convert to Glimmer component
ember/app/components/cesium-button.js
ember/app/components/cesium-button.js
import Component from '@ember/component'; import { action } from '@ember/object'; export default class CesiumButton extends Component { tagName = ''; @action toggle() { if (this.enabled) { this.onDisable(); } else { this.onEnable(); } } }
JavaScript
0.998266
@@ -1,24 +1,25 @@ import -Component +%7B action %7D from '@ @@ -28,56 +28,58 @@ ber/ -componen +objec t';%0A +%0A import -%7B action %7D from '@ember/objec +Component from '@glimmer/componen t';%0A @@ -137,25 +137,8 @@ t %7B%0A - tagName = '';%0A%0A @a @@ -167,16 +167,21 @@ f (this. +args. enabled) @@ -...
fc4480cbd9d3bfabc9cc471270a4ce9399b21d35
Fix minification errors in confEditor
app/js/arethusa.conf_editor/routes/conf_editor.js
app/js/arethusa.conf_editor/routes/conf_editor.js
'use strict'; angular.module('arethusa.core').constant('CONF_ROUTE', { controller: 'ConfEditorCtrl', templateUrl: 'templates/conf_editor.html', resolve: { load: function ($http, configurator) { var url = './static/configs/conf_editor/1.json'; return $http.get(url).then(function (res) { con...
JavaScript
0.000038
@@ -163,16 +163,42 @@ load: + %5B'$http', 'configurator', functio @@ -400,16 +400,17 @@ );%0A %7D +%5D %0A %7D%0A%7D);
74eb1b52dc7cf61fd12ddcc989d87f3d1f14822a
Update isAtonement.js
src/Parser/DisciplinePriest/Modules/Core/isAtonement.js
src/Parser/DisciplinePriest/Modules/Core/isAtonement.js
import SPELLS from 'common/SPELLS'; export default function isAtonement(event) { return [SPELLS.ATONEMENT_HEAL_NON_CRIT.id, SPELLS.ATONEMENT_HEAL_CRIT.id].indexOf(event.ability.guid) > -1; }
JavaScript
0.000001
@@ -183,9 +183,11 @@ id) -%3E +!== -1;
c57a6f8d0cccdbbe184a1f69960e4b61404865b4
improve console tools
bin/i18n.js
bin/i18n.js
"use strict"; const fs = require('fs'); const logger = require('./logger'); const google = require('./google'); let items = require('./../src/data/items.json'); function sort(object) { let keys = Object.keys(object), result = {}; keys.sort((a, b) => { if (a === b) { return 0; } ...
JavaScript
0.000003
@@ -4246,16 +4246,66 @@ ); +%0A%0A logger.success(%60$%7Bi%7D synchronized%60); %0A
e1f17426e3e097d1c5e30825087c0405cc7de64f
fix typo in comment
packages/lesswrong/lib/index.js
packages/lesswrong/lib/index.js
import './collections/subscription_fields.js'; // Notifications import Notifications from './collections/notifications/collection.js'; import './collections/notifications/custom_fields.js'; import './collections/notifications/views.js'; // Inbox import Messages from './collections/messages/collection.js' import './c...
JavaScript
0.001377
@@ -667,17 +667,16 @@ / Commen -s ts%0Aimpor
935b5c8fefe7644756c6051be669a9b612bc2c54
use event delegation
public/js/common.js
public/js/common.js
// Ugis Germanis // My javascript var music = { selected: "byartist", sort: new Event('sort'), playlist: null, request: new XMLHttpRequest(), url: document.location.protocol+ "//"+ window.location.host, current: 0, slider: null, sliderDrag: false, render: function(){ $("#pla...
JavaScript
0.000002
@@ -631,32 +631,38 @@ i%5D.Artist);%0A + %7D%0A document @@ -678,24 +678,25 @@ ntById(%22 -sound%22+i +playlist%22 ).addEve @@ -720,32 +720,96 @@ ', function(e)%7B%0A + if(e.target && e.target.nodeName == %22LI%22) %7B%0A @@ -863,32 +863,36 @@ +...
9ce2991579a2770af04d9cf58d7fd679b8a61956
change 'get' to 'value'
src/decoratorFactory.js
src/decoratorFactory.js
'use strict'; import { forOwn, isFunction, partial } from 'lodash'; import settings from './settings'; const TYPE_MAP = { // Methods where the function is the last argument or the first // and all other arguments come before or after. post: (fn, target, value, ...args) => fn(...args, value), pre: (fn, target,...
JavaScript
0
@@ -2417,35 +2417,37 @@ lue, descriptor. -get +value );%0A %7D%0A%0A
3d14fbc40ba3de9c47f5604f55999958aedff3af
Delete failed server backup attempts
server/src/cron/backups.js
server/src/cron/backups.js
// @flow import fs from 'fs'; import childProcess from 'child_process'; import zlib from 'zlib'; import dateFormat from 'dateformat'; import StreamCache from 'stream-cache'; import { promisify } from 'util'; import invariant from 'invariant'; import dbConfig from '../../secrets/db_config'; const readdir = promisify(...
JavaScript
0
@@ -1444,16 +1444,26 @@ l.gz%60;%0A%0A + try %7B%0A await @@ -1491,16 +1491,64 @@ cache);%0A + %7D catch (e) %7B%0A await unlink(filename);%0A %7D%0A %7D%0A%0Aasync
883933783e513b0a5d5b24293d1dc92ef585d587
fix data not available
server/util/wolframHelper.js
server/util/wolframHelper.js
import wajs from 'wajs'; import secrets from '../../secrets'; export const WA_APP_ID = secrets.wolframAlphaId; export const waClient = new wajs(WA_APP_ID); export const QUERY_OPTIONS = { format: 'plaintext', podState: '100@More', ignoreCase: true, // includePodId: ['Result'] }; export const formatQuery = (qu...
JavaScript
0.000002
@@ -428,50 +428,8 @@ %5D)%7B%0A - console.log('no results? ', response)%0A @@ -551,16 +551,85 @@ String)%0A + if (queryString === '(data not available)')%7B%0A return false;%0A %7D%0A const
277bf5926d17b1f56a89ee5d665bcd21be540e77
Fix typo in test
test/tests/integration/providers/github-oauth2-test.js
test/tests/integration/providers/github-oauth2-test.js
var torii, container; import toriiContainer from 'test/helpers/torii-container'; import configuration from 'torii/configuration'; var originalConfiguration = configuration.providers['github-oauth2']; var opened, mockPopup = { open: function(){ opened = true; return Ember.RSVP.resolve({}); } }; module('G...
JavaScript
0.020738
@@ -861,13 +861,13 @@ to G -oogle +itHub %22, f
a1ef57a4023b39e250d9ffd0bcc31e488af3a762
fix "Skip to Content" link
app/jsx/runOnEveryPageButDontBlockAnythingElse.js
app/jsx/runOnEveryPageButDontBlockAnythingElse.js
/* * Copyright (C) 2019 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
JavaScript
0.000005
@@ -1947,21 +1947,27 @@ Default( -() =%3E +function () %7B%0A $
6a0b6034a0d8cb24b78ea1ce0d9d94d8320fb545
Update testsA.js
nodejs_app/testsA.js
nodejs_app/testsA.js
var t = 0; const exec = require('child_process').exec; exec('node nodejs_app/app.js', function(error, stdout, stderr){ if (error) { console.error('exec error: ${error}'); t =1; return 1; } else{ console.log('stdout: ${stdout}'); console.log('stderr: ${stderr}'); return 0; } }); exec('node nodej...
JavaScript
0.000001
@@ -1,8 +1,9 @@ +%0A var t = @@ -459,33 +459,33 @@ e');%0A return -1 +0 ;%0A %7D%0A else%7B%0A%09 %0A @@ -560,26 +560,26 @@ ');%0A%09 %0A return -0 +1 ;%0A %7D%0A%7D);%0A
b7778d950ef59cd0b4d55e034c2bcfccbaf47434
test in safari a bit; clean up var names
www/javascript/dogeared.document.js
www/javascript/dogeared.document.js
// https://developer.mozilla.org/en-US/docs/Web/API/window.getSelection var wtf = ""; function dogeared_document_init(){ $(document).bind('mouseup', dogeared_document_onselected); // This does not work well at all yet (20140503/straup) // http://stackoverflow.com/questions/8991511/how-to-bind-a-handler-...
JavaScript
0
@@ -74,11 +74,25 @@ var -wtf +current_selection = %22 @@ -359,24 +359,27 @@ -window%0A%0A + // $(document) @@ -476,24 +476,91 @@ lected(e)%7B%0A%0A + // selection change is triggered on desktop safari because...%0A%0A // conso
19851926742154a189cc1571b04f8eb78e275cd6
Fix event emiter example
event-driven/event-emitter-demo-00.js
event-driven/event-emitter-demo-00.js
var events = require('events'); var eventEmitter = new events.EventEmitter(); var ringBell = function () { console.log('ring ring ring'); }; eventEmitter.on('doorOpen1', ringBell); eventEmitter.on('doorOpen2', function (ring) { console.log(ring); }); eventEmitter.emit('doorOpen1'); //No needed the second argume...
JavaScript
0.000003
@@ -256,73 +256,145 @@ );%0A%0A -eventEmitter.emit('doorOpen1'); //No needed the second argument.%0A +// Here no needed the second argument.%0AeventEmitter.emit('doorOpen1');%0A%0A// Here we need to pass the second argument in the emit() method. %0Aeve @@ -448,55 +448,4 @@ g'); - //We just pass the arguments in the ...
abcea73890e6f99b3548a8fedb5376ecbd103902
fix networkhandler
lib/businessTier/networkHandler/networkHandler.js
lib/businessTier/networkHandler/networkHandler.js
/*jshint node: true, -W106 */ 'use strict'; /* * Name : networkHandler.js * Module : NetworkHandler * Location : /lib/businessTier/networkHandler * * History : * * Version Date Programmer Description * ========================================================= * 0.0.1 2015-05-19 Matteo Furlan ...
JavaScript
0.000001
@@ -1506,26 +1506,24 @@ %09sock.attach -ed Object(attac
d62927cb890746646dc87938bb21206098799643
Remove unused cycleId
server/reports/playerStats.js
server/reports/playerStats.js
/* eslint-disable camelcase */ import r from 'src/db/connect' import { lookupChapterId, lookupCycleId, writeCSV, parseArgs, shortenedPlayerId, } from './util' import { avgProjHours, avgHealthCulture, avgHealthTeamPlay, estimationBias, estimationAccuracy, avgProjCompleteness, avgProjQuality, ...
JavaScript
0.000001
@@ -89,25 +89,8 @@ Id,%0A - lookupCycleId,%0A wr @@ -1028,70 +1028,8 @@ ame) -%0A const cycleId = await lookupCycleId(chapterId, cycleNumber) %0A%0A @@ -1067,17 +1067,8 @@ rId, - cycleId, cyc
99fba54ae4aa1bd194a1f8bd0b8e23a681494b5c
send data to server
public/js/player.js
public/js/player.js
//Create browser compatible event listener function listener(elem, evnt, func, parentSocketConnection) { if (elem.addEventListener) elem.addEventListener(evnt,func,false); else if (elem.attachEvent) // For IE return elem.attachEvent("on" + evnt, func); } function player(properties){ //define public va...
JavaScript
0
@@ -35,16 +35,39 @@ listener + with parameter passing %0Afunctio @@ -102,30 +102,111 @@ par -entSocketConnection)%0A%7B +ameters)%0A%7B%0A elem.socketConnection = parameters%5B0%5D;%0A elem.x = parameters%5B1%5D;%0A elem.x = parameters%5B2%5D; %0A i @@ -230,16 +230,19 @@ istener) + %7B%0A %0A e @@ -281,...
c0daae273ca8a6a10e250c962a8fa7c83b75a56b
Update demo.js
demo/demo.js
demo/demo.js
$(function () { var data = [ { "Name": "John Smith", "Age": 45 }, { "Name": "Mary Johnson", "Age": 32 }, { "Name": "Bob Ferguson", "Age": 27 } ]; $("#grid").igGrid({ dataSource: data //JSON Array defined above ...
JavaScript
0.000001
@@ -224,16 +224,55 @@ %5D;%0A + console.log(%22creating grid%22); %0A
71b8f23db7644c747075ea617e435758c9418eb0
Update testsA.js
nodejs_app/testsA.js
nodejs_app/testsA.js
var t = 0; const exec = require('child_process').exec; exec('node nodejs_app/app.js', (error, stdout, stderr)=>{ if (error) { console.error('exec error: ${error}'); t =1; return; } console.log('stdout: ${stdout}'); console.log('stderr: ${stderr}'); }); exec('killall node'); return t;
JavaScript
0.000001
@@ -79,16 +79,24 @@ pp.js', +function (error, @@ -114,10 +114,8 @@ err) -=%3E %7B%0A @@ -269,16 +269,16 @@ ');%0A%7D);%0A - exec('ki @@ -288,16 +288,204 @@ ll node' +,function(error, stdout, stderr)%7B%0A if (error) %7B%0A console.error('exec error: $%7Berror%7D');%0A%09t =1;%0A return;%0A %7D%0A co...
346083aecea1c038bbe6aa13eb341a7ba60185fa
Return test.
tests/e2e/specs/editor/media/insertMediaFromLibrary.js
tests/e2e/specs/editor/media/insertMediaFromLibrary.js
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
JavaScript
0.000016
@@ -622,18 +622,16 @@ ies%0A */%0A -// import %7B @@ -1372,99 +1372,8 @@ -// TODO: Enable once https://github.com/google/web-stories-wp/issues/1206 is merged.%0A // awai
e78ec392f234d09d7689c6b49b0debaf845665dc
Fix default avatar selection
public/js/script.js
public/js/script.js
/* this variable represents the current script element */ var me = {}; /* relative path to the element whose script is currently being processed.*/ if (typeof document.currentScript != "undefined" && document.currentScript != null) { var str = document.currentScript.src; me.path = (str.lastIndexOf("/") == -1) ? ...
JavaScript
0.000001
@@ -6872,16 +6872,25 @@ arent(). +parent(). attr('da
334c0e2084b5aed6773d7dae6115a89ec8b856c2
add TRASH Constants
frontend/src/javascripts/constants/NoteeConstants.js
frontend/src/javascripts/constants/NoteeConstants.js
var keyMirror = require('keymirror'); module.exports = keyMirror({ // notee POST_CREATE: null, POST_CREATE_FAILED: null, POST_UPDATE: null, POST_UPDATE_FAILED: null, POST_DELETE: null, POST_DELETE_FAILED: null, // category CATEGORY_CREATE: null, CATEGORY_CREATE_FAILED: null, ...
JavaScript
0.000004
@@ -862,14 +862,83 @@ ED: null +,%0A%0A // trash%0A TRASH_UPDATE: null,%0A TRASH_UPDATE_FAILED: null %0A%0A%7D);%0A
0149f4850e86a49c4e1d995cec3be80c4cd08fdb
Substitute the model in its corresponding place.
directive.js
directive.js
'use strict'; var dragula = require('dragula'); /*jshint unused: false*/ function register (angular) { return ['dragulaService', function angularDragula (dragulaService) { return { restrict: 'A', scope: { dragulaScope: '=', dragulaModel: '=' }, link: link }; func...
JavaScript
0.999999
@@ -831,21 +831,34 @@ unction( -model +newValue, oldValue ) %7B%0A @@ -864,21 +864,24 @@ if( -model +newValue )%7B%0A @@ -919,31 +919,112 @@ -drake.models.push(model +var modelIndex = drake.models.indexOf(oldValue);%0A drake.models.splice(modelIndex, 1, newValue );%0A @@ -1067,21 +1...
c5068479cf8fe091a756e1d5c7dacde1448db0b7
delete require of superagent
routes/routers/register.js
routes/routers/register.js
'use strict'; var express = require('express'); var router = express.Router(); var request = require('superagent'); var lang = require('../../mixin/lang-message/chinese'); var constant = require('../../mixin/constant').backConstant; var async = require('async'); var validate = require('validate.js'); var md5 = require...
JavaScript
0.000004
@@ -77,45 +77,8 @@ ();%0A -var request = require('superagent');%0A var
3bde929a83ee04655b485dc57712776407252d2d
Create and call toggleSelectedArrItem function
public/js/select.js
public/js/select.js
var selectMode = false; var selected = []; var selectModeToggle = document.getElementById('selectModeToggle'); var deleteButton = document.getElementById('delete'); var emoticonsContainer = document.getElementById('emoticons'); selectModeToggle.addEventListener('click', function() { if (selectMode) { selectMode ...
JavaScript
0
@@ -222,16 +222,202 @@ ons');%0A%0A +function toggleSelectedArrItems(emoticon) %7B%0A var index = selected.indexOf(emoticon);%0A if (index === -1) %7B%0A selected.push(emoticon);%0A %7D else %7B%0A selected.splice(index, 1);%0A %7D%0A%7D%0A%0A selectMo @@ -656,16 +656,89 @@ = true;%0A + // change style ...
bcb55153f7b15fcf77f5e6c08672f7bdccc6c919
Fix bug with multiple quizes in a row
frontend/src/main-components/StudyModeGameHandler.js
frontend/src/main-components/StudyModeGameHandler.js
let Quiz; let currentQuizWord = {}; let currentArray = 0; let test = 0; async function startQuiz(folderKey) { await fetch(`/study?folderKey=${folderKey}`) .then(res => res.json()) .then(result => { Quiz = result; console.log(Quiz[0].length); return Quiz.length; }).catch("Could ...
JavaScript
0
@@ -49,26 +49,8 @@ rray - = 0;%0Alet test = 0 ;%0A%0Aa @@ -86,16 +86,38 @@ rKey) %7B%0A + currentArray = 0;%0A await fe @@ -234,46 +234,8 @@ lt;%0A - console.log(Quiz%5B0%5D.length);%0A
a25e7179ad8e000fed149d714df8a9371b5af5aa
Update dashboard simple.js
angular/themes/dashboard/simple/simple.js
angular/themes/dashboard/simple/simple.js
/** * Created by anonymoussc on 26/11/15 5:40. */ (function() { 'use strict'; angular.module('app.controllers').controller('DashboardSimpleCtrl', function($scope, $timeout, $mdSidenav, $log) { $scope.toggleLeft = buildDelayedToggler('left'); $scope.toggleRight = buildToggler('right'); ...
JavaScript
0.000001
@@ -1329,32 +1329,35 @@ + // $log.debug(%22tog @@ -1638,16 +1638,19 @@ + // $log.de
bc560feb331bfec47db49611fefd41366e283324
fix sidebar icon overlapping
services/ui/src/pages/_app.js
services/ui/src/pages/_app.js
import 'isomorphic-unfetch'; import App, { Container } from 'next/app'; import React from 'react'; import Head from 'next/head'; import getConfig from 'next/config'; import { ApolloProvider } from 'react-apollo'; import ApolloClient from 'apollo-boost'; import Typekit from 'react-typekit'; import withKeycloak from '../...
JavaScript
0
@@ -6141,27 +6141,55 @@ margin- -right: 14 +left: calc(((100vw / 16) * 1.5) - 25 px +) ;%0A @@ -6205,42 +6205,25 @@ m -in-width: calc((100vw / 16) * 1.5) +argin-right: 14px ;%0A @@ -6326,32 +6326,12 @@ th: -calc((100vw / 16) * 1.5) +25px ;%0A
511f51bc5132a76bf27a90fc94440e36be13350c
Update funcoesGlobal.js
assets/js/funcoesGlobal.js
assets/js/funcoesGlobal.js
$().ready(function () { setTimeout(function () { $('div.alert').delay(1500).fadeOut(400); // "div.alert" é a div que tem a class alert do elemento que deseja manipular. }, 2500); // O valor é representado em milisegundos. });
JavaScript
0
@@ -234,8 +234,9 @@ dos.%0A%7D); +%0A
af69cfdb388353a60f106a9848827c9454e057f4
fix offset
packages/utils/snappers/grid.js
packages/utils/snappers/grid.js
export default (grid) => { const coordFields = [ ['x', 'y'], ['left', 'top'], ['right', 'bottom'], ['width', 'height'], ].filter(([xField, yField]) => xField in grid || yField in grid); return function (x, y) { const { range, limits = { left : -Infinity, right : ...
JavaScript
0.000001
@@ -394,63 +394,49 @@ -%7D = grid;%0A%0A const offset = offset %7C%7C %7B x: 0, y: 0 %7D; + offset = %7B x: 0, y: 0 %7D,%0A %7D = grid;%0A %0A
28a1a7e7eb13e3019dd25bc83a9ad0e7acb5892a
Fix empty state link
assets/js/autocomplete.js
assets/js/autocomplete.js
--- --- $(document).ready(function() { 'use strict'; var client = algoliasearch('KDWVSZVS1I', 'ce4d584b0de36ca3f8b4727fdb83c658'); var index = client.initIndex('grantmakers_io'); autocomplete('#autocomplete-input', { hint: false, openOnFocus: false, minLength: 1 }, [ { source: function(q, cb) { ...
JavaScript
0.000368
@@ -1555,20 +1555,16 @@ %7B%7B site. -base url %7D%7D%22%3E
7b47cf576b67f4b4914bc0d032113ec5eb65741b
bump ??? distribution dist/snuggsi.min.es.js
dist/snuggsi.min.es.js
dist/snuggsi.min.es.js
class TokenList{constructor(e,t){const n=[],s=/{(\w+|#)}/,o=e=>[].slice.call(e).map(e=>s.test(e.value)&&n.push(e)),r=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,e=>e.tagName?o(e.attributes):s.test(e.textContent)&&n.push(e),null);for(;r.nextNode(););for(e of n)(e.text=e.textContent).match(...
JavaScript
0.000007
@@ -1,12 +1,103 @@ +const HTMLElement=(e=%3E%7Bfunction t()%7B%7Dreturn t.prototype=window.HTMLElement.prototype,t%7D)(); class TokenL @@ -618,100 +618,8 @@ ))%7D%7D -const HTMLElement=(e=%3E%7Bfunction t()%7B%7Dreturn t.prototype=e,t%7D)(window.HTMLElement.prototype); (e=%3E
30c1e5e8e15e198ac6b0167541868171b4eadcfb
Fix WYSIWYG popup var
cms/apps/media/static/media/js/jquery.cms.media.js
cms/apps/media/static/media/js/jquery.cms.media.js
/* TinyMCE filebrowser implementation. */ (function($) { // Define the filebrowser plugin. $.cms.media = {} // Closes the filebrowser and sends the information back to the TinyMCE editor. $.cms.media.complete = function(permalink, title) { // Get the important values from TinyMCE...
JavaScript
0
@@ -2023,19 +2023,22 @@ a/file/? +_ pop +up =1%22;%0A @@ -2723,8 +2723,9 @@ Query)); +%0A
01dd232947895052939d7279ba699565db6a8d77
Fix the value stat getter when no records available
services/value-stat-getter.js
services/value-stat-getter.js
'use strict'; var _ = require('lodash'); var P = require('bluebird'); var FilterParser = require('./filter-parser'); function ValueStatGetter(model, params, opts) { function getAggregateField() { // jshint sub: true return params['aggregate_field'] || '_id'; } this.perform = function () { return ne...
JavaScript
0.00019
@@ -886,16 +886,94 @@ err); %7D%0A + if (!records %7C%7C !records.length) %7B return resolve(%7B value: 0 %7D); %7D%0A%0A
d0b101824a3a8c469c48b99650f6b84863bb7892
This should be body not data
services/message_broker.js
services/message_broker.js
var callbacks = []; module.exports = function(router) { var message_broker = {}; router.post('/', function(req, res) { console.log("YES: " + req.data); notify(req.data); res.json(["OKAY", 200]); }); message_broker.registerCallback = function(callback) { callbacks.push(callback); } retur...
JavaScript
0.999998
@@ -145,28 +145,28 @@ ES: %22 + req. -data +body );%0A notif @@ -171,20 +171,20 @@ ify(req. -data +body );%0A r
b8c7162496262871a2339fa71796ed69d7ed2442
capitalize Sidebar collection names
lib/jekyll/admin/public/src/containers/Sidebar.js
lib/jekyll/admin/public/src/containers/Sidebar.js
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { Link } from 'react-router'; import _ from 'underscore'; // Constants import { ADMIN_PREFIX } from '../constants'; // Components import Splitter from '../components/Splitter'...
JavaScript
0.99999
@@ -387,16 +387,64 @@ ions';%0A%0A +import %7B capitalize %7D from '../utils/helpers';%0A%0A export c @@ -956,16 +956,27 @@ k%22%3E%3C/i%3E%7B +capitalize( col.labe @@ -976,16 +976,17 @@ ol.label +) %7D%0A
febac211599b3d1316dd7ca07ebea8f1698c86b7
fix compatibility with node-webkit
src/editor/fileUtils.js
src/editor/fileUtils.js
// //var hasLibPng FIRE.savePng = function (canvas, filename, path, pixelBuffer, zip, callback) { function getLibpng(callback) { if (typeof(libpng) !== 'undefined') { callback(libpng); return true; } else if (FIRE.isnode === false && require) { require(['...
JavaScript
0
@@ -287,16 +287,18 @@ require +js ) %7B%0A @@ -312,16 +312,18 @@ require +js (%5B'libpn
ffecf0877c099491a8b096cac4559fe84c31638c
Fix operator permissions in permission map
app/src/pages/common/membersPage/modals/permissionMapModal/permissionMap/permissions.js
app/src/pages/common/membersPage/modals/permissionMapModal/permissionMap/permissions.js
/* * Copyright 2019 EPAM Systems * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
JavaScript
0
@@ -2973,45 +2973,8 @@ ER,%0A - %5BACTIONS.RERUN_LAUNCHES%5D: OWNER,%0A
5746bcd3b30f14f315bb460017537b66c9845135
Fix requires of nodeca.loader
assets/js/nodeca/loader.js
assets/js/nodeca/loader.js
/** * nodeca.loader * * This module provides namespace assets loading for nodeca/nlib based * applcations. **/ //= depend_on nodeca //= require minimizer /*global window, $, _, Modernizr, yepnope, nodeca*/ (function () { 'use strict'; // list of already loaded assets // TODO: cache loaded assets i...
JavaScript
0.000001
@@ -152,15 +152,15 @@ re m -inimize +oderniz r%0A%0A%0A
143fbe713e5aefc643c67448a996c3b1f049fef8
Fix blacks in following style
shared/searchv3/shared.js
shared/searchv3/shared.js
// @flow import * as Constants from '../constants/searchv3' import {globalColors} from '../styles' const followingStateToStyle = (followingState: Constants.FollowingState) => { return { Following: { color: globalColors.green2, }, NoState: { color: globalColors.black_40, }, NotFollowin...
JavaScript
0.999616
@@ -291,10 +291,10 @@ ack_ -40 +75 ,%0A @@ -426,16 +426,19 @@ rs.black +_75 ,%0A %7D,
a075aa0601e2c05e8630ff577d41939a6cdc41fa
Allow decimals for commission percentage
btcprice.js
btcprice.js
// Create global namespace for mybtcprice if (!window.mybtcprice) { window.mybtcprice = {}; } $(document).ready(function() { bitcoinprices.init({ // Where we get bitcoinaverage data url: "https://api.bitcoinaverage.com/ticker/all", // Which of bitcoinaverages value we use to present prices market...
JavaScript
0.001677
@@ -3634,32 +3634,35 @@ commission / 100 +.00 )), 1);%0A to @@ -3958,16 +3958,19 @@ on / 100 +.00 )), 1);%0A
6cef6a46b1664012098b2df60b6fa0e8d65e6ba8
Fix integer parsing that gave incorrect results
graph_ui/js/Graph.js
graph_ui/js/Graph.js
/** * Graph.js * * @author Andrew Bowler, Alberto Gomez-Estrada */ 'use strict'; var React = require('react'); var ReactDOM = require('react-dom'); var Vis = require('vis'); var Graph = React.createClass({ componentDidMount: function() { var element = ReactDOM.findDOMNode(this); this.setState({ n...
JavaScript
0.028343
@@ -880,40 +880,8 @@ es;%0A - console.log(nodeObjects);%0A @@ -1060,28 +1060,47 @@ -if ( +var propertyToFilter = this.props.g @@ -1139,89 +1139,79 @@ rty%5D - %3E this.props.filter.value) %7B%0A console.log(nodeObjects.get(nodeID)); +;%0A if (parseInt(propertyToFilte...
4aadc3ff43ad9dab2a05e9830bc409100aaa043f
clean js
app/assets/javascripts/chaskiq/chaskiq.js
app/assets/javascripts/chaskiq/chaskiq.js
window.Chaskiq = { Helpers: {} } // Custom scripts $(document).ready(function () { // MetsiMenu $('#side-menu').metisMenu(); // Collapse ibox function $('.collapse-link').click( function() { var ibox = $(this).closest('div.ibox'); var button = $(this).find('i'); var content =...
JavaScript
0.000001
@@ -90,2294 +90,153 @@ // -MetsiMenu%0A $('#side-menu').metisMenu();%0A%0A // Collapse ibox function%0A $('.collapse-link').click( function() %7B%0A var ibox = $(this).closest('div.ibox');%0A var button = $(this).find('i');%0A var content = ibox.find('div.ibox-content');%0A conte...
322942ca09d17123b18c711e1b9631d619806c35
Support \n EOL
bin/test.js
bin/test.js
#!/usr/bin/env node /** * Glayzzle : the PHP engine on NodeJS * * Copyright (C) 2014 Glayzzle * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at yo...
JavaScript
0
@@ -3303,24 +3303,71 @@ on(filename) +,%0A isWin = /%5Ewin/.test(process.platform) ;%0A for(va @@ -3579,14 +3579,57 @@ lit( -'%5Cr%5Cn' +%0A isWin ? '%5Cr%5Cn' : '%5Cn'%0A )%0A
509d142e0fbb20942cc0ac3ecb64c15d2300c3cf
remove console.log
ui/cockpit/client/scripts/directives/processDiagram.js
ui/cockpit/client/scripts/directives/processDiagram.js
'use strict'; var fs = require('fs'); var template = fs.readFileSync(__dirname + '/processDiagram.html', 'utf8'); var angular = require('camunda-commons-ui/vendor/angular'); var DirectiveController = ['$scope', '$compile', 'Views', function( $scope, $compile, Views) { $scope.vars = { read: [ 'processData', '...
JavaScript
0.000001
@@ -961,50 +961,8 @@ ) %7B%0A - console.log('bpmn collapse change!');%0A
e175b07d0dba42a55c4a6c0b69130192b39c54de
add some extra modules to conform with the playback spec
src/chromecast_playback.js
src/chromecast_playback.js
import {Events, Log, Playback, template} from 'Clappr' import chromecastHTML from './public/chromecast.html' var TICK_INTERVAL = 100 export default class ChromecastPlayback extends Playback { get name() { return 'chromecast_playback' } get template() { return template(chromecastHTML) } get attributes() { retur...
JavaScript
0
@@ -103,19 +103,21 @@ .html'%0A%0A -var +const TICK_IN @@ -353,16 +353,49 @@ k' %7D %7D%0A%0A + get isReady() %7B return true %7D%0A%0A constr @@ -648,16 +648,366 @@ date())%0A + this.settings = options.settings%0A let noVolume = (name) =%3E name != 'volume'%0A this.settings.default && (this.settings....
ff378128375647a858e5b7c35106188c63eee1ba
update tabswitch
assets/js/src/tabswitch.js
assets/js/src/tabswitch.js
/*! * tab indicator animation * requires bootstrap's (v4.0.0-alpha.3) tab.js */ const Tabswitch = (($) => { // constants >>> const DATA_KEY = 'md.tabswitch'; const NAME = 'tabswitch'; const NO_CONFLICT = $.fn[NAME]; const TRANSITION_DURATION = 450; const Class...
JavaScript
0.000001
@@ -81,25 +81,25 @@ */%0Aconst Tab -s +S witch = (($) @@ -741,25 +741,25 @@ %0A class Tab -s +S witch %7B%0A @@ -3154,25 +3154,25 @@ ta = new Tab -s +S witch(nav);%0A @@ -3364,25 +3364,25 @@ t) %7B%0A Tab -s +S witch._jQuer @@ -3469,25 +3469,25 @@ = Tab -s +S witch._jQuer @@ -3524,25 +3524,25 @...
51c531a8a8bd7bcf93e08e7876badf2d6ec87d37
change arrow
assets/js/pages/search.js
assets/js/pages/search.js
var currentPackage = 1; var currentFunction = 1; function reloadPackages(){ $.ajax({ url: "/api/searchpackages?"+window.location.href.slice(window.location.href.indexOf('?') + 1)+ "&page=" + currentPackage, context: document.body }).done(function(result){ $('.packagedata').empty(); $('.packagepages').empty...
JavaScript
0.000015
@@ -1323,32 +1323,33 @@ vron-left%5C%22%3E%3C/i%3E + Previous Results @@ -3150,16 +3150,17 @@ t%5C%22%3E%3C/i%3E + Previous
03759e57e1f999e98e8ca2167c590a8661d864f1
Comment out paste plain text line and give the option to paste with formatting.
app/assets/javascripts/ckeditor/config.js
app/assets/javascripts/ckeditor/config.js
CKEDITOR.editorConfig = function( config ) { config.allowedContent = true; config.removeFormatTags = ""; config.protectedSource.push(/<r:([\S]+).*<\/r:\1>/g); config.protectedSource.push(/<r:[^>/]*\/>/g); config.forcePasteAsPlainText = true; // if you want to remove clipboard, you have to remove all of the...
JavaScript
0
@@ -206,18 +206,57 @@ %5C/%3E/g);%0A -%0A + //let paste from word be available%0A // config. @@ -275,27 +275,28 @@ PlainText = -tru +fals e;%0A // if y
946541a0dc299ff3cfa537f45c2b61a2acee4725
use named exports
src/js/conversion.js
src/js/conversion.js
import mapConstants from './mapConstants'; const lerp = (minVal, maxVal, pos_r) => pos_r * (maxVal - minVal) + minVal; const reverseLerp = (minVal, maxVal, pos) => (pos - minVal) / (maxVal - minVal); const latLonToWorld = coordinate => { const x_r = lerp(mapConstants.map_x_boundaries[0], mapConstants.map_x_bound...
JavaScript
0.002851
@@ -37,16 +37,23 @@ ants';%0A%0A +export const le @@ -121,16 +121,23 @@ inVal;%0A%0A +export const re @@ -206,24 +206,31 @@ - minVal);%0A%0A +export const latLon @@ -550,24 +550,31 @@ r, y_r%5D;%0A%7D%0A%0A +export const worldT @@ -902,16 +902,23 @@ y%5D;%0A%7D%0A%0A +export const ge @@ -967,16 +967,23 ...
8aa297915064b1f3c0c9de8d07028ded9f6ce3a0
Remove duplicated code
polyfill.js
polyfill.js
'use strict'; var d = require('d/d') , defineProperties = Object.defineProperties , generateName, Symbol; generateName = (function () { var created = Object.create(null); return function (desc) { var postfix = 0; while (created[desc + (postfix || '')]) ++postfix; desc += (postfix || ''); created[desc] ...
JavaScript
0.002603
@@ -1269,138 +1269,8 @@ %7D);%0A -Object.defineProperty(Symbol.prototype, 'originalToString', d(function () %7B%0A%09return 'Symbol (' + this.__description__ + ')';%0A%7D));%0A Obje
472b217391c918f915797e83e1e39d487bcca086
Use nns after drag and drop
src/js/mylibs/map.js
src/js/mylibs/map.js
window.Map = function (divId) { this.divId = divId; }; _.extend(window.Map.prototype, { map: null, dataLayer: null, currentRouteString: null, routeFeature: null, getMap: function () { return this.map; }, /** * Initialize and draw map */ draw: function () { ...
JavaScript
0
@@ -2057,32 +2057,90 @@ %7D);%0A + feature.data.mark.findNearestNeighbour();%0A %7D%0A
a4ce12b9c2671be6788d4c36f888296e92f5f579
fix wrong variable `originServerPath`/`originClientPath`
lib/components/protobuf.js
lib/components/protobuf.js
var fs = require('fs'); var path = require('path'); var protobuf = require('pomelo-protobuf'); var Constants = require('../util/constants'); var crypto = require('crypto'); var logger = require('pomelo-logger').getLogger('pomelo', __filename); module.exports = function(app, opts) { return new Component(app, opts); }...
JavaScript
0
@@ -1015,30 +1015,30 @@ sSync(origin -Client +Server Path) ? Cons @@ -1148,38 +1148,38 @@ xistsSync(origin -Server +Client Path) ? Constant
5bda6891f6e699a8d1f0bdc626972031a745de71
Replace persistent border after un-show-all (#452)
src/code/elementFocuser.js
src/code/elementFocuser.js
import { defaultBorderSettings } from './defaults' export default function ElementFocuser(doc, borderDrawer) { const momentaryBorderTime = 2000 let borderType = defaultBorderSettings.borderType // cached for simplicity let managingBorders = true // draw and remove borders by default let currentElementInfo = nu...
JavaScript
0.000001
@@ -2751,16 +2751,222 @@ lTimer)%0A +%09%09%7D else if (borderType === 'persistent') %7B%0A%09%09%09// When we stop showing all landmarks at once, ensure the last%0A%09%09%09// single one is put back if it was permanent.%0A%09%09%09borderDrawer.addBorder(currentElementInfo)%0A %09%09%7D%0A%09%7D%0A%0A
4584944de13b3db5e9fd3938b0f9588d5a95ed76
Add featureStory header to listview in Home
simul/app/components/home.js
simul/app/components/home.js
import React, { Component } from 'react'; import { StyleSheet, Text, View, ListView, TouchableHighlight, } from 'react-native'; import Search from './search.js' class Home extends Component{ constructor(props) { super(props); const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r...
JavaScript
0
@@ -1060,16 +1060,339 @@ %7D)%0A %7D%0A%0A + featuredStory() %7B%0A return(%0A %3CView style=%7B%7BbackgroundColor: 'lightgrey'%7D%7D%3E%0A %3CText%3E%22My day today was very interesting. First I woke up late and I couldn't find my clean clothes and my mom......%22%3C/Text%3E%0A %3CText sty...
25a74e13d800581cba299cddd2a0d07f6319ccd5
Add AJAX call for login
js/app/routes/login.js
js/app/routes/login.js
define([], function() { Path.map("#!/login").to(function(){ }).enter(function() { require(['tpl!template/login.html'], function(tpl){ $('#main').append($(tpl.apply())); $('header').hide(); $('#main').addClass('transparent-background'); $('footer').hide(); $('#signupCheck').on('click', function(){ ...
JavaScript
0.000001
@@ -718,16 +718,328 @@ e;%0A%09%09%09%7D) +;%0A%0A%09%09%09$('#login').on('submit', function() %7B%0A%09%09%09%09$.ajax(%7B%0A%09%09%09%09%09url: '/api/index.php/login',%0A%09%09%09%09%09dataType: 'json',%0A%09%09%09%09%09type: 'POST',%0A%09%09%09%09%09data: JSON.stringify(%7B%0A%09%09%09%09%09%09username: $('#email')...
deb47bf4adb43ebc5810e48e20d053dfed9c9ecd
Set initial global bar cookie with helper function
app/assets/javascripts/global-bar-init.js
app/assets/javascripts/global-bar-init.js
//= require libs/GlobalBarHelper.js 'use strict' window.GOVUK = window.GOVUK || {} // Bump this if you are releasing a major change to the banner // This will reset the view count so all users will see the banner, even if previously seen var BANNER_VERSION = 3; var globalBarInit = { getBannerVersion: function() { ...
JavaScript
0.00039
@@ -28,16 +28,77 @@ elper.js +%0A//= require govuk_publishing_components/lib/cookie-functions %0A%0A'use s @@ -909,125 +909,8 @@ %7B%0A - var eighty_four_days = 84*24*60*60*1000%0A var expiryDate = new Date(Date.now() + eighty_four_days).toUTCString()%0A @@ -995,31 +995,38 @@ )%7D)%0A +%0A -var c...
8b305a86eb4d8165fe58140675729b1d9c9e3cc7
Update dynamic_carousel.js
js/dynamic_carousel.js
js/dynamic_carousel.js
var duree = "longue"; var duration_longue = true; var duration_courte = false; $(document).ready(function(){ //on initialise les variables avec les valeurs par défaut var duree = "longue"; var pub = "adu"; var nbDePersonnes = 16; var sce = 1; //on appuie les boutons en conséquence $("#dur_lo...
JavaScript
0
@@ -2794,12 +2794,1127 @@ %7D);%0A%0A %7D);%0A +%0A%0A%0A%0Afunction demoFromHTML() %7B%0A %0A%0A%0A doc = new jsPDF('p', 'pt', 'a4', false); %0A %0A %0A if(duration_longue)%7B%0A var logo = new Image();%0A logo.src = %22../donnes/1.png%22;%0A ...
c36eb34bf4c096e4845c7aae9cd70de366a5685c
Add imagesloaded, eventEmitter and eventie to demo, otherwise demo won't load
demo/main.js
demo/main.js
config = { baseUrl: '/src', paths: { "jquery": "bower_components/jquery/jquery", "logging": "bower_components/logging/src/logging", "jquery.form": "bower_components/jquery-form/jquery.form", "jquery.anythingslider": "bower_components/AnythingSlider/js/jquery.anythingslider", ...
JavaScript
0
@@ -1642,24 +1642,198 @@ /spectrum%22,%0A + %22imagesloaded%22: %22bower_components/imagesloaded/imagesloaded%22,%0A %22eventEmitter%22: %22bower_components/eventEmitter%22,%0A %22eventie%22: %22bower_components/eventie%22,%0A // C
2645465b509d279aaf1fae9dbd613d5abfa54812
create virtual dom is this
dist/moon.js
dist/moon.js
/* * Moon 0.0.0 * Copyright 2016, Kabir Shah * https://github.com/KingPixil/moon/ * Free to use under the MIT license. * https://kingpixil.github.io/license */ "use strict"; (function(window) { function Moon(opts) { var _el = opts.el; var _data = opts.data; var _methods = opts.method...
JavaScript
0.000009
@@ -1648,16 +1648,21 @@ var +this. createVi
a3906c4d9cd7440295c215b01f66ee38b3c0599a
bump build number
src/front/app.config.js
src/front/app.config.js
import 'dotenv/config'; const bundleId = 'gov.dts.ugrc.utahwvcr'; const buildNumber = 520; export default { name: 'WVC Reporter', slug: 'wildlife-vehicle-collision-reporter', description: 'A mobile application for reporting and removing animal carcasses.', // this needs to be different from the bundleId, oth...
JavaScript
0.000083
@@ -83,17 +83,17 @@ ber = 52 -0 +1 ;%0A%0Aexpor
b620b75469882da508f78e6cde2a0f8294eaeb66
add gulp folder
gulp/tasks/eslint.js
gulp/tasks/eslint.js
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import gulp from 'gulp'; import eslint from 'gulp-eslint'; import config from '../config'; gulp.task('eslint', () => gulp.src(config.files.js) .pipe(eslint()) .pipe(eslint.format()) .pipe(eslint.failAfterError()));
JavaScript
0.000001
@@ -205,16 +205,26 @@ ulp.src( +%5B%5D.concat( config.f @@ -230,16 +230,37 @@ files.js +, %5B'./gulp/**/*.js'%5D) )%0A .p
e7b57bcade8367baa6c7e126c1f6cef42fdf99f3
Refactor MenuView to use tokenIsPresent() instead of loggedIn flag.
app/assets/javascripts/views/user/menu.js
app/assets/javascripts/views/user/menu.js
Teikei.module("User", function(User, App, Backbone, Marionette, $, _) { User.MenuView = Marionette.View.extend({ el: "#user", ui: { signInToggle: "#signin", signUpToggle: "#signup", currentUserMenuItem: "#current_user", participateMenuItem: "#participate", newEntryMenuItem: "#...
JavaScript
0
@@ -761,98 +761,22 @@ -if ( this. -model.get(%22loggedIn%22))%7B%0A this.onSignIn();%0A %7D%0A this.updateUserNam +invalidat e(); @@ -822,24 +822,26 @@ %22, this. -onSignIn +invalidate , this); @@ -887,24 +887,26 @@ %22, this. -onLogout +invalidate , this); @@ -980,32 +980,28 @@ lt();%0A ...
b29ddeb002c914fb25819f49df8d6a9e0f7e2395
make the default "compiled" dir be overridable
bindings.js
bindings.js
/** * Module dependencies. */ var fs = require('fs') , path = require('path') , join = path.join , dirname = path.dirname , exists = fs.existsSync || path.existsSync , defaults = { arrow: process.env.NODE_BINDINGS_ARROW || ' → ' , compiled: 'compiled' , platform: process.platform ...
JavaScript
0.998502
@@ -261,16 +261,58 @@ ompiled: + process.env.NODE_BINDINGS_COMPILED_DIR %7C%7C 'compil
cd3073987f6d317affc519e395cee89793c6a90c
Rebuild js.
vendor/assets/javascripts/jquery.turbolinks.js
vendor/assets/javascripts/jquery.turbolinks.js
// Generated by CoffeeScript 1.6.3 /* jQuery.Turbolinks ~ https://github.com/kossnocorp/jquery.turbolinks jQuery plugin for drop-in fix binded events problem caused by Turbolinks The MIT License Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz */ (function() { var $, $document; $ = window.jQuery || (typeof r...
JavaScript
0.000001
@@ -28,11 +28,12 @@ t 1. -6.3 +7.1%0A %0A/*%0A @@ -246,13 +246,13 @@ ruz%0A + */%0A%0A -%0A (fun @@ -428,17 +428,17 @@ n: '2.0. -0 +1 ',%0A i
13bcd3c652b29785416039aedf893a9f47eb1cc5
Remove unused code
app/client/front/js/ov/VideoController.js
app/client/front/js/ov/VideoController.js
'use strict'; (function(app) { /** * * @param {type} $scope * @param {type} $locale * @param {type} $timeout * @param {type} $location * @returns {VideoController_L3.VideoController} */ function VideoController($scope, $http, $locale, ...
JavaScript
0.000006
@@ -2365,34 +2365,8 @@ ');%0A - var playerController;%0A @@ -3412,176 +3412,8 @@ ion; -%0A%0A // only gets called once%0A if (!playerController %7C%7C duration) %7B%0A playerController = angular.element(myPlayer).controller('ovPlayer');%0A %7D %0A
6a87482243e3648507754641c8675af30e675104
implement setPosition, setTarget, setZoom
src/gltf/user_camera.js
src/gltf/user_camera.js
import { vec3 } from 'gl-matrix'; import { gltfCamera } from './camera.js'; import { jsToGl, clamp } from './utils.js'; import { getSceneExtents } from './gltf_utils.js'; const VecZero = vec3.create(); const PanSpeedDenominator = 1200; const MaxNearFarRatio = 10000; class UserCamera extends gltfCamera { construct...
JavaScript
0.000001
@@ -1620,24 +1620,191 @@ ce);%0A %7D%0A%0A + setPosition(position)%0A %7B%0A this.lookAt(position, this.target);%0A %7D%0A%0A setTarget(target)%0A %7B%0A this.lookAt(target, this.getPosition());%0A %7D%0A%0A setRotat @@ -2202,24 +2202,81 @@ ce);%0A %7D%0A%0A + setZoom(zoo...
85e70a5913d3b8373db761c19f7df9c59f9bd86d
Update bits-oder-functions.js
js/bits-oder-functions.js
js/bits-oder-functions.js
//////////////////////////////////////////////////////////////////////////////////////////////////////////// function oid() { //Get Token Balance $("#tokenBal").html(allTokens.balanceTokens.totalEarned.toFixed(2) + " tokens"); //Load Wallet $(".walletToast").remove(); if (localStorage.getItem('bits-...
JavaScript
0.000001
@@ -4874,41 +4874,14 @@ ens%5B -allTokens%5B'allContracts'%5D%5B at%5Bi%5D%5D -%5D .web
ecfef54d382b3b7b4c8c99405f329b6634ca9765
Include the object in ROW_CLICK events. Default to CitationView instead of DetailView.
js/foam/u2/DAOListView.js
js/foam/u2/DAOListView.js
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
JavaScript
0
@@ -2165,22 +2165,24 @@ this. -Detail +Citation View.cre @@ -2281,16 +2281,21 @@ OW_CLICK +, obj );%0A
701cf0e0ba2866a0e6f9ed1e05de3c6b959e67c9
Fix foam.u2.md.TextArea after focused was added to Element.
js/foam/u2/md/TextArea.js
js/foam/u2/md/TextArea.js
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
JavaScript
0
@@ -1191,17 +1191,16 @@ .focused -_ = true; @@ -1252,9 +1252,8 @@ used -_ = f
eb934e09eeed76a6a66033d1b00c2ed7c94e9da4
Add main doc block
cangraph.js
cangraph.js
JavaScript
0
@@ -0,0 +1,222 @@ +/**%0A * Cangraph%0A *%0A * Graphing and function plotting for the HTML5 canvas. Main function plotting%0A * engine was taken from the link below and modified.%0A *%0A * @link http://www.javascripter.net/faq/plotafunctiongraph.htm%0A */
a74e4192cb40ca1582489db1c276fc5b4ae38e30
Remove debugger
js/templateSelector.js
js/templateSelector.js
/** * The UI Element for browsing and selecting pre-defined Pedigree templates * * @class TemplateSelector * @constructor * @param {Boolean} isStartupTemplateSelector Set to True if no pedigree has been loaded yet */ var TemplateSelector = Class.create({ initialize: function (isStartupTemplateSelector) { this...
JavaScript
0.00001
@@ -1412,27 +1412,16 @@ ings();%0A -%09%09debugger%0A %09%09var ne @@ -2689,20 +2689,8 @@ ();%0A -%09%09%09debugger%0A %09%09%09v
82ad6a6eb3f09c073eb3cf8e7626bfd05ef04fa7
remove console
js/saiku/views/Upgrade.js
js/saiku/views/Upgrade.js
/* * Copyright 2012 OSBI Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
JavaScript
0.000002
@@ -1470,129 +1470,8 @@ ();%0A - console.log(%22timeout: %22 + (!timeout) + %22 localstorage: %22 + localStorageUsed + %22 : diff %22 + (current - timeout));%0A
a9920a53764c39c826a7e85048984ac71cf59386
fix #3
js/src/partition/hoare.js
js/src/partition/hoare.js
/** * HYP : i < j */ var hoare = function ( predicate, a, i, j ) { var x, t, o; o = i; x = a[o]; while ( true ) { while ( true ) { --j; if ( i >= j ) { t = a[o]; a[o] = a[j]; a[j] = t; return j; } if ( predicate( a[j], x ) ) { break; } } while ( true ) { ...
JavaScript
0.000003
@@ -231,32 +231,37 @@ urn j;%0A%09%09%09%7D%0A%0A%09%09%09 +else if ( predicate( @@ -410,24 +410,29 @@ j;%0A%09%09%09%7D%0A%0A%09%09%09 +else if ( predica
381d33fe6cb2dce497d092647534310cd9cd4bf8
Implement d3 updates for grouped bars
src/components/BarChart.js
src/components/BarChart.js
import React, { PropTypes } from 'react' import Faux from 'react-faux-dom' import * as d3 from 'd3' import styled from 'styled-components' const { arrayOf, array, string, number } = PropTypes const BarChart = React.createClass({ mixins: [Faux.mixins.core, Faux.mixins.anim], propTypes: { data: arrayOf(array), ...
JavaScript
0
@@ -2808,16 +2808,59 @@ ht', 0)%0A + if (this.state.look === 'stacked') %7B%0A rect @@ -2856,24 +2856,26 @@ %0A rect%0A + .trans @@ -2888,16 +2888,18 @@ )%0A + .delay(( @@ -2917,24 +2917,26 @@ * 10)%0A + + .attr('y', d @@ -2950,24 +2950,26 @@ .y0 + d.y))%0A + .att...
bfb279f700d5e3addef8e0df72a429b518cffef7
add compatibility comment
src/select/select.js
src/select/select.js
import {bindable, customAttribute} from 'aurelia-templating'; import {BindingEngine} from 'aurelia-binding'; import {inject} from 'aurelia-dependency-injection'; import {TaskQueue} from 'aurelia-task-queue'; import * as LogManager from 'aurelia-logging'; import {fireEvent} from '../common/events'; import {DOM} from 'au...
JavaScript
0
@@ -5053,16 +5053,34 @@ // IE +11 - ok%0A // Edge ?%0A //%0A
35e3f37c93adae953af210ef28f1d930300022f0
Clean up code styles
autoHeightWebView/utils.js
autoHeightWebView/utils.js
'use strict'; import { Dimensions, Platform } from 'react-native'; const domMutationObserveScript = ` var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; var observer = new MutationObserver(updateSize); observer.observe(document, { subtree: true, attributes: true }); `; const upd...
JavaScript
0.000001
@@ -1443,22 +1443,8 @@ meta - for WKWebView %0Acon
42d122b9ea4684ef417e9b6b3b5df4e0e630ddba
Make ComponentName components link to the API section about it
demo/src/components/ComponentName/ComponentName.js
demo/src/components/ComponentName/ComponentName.js
import React, { PropTypes } from 'react'; import './ComponentName.scss'; const ComponentName = ({ children }) => ( <span className="ComponentName">{`<${children}>`}</span> ); ComponentName.propTypes = { children: PropTypes.string.isRequired, }; export default ComponentName;
JavaScript
0
@@ -114,20 +114,116 @@ =%3E (%0A %3C -span +a%0A href=%7B%60https://github.com/joshwcomeau/react-collection-helpers#$%7Bchildren.toLowerCase()%7D%60%7D%0A classNa @@ -240,17 +240,25 @@ entName%22 -%3E +%0A %3E%0A %7B%60%3C$%7Bchi @@ -270,14 +270,14 @@ %7D%3E%60%7D -%3C/span +%0A %3C/a %3E%0A);
b3836d895528f1fa001ae532dbe1b2fa5a7304bf
Fix typo
src/components/Settings.js
src/components/Settings.js
'use strict'; import React, { Component, TouchableOpacity, StyleSheet, Text, View, Alert } from 'react-native'; // import css variables import design from '../design'; import * as ideaActions from '../actions/ideaActions'; import {bindActionCreators} from 'redux'; import { connect } from 'react-redux'; ...
JavaScript
0.999999
@@ -508,19 +508,19 @@ s;%0A%0A -var +let ideasSt @@ -717,54 +717,8 @@ ing; -%0A%0A console.log('ideasString', ideasString); %0A