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 |
|---|---|---|---|---|---|---|---|
c5c170082e0731872c1abc366a6559f56621410f | add one more loggin message | sync.js | sync.js | /**
* @author Filip Prochazka (@jacktech24)
*/
"use strict";
const winston = require('winston');
const fs = require('fs');
const CommunityFirebaseManager = require('./community_fb_manager');
const MeetupSync = require('./meetup_sync');
const customFirebaseDefinition = require('./gug_cz_firebase_definition');
wins... | JavaScript | 0 | @@ -846,16 +846,106 @@
urn;%0A%7D%0A%0A
+winston.info('Initializing connection to Firebase %22' + config%5B'firebase_app_id'%5D + '%22');%0A%0A
var fbMa
|
f2f9828b106c5355ad7edf41f6c70cbd4ed53904 | Update differenceEnginev2.js | javascript/differenceEnginev2.js | javascript/differenceEnginev2.js | // Create the array
var x = new Array(7);
for (var i = 0; i < 7; i++) {
x[i] = new Array(8);
}
// Initalize the Array
for (var i = 0; i < 7; i++) {
for (var j = 0; j < 8; j++) {
x[i][j] = 0;
}
}
// Update the values from the start
function initalUpdateNumbers() {
for (var i = 0; i < 7; i++) {
for (var... | JavaScript | 0 | @@ -2735,17 +2735,17 @@
0; i %3C
-6
+8
; i++) %7B
@@ -2769,17 +2769,17 @@
0; j %3C
-7
+6
; j++) %7B
|
789e70f2d6b55347e2fbb480c1e27766621b827f | Remove old atoms | skins/base/views/organisms/CreateRoom.js | skins/base/views/organisms/CreateRoom.js | /*
Copyright 2015 OpenMarket 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 agreed to in writing, software
... | JavaScript | 0.999679 | @@ -937,156 +937,8 @@
%22);%0A
-var RoomNameTextbox = ComponentBroker.get(%22atoms/create_room/RoomNameTextbox%22);%0Avar RoomTopic = ComponentBroker.get(%22atoms/create_room/RoomTopic%22);%0A
var
|
6e4f427fd6bf6c10bd1fd8287c71eda5237d4d98 | Change protocol to 'http' | views/js/helpers/welcome/userinforetriever.js | views/js/helpers/welcome/userinforetriever.js | /**
* Created by Omnius on 6/27/16.
*/
const retrieveUserInfo = function () {
const hawkSessionTokenCookie = MyUtils.getCookie('Hawk-Session-Token');
const decodedHawkSessionTokenCookie = window.atob(hawkSessionTokenCookie);
const tokenCredentials = JSON.parse(decodedHawkSessionTokenCookie);
const ... | JavaScript | 0.999672 | @@ -571,16 +571,29 @@
otocol =
+ 'http://' //
locatio
|
82be9e43dd49e4ffbf9ee93fbde6ae2dfa51ef03 | set localStorage.recommendedPracticesAlertShown to false at login | web/public/js/controllers/login-controller.js | web/public/js/controllers/login-controller.js | 'use strict';
angular.module('cpZenPlatform').controller('login', ['$state', '$stateParams', '$scope', '$rootScope', '$location', '$window',
'auth', 'alertService', '$translate', 'cdUsersService', 'cdConfigService', 'utilsService', 'vcRecaptchaService', '$localStorage',
'usSpinnerService', '$cookieStore', loginCtr... | JavaScript | 0.000001 | @@ -4048,24 +4048,87 @@
tion(data)%7B%0A
+ $localStorage.recommendedPracticesAlertShown = false;%0A%0A
if (
@@ -4389,72 +4389,8 @@
%7D%0A
- $localStorage.recommendedPracticesAlertShown = false;%0A
|
3be69aac8860185c5df78e7ff64a9a5f82cb2757 | Add test for BC date | test.js | test.js | 'use strict'
var test = require('tape')
var parse = require('./')
test('date parser', function (t) {
t.equal(parse('garbage'), null)
t.equal(
parse('2010-12-11 09:09:04').toString(),
new Date('2010-12-11 09:09:04').toString()
)
t.equal(
parse('0013-06-01').getFullYear(),
13
)
t.equal(
... | JavaScript | 0.000262 | @@ -235,24 +235,188 @@
ring()%0A )%0A%0A
+ var ancient = new Date('2010-12-11 09:09:04')%0A ancient.setFullYear(-2010)%0A t.equal(%0A parse('2010-12-11 09:09:04 BC').toString(),%0A ancient.toString()%0A )%0A%0A
t.equal(%0A
|
730fd427302fcbd78013f9c1b25bdd038ecbbdc2 | upgrade to latest AVA | test.js | test.js | import fs from 'fs';
import test from 'ava';
import fn from './';
const fixture = fs.readFileSync('fixtures/ps.out', 'utf8');
const fixture2 = fs.readFileSync('fixtures/ps-2.out', 'utf8');
const fixture3 = fs.readFileSync('fixtures/lsof.out', 'utf8');
const fixture4 = fs.readFileSync('fixtures/ps-3.out', 'utf8');
tes... | JavaScript | 0 | @@ -501,26 +501,30 @@
'238');%0A%09t.
-ok
+truthy
(f%5B0%5D.name);
@@ -531,10 +531,14 @@
%0A%09t.
-ok
+truthy
(f%5B0
@@ -1267,12 +1267,17 @@
%0A%09t.
-same
+deepEqual
(f,
|
d58d7cd733673cf55c739796f210da4eb9ad52fd | use functions of imghex module | test.js | test.js | var express,
connect,
jade,
uglify,
ug_parser,
ug_uglify,
app;
express = require('express');
jade = require('jade');
hexMap = require('./lib/imghex');
app = express.createServer();
// Configuration
app.configure(function(){
// use jade
app.set('views', __dirname + '/views');
app.set('view engine', 'jad... | JavaScript | 0.000001 | @@ -8,185 +8,326 @@
ress
-,%0A%09connect,%0A%09jade,%0A%09uglify,%0A%09ug_parser,%0A%09ug_uglify
+ = require('express'),%0A%09jade = require('jade')
,%0A%09app
-;%0A%09%09%0A
+ =
express
- = require('express');%0Ajade = require('jade');%0AhexMap = require('./lib/imghex');%0A%0Aapp = express.createServer(
+.createSe... |
4b5027205c93c6c5fd26ba9ce56d3f138a15877e | update tests with async | test.js | test.js | /*!
* helper-concat <https://github.com/jonschlinkert/helper-concat>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT License
*/
'use strict';
var should = require('should');
var handlebars = require('handlebars');
var _ = require('lodash');
var concatHelper = require('./');
describ... | JavaScript | 0 | @@ -281,22 +281,16 @@
r concat
-Helper
= requi
@@ -296,24 +296,58 @@
ire('./');%0A%0A
+describe('async', function () %7B%0A
describe('co
@@ -366,32 +366,34 @@
, function () %7B%0A
+
it('should ret
@@ -424,36 +424,42 @@
le:', function (
+done
) %7B%0A
+
concatHelper
@@ -444,38 +444,32 @@
) %7B%0A ... |
8355bf62e192146cdcb929e4aa2f017afd902e3c | Update Version Number | Version-1.0.0/sb-rwjs.js | Version-1.0.0/sb-rwjs.js | /*
* Framework : SANBREEZE Resposive Web JS
* Version : 1.0.0
* Filename : sb-rwjs.js
* Copyright : © 2014, Mario Briesemeister
*
*
* Documentation:
* Please visit http://www.sanbreeze.com/rwjs/ for more information
* about to integrate this framework to your site and for downloading
* this framework.
*
... | JavaScript | 0.000001 | @@ -176,33 +176,37 @@
http
+s
://
-www.sanbreeze.com/rwjs
+github.com/SANBREEZE/RWJS
/ fo
|
aa4bdf7b157cc192f5f0d79b2c27235e16a5681e | Fix context passing argument bug in test runner | test.js | test.js | // vim:ts=4:sts=4:sw=4:
module.exports = Test;
function Test(name, callback, suite) {
this.name = name;
this.callback = callback;
this.children = [];
this.suite = suite;
this.skip = !callback;
}
Test.prototype.type = "it";
Test.prototype.run = function (report, Promise) {
var self = this;
... | JavaScript | 0.000033 | @@ -1594,24 +1594,33 @@
.beforeEach,
+ Promise,
context, re
@@ -1997,16 +1997,25 @@
terEach,
+ Promise,
context
|
fcc0885803258019bca67a41111afe71dcdf4dbc | fix link tests to account for electron docs changes | test.js | test.js | const fs = require('fs')
const path = require('path')
const expect = require('chai').expect
const requireDir = require('require-dir')
const semver = require('semver')
const matter = require('gray-matter')
const marky = require('marky-markdown-lite')
describe('electron.atom.io', () => {
describe('apps', () => {
c... | JavaScript | 0 | @@ -1383,36 +1383,24 @@
%7D%7D/docs/
-tutorial/quick-start
+glossary
#main-pr
@@ -1588,36 +1588,24 @@
%7D%7D/docs/
-tutorial/quick-start
+glossary
#main-pr
@@ -1680,28 +1680,16 @@
ocs/
-tutorial/quick-start
+glossary
#ren
|
e66aa6aee8b75f37c04bdf98d257ab533615e34e | copy of JS files for `dev` | ontrack-web/Gruntfile.js | ontrack-web/Gruntfile.js | module.exports = function (grunt) {
var devTarget = 'target/dev';
var tmp = 'target/tmp';
var appJs = '**/*.js';
grunt.initConfig({
/**
* Reads the `package.json` so that its data is available to the Grunt tasks.
*/
pkg: grunt.file.readJSON('package.json'),
... | JavaScript | 0 | @@ -34,99 +34,8 @@
%7B%0A%0A
- var devTarget = 'target/dev';%0A var tmp = 'target/tmp';%0A%0A var appJs = '**/*.js';%0A%0A
@@ -308,27 +308,476 @@
-devTarget%0A %5D
+'target/dev'%0A %5D,%0A%0A /**%0A * Copy of files%0A */%0A copy: %7B%0A /**%0... |
38e7166598cf915b76d3725362f199c70bbd5bbe | fix failing test ion-pager should show unless told not to. | js/angular/directive/slideBox.js | js/angular/directive/slideBox.js |
/**
* @ngdoc directive
* @name ionSlideBox
* @module ionic
* @delegate ionic.service:$ionicSlideBoxDelegate
* @restrict E
* @description
* The Slide Box is a multi-page container where each page can be swiped or dragged between:
*
*  %7B%0A
+ if (show === undefined) return;%0A
show
|
257e7792a28677c9791899939a5b4f80fa5fb8dc | remove foul language! | server/isomorphic.js | server/isomorphic.js | var React = require('react')
var ReactDOMServer = require('react-dom/server')
var StaticRouter = require('react-router-dom').StaticRouter
var ServerStyleSheet = require('styled-components').ServerStyleSheet
var fs = require('fs')
var _ = require('lodash')
var baseTemplate = fs.readFileSync('./index.html') // TODO chang... | JavaScript | 0.000333 | @@ -750,34 +750,8 @@
)%0A%0A
- console.log('bitch?');%0A%0A
if
|
37fb500e22aeb4762cef90ca8ca4f28eead57fa6 | fix useCallback dependencies, delint | src/accessibility/RovingTabIndex.js | src/accessibility/RovingTabIndex.js | /*
Copyright 2020 The Matrix.org Foundation C.I.C.
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 | @@ -5595,24 +5595,50 @@
ontext.state
+, onKeyDown, handleHomeEnd
%5D);%0A%0A ret
|
fbe9a6a1401119603de630e248d677a22da5c69e | Send dummy payloads at inspection callbacks. | inspect.js | inspect.js | module.exports = function(app, settings) {
app.get('/status.json', function(req, res) {
res.send({ status: 'true' });
});
/**
* @TODO expose available fonts (and other 'abilities').
*/
app.get('/abilities.json', function(req, res) {
res.send({ fonts: [] });
});
/**
... | JavaScript | 0 | @@ -398,32 +398,54 @@
req, res) %7B%0A
+ res.send(%7B%7D);%0A
%7D);%0A
%0A /**%0A
@@ -424,32 +424,32 @@
nd(%7B%7D);%0A %7D);%0A
-
%0A /**%0A *
@@ -520,32 +520,54 @@
ion(req, res) %7B%0A
+ res.send(%7B%7D);%0A
%7D);%0A%0A /**
@@ -658,32 +658,54 @@
ion(req, res) %7B%0A
+ ... |
a4524818368e07a8a46b04b8e06d2b7230e4e2d6 | Fix some lint warnings. | js/backend/channels/transport.js | js/backend/channels/transport.js | 'use strict';
define(['bitcoinjs-lib', 'backend/channels/peer', 'util/djbec', 'util/encryption'],
function (Bitcoin, Peer, Curve25519, Encryption) {
/************************************
* Transport
*/
function Transport(identity, obeliskService, cryptoService) {
this.obelisk = obeliskService;
this... | JavaScript | 0.000003 | @@ -1161,20 +1161,21 @@
signKey%7D
+;
%7D;%0A
-
%0A //
@@ -1377,16 +1377,17 @@
nKeyPub%7D
+;
%7D;%0A%0A
@@ -2537,24 +2537,25 @@
%0A %7D%0A %7D
+;
%0A%0A /**%0A *
@@ -2784,16 +2784,17 @@
%7D%0A %7D
+;
%0A %0A /**
@@ -3501,16 +3501,17 @@
index ==
+=
-1) %7B%0A
@@ -4489,32 +4489,32 @@
... |
a08299bb12f560f99e4f1a966b03041f34673847 | add next to testAlgo | server/middleware.js | server/middleware.js | var Promise = require('bluebird');
var eval = require('./evaluation.js');
var utils = require('./utilities.js');
var theta = require('./thetaComputation.js')
module.exports.evalForAllInputSizes = function(req, res, next) {
var userInput = req.body.data;
var dataType = req.params.dataType || null;
return new Pro... | JavaScript | 0 | @@ -1049,16 +1049,26 @@
');%0A %7D%0A
+ next();%0A
%7D;%0A%0Amodu
|
4b0d6b6ad8b3cdbf79d71e2b0039eee9e6fd9f0d | Address PR comments | src/foam/nanos/auth/PMAuthService.js | src/foam/nanos/auth/PMAuthService.js | foam.CLASS({
package: 'foam.nanos.auth',
name: 'PMAuthService',
extends: 'foam.nanos.auth.ProxyAuthService',
implements: [
'foam.nanos.auth.EnabledAware',
'foam.nanos.boot.NSpecAware'
],
requires: [
'foam.nanos.pm.PM'
],
javaImports: [
'foam.core.X',
'foam.mlang.order.Comparator',... | JavaScript | 0 | @@ -163,42 +163,8 @@
are'
-,%0A 'foam.nanos.boot.NSpecAware'
%0A %5D
@@ -451,110 +451,8 @@
%7B%0A
- name: 'nSpec',%0A class: 'FObjectProperty',%0A type: 'foam.nanos.boot.NSpec'%0A %7D,%0A %7B%0A
@@ -922,17 +922,16 @@
pm =
-
(PM) x.
@@ -1498,32 +1498,13 @@
urn
-getNSpec().ge... |
00af62399609daf27961e74283aac0278d4cf1f5 | add error handle request percent zencoder | public/javascripts/script.js | public/javascripts/script.js | $(function() {
var showInfo = function(message) {
$('div.progress').hide();
$('strong.message').text(message);
$('div.alert').show();
};
$('form').on('submit', function(evt) {
evt.preventDefault();
console.log('eita');
$('div.progress').show();
$('.label-bar').text('Enviando vi... | JavaScript | 0 | @@ -1320,18 +1320,16 @@
-//
if (!dat
@@ -1345,18 +1345,16 @@
-//
%7B%0A
@@ -1926,18 +1926,16 @@
-//
%7Delse%7B%0A
@@ -1943,18 +1943,16 @@
-//
console.
@@ -1983,18 +1983,16 @@
-//
%7D%0A
|
41ada03e12a6f792577938d328df3ecbc34bdaa7 | Update install.js | install.js | install.js | 'use strict'
var cp = require('child_process')
var fs = require('fs')
var http = require('http')
var https = require('https')
var path = require('path')
var url = require('url')
var rimraf = require('rimraf').sync
var AdmZip = require('adm-zip')
fs.existsSync = fs.existsSync || path.existsSync
var libPath = path.joi... | JavaScript | 0 | @@ -451,17 +451,17 @@
ive/1.0.
-2
+3
.zip'%0A%0Af
@@ -734,17 +734,17 @@
rjs-1.0.
-2
+3
', 'bin'
|
fb678142981fa8dda3e8445782aa95c1e8695741 | test for html table | test.js | test.js | a = require('./prettytable.js');
// a.fieldNames(["City name", "Area", "Population", "ann"]);
// a.add_row(["Adelaide",1295, 1158259, 600.5])
// a.add_row(["Brisbane",5905, 1857594, 1146.4])
// a.add_row(["Darwin", 112, 120900, 1714.7])
// a.add_row(["Hobart", 1357, 205556, 619.5])
// a.add_row(["Sydney", 2058, 43363... | JavaScript | 0.000004 | @@ -550,9 +550,145 @@
t.json%22)
+;%0Avar h = a.html(attributes=%7B%22name%22:%22my_table%22, %22class%22:%22red_table%22, %22border%22:%221%22%7D);%0Avar h1 = a.html();%0Aconsole.log(h);%0Aconsole.log(h1);
%0A
|
27c5b6f57f86961ddbad0aef7b8a612d463b7fe6 | Fix download and upload speed computation | web/src/js/app/workerService.js | web/src/js/app/workerService.js | import IpInfo from "../utils/ipInfo";
import { UI } from "./ui";
import Results from "./results";
import SpeedTestWorker from "../worker";
import STATUS from "../worker/status";
import STEP from "../worker/step";
export default class WorkerService {
constructor() {
this.queueTest = false;
this.work... | JavaScript | 0 | @@ -4478,32 +4478,33 @@
?
+(
(+data.results.d
@@ -4508,32 +4508,38 @@
s.download.speed
+ %7C%7C 0)
/ (1024 * 1024)
@@ -4540,33 +4540,75 @@
1024)).toFixed(
-2
+%0A 2%0A
)%0A
@@ -4639,36 +4639,34 @@
a.step === STEP.
-DOWN
+UP
LOAD)%0A ... |
7236367d8d21753fa00322e08a694cc41c49417b | Add news model. | server/model/news.js | server/model/news.js | JavaScript | 0 | @@ -0,0 +1,2207 @@
+const express = require('express')%0A%0Aconst News = require('../db').News%0Aconst route = express.Router()%0A%0Aroute.route('/')%0A .get((req, res) =%3E %7B%0A News.find(%7B%7D, (err, doc) =%3E %7B%0A switch (true) %7B%0A case err %7C%7C !doc:%0A res.json(%7B%0A ... | |
8c4a1cc8a7dbfe817ad25f99567770c3e3768f25 | Remove user if is not is guild. | server/app/models/guildAdModel.js | server/app/models/guildAdModel.js | "use strict"
//Defines dependencies
var guildAdSchema = process.require('config/db/guildAdSchema.json');
var applicationStorage = process.require("api/applicationStorage");
var userService = process.require("services/userService.js");
var Confine = require("confine");
var async = require("async");
//Configuration
var... | JavaScript | 0 | @@ -1697,17 +1697,16 @@
error)%7B%0A
-%0A
@@ -1739,17 +1739,16 @@
ildAd);%0A
-%0A
@@ -1798,133 +1798,279 @@
//
-TODO supprimer l'id de la personne de la
+Remove user from
guild
-e
(
-pour viter de lui prsenter une guilde qu'il ne possde plus (gquit ou kick))%0A
+gquit / gkick)%0A ... |
1066fe582485b140f755f33bdccd744108c761a4 | Remove process.mixin from the test runner | test.js | test.js | // This file is just a mess of examples of how to use the library.
var Do = require('./lib/do');
var fs = Do.convert(require('fs'), ["readFile", "stat", "readdir"]);
var http = Do.convert(require('http'), ['cat']);
process.mixin(require('sys'));
function debug(message, showHidden) {
puts(inspect(message, showHidden... | JavaScript | 0.000001 | @@ -213,23 +213,18 @@
%5D);%0A
-%0Aprocess.mixin(
+var sys =
requ
@@ -233,18 +233,18 @@
e('sys')
-)
;
+%0A
%0Afunctio
@@ -276,21 +276,30 @@
en) %7B%0A
-puts(
+sys.error(sys.
inspect(
@@ -353,20 +353,25 @@
ce) %7B%0A
-puts
+sys.error
(%22ERROR:
@@ -371,24 +371,28 @@
%22ERROR: %22 +
+sys.
inspect(trac
@@... |
1b910b0445796167db309d32d44171aca4d458d5 | remove console.log | src/filetransfert.js | src/filetransfert.js | var config = require('./config.json')
var Log = require('./log.js')
var fs = require('fs')
var portscanner = require('portscanner')
function FileTransfert (req, res, callback) {
var self = this
if (config.nginx.active) {
portscanner.checkPortStatus(config.nginx.port, 'localhost', function (error, status) {
... | JavaScript | 0.000006 | @@ -1208,42 +1208,8 @@
()%7B%0A
- console.log(self.timeout)%0A
|
6f52f52a9d1e0889b3ea66e6694730a365688640 | remove images from page | js/controllers/viewController.js | js/controllers/viewController.js | /**
* Created by sebastian on 5/8/15.
*/
"use strict";
var ownsheetApp = angular.module("ownsheetApp");
ownsheetApp.controller('viewController', ["$scope", "$window", "$routeParams", "$sce",
"chromeStorageService", "mdParserService", "previewContentService", "localStorageService",
function ($scope, $window... | JavaScript | 0 | @@ -3445,24 +3445,91 @@
%7D%0A %7D);%0A%0A
+ $('img').each(function () %7B%0A $(this).remove();%0A %7D);%0A%0A
$('pre')
|
0f8e35ac488aafe428bf417af2e2275811f6ffb4 | fix tabs | test.js | test.js | var IntervalTree = require('./IntervalTree');
function test() {
function createRandomInterval(unit, id) {
var p1 = Math.floor(Math.random() * unit);
var p2 = Math.floor(Math.random() * unit);
if (p1 === p2) {
if (p1 > 0 ) {
p1--;
}
else {
p2++;
}
}
return [Math.min(... | JavaScript | 0.000001 | @@ -220,17 +220,18 @@
) %7B%0A
-%09
+
if (p1 %3E
@@ -241,18 +241,20 @@
) %7B%0A
-%09%09
+
p1--;%0A
@@ -259,16 +259,18 @@
-%09
+
%7D%0A
-%09
+
else
@@ -280,10 +280,12 @@
-%09%09
+
p2++
@@ -294,9 +294,10 @@
-%09
+
%7D%0A
|
e6aaff3cfbf123b0102cf2d54d8a3dc83c5a7afc | fix crashing | server/sys/logger.js | server/sys/logger.js | var fs = require('fs');
var Logger = {
className: 'Logger',
/**
* Syntax:
* [Time]: [Message]
*/
log: function(){
fs.appendFileSync(this.logFile, this.createText(arguments) + "\r\n");
//console.log.apply(console, arr);
},
logArray: function(className, arr){
... | JavaScript | 0.000005 | @@ -993,40 +993,8 @@
()%7B%0A
- console.log('in init');%0A
@@ -1100,24 +1100,25 @@
= file;%0A
+%0A
//%0A %7D
@@ -1109,18 +1109,95 @@
-//
+if(!fs.existsSync(file))%7B%0A fs.writeFileSync(file, %22%5Cr%5Cn%22);%0A %7D
%0A %7D,%0A
@@ -2240,35 +2240,8 @@
%7D;%0A... |
ffaf7049156cb17b3dfccfdbf02835661515619c | fix linting for getDirectories (#7019) | src/utils/sources-tree/tests/getDirectories.spec.js | src/utils/sources-tree/tests/getDirectories.spec.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
import { createSource } from "../../../reducers/sources";
import { getDirectories, createTree } from "../index"... | JavaScript | 0 | @@ -1047,16 +1047,23 @@
oEqual(%5B
+%0A
%22a/b.js%22
@@ -1059,28 +1059,39 @@
%22a/b.js%22,
- %22a%22
+%0A %22a%22%0A
%5D);%0A expe
@@ -1156,16 +1156,23 @@
oEqual(%5B
+%0A
%22a/c.js%22
@@ -1172,20 +1172,31 @@
a/c.js%22,
- %22a%22
+%0A %22a%22%0A
%5D);%0A
@@ -1265,16 +1265,... |
3aa85866d53db0b138136625c427132de06e9664 | Add some ringtones so the app will work | source/pickRingTones.js | source/pickRingTones.js |
var phonyringTones = [
{
"name": "Tones 3 beep",
"scr": "assets/ringtones/tones_3beeps_otasp_done-ondemand.mp3"
},
{
"name": "Error",
"scr": "assets/ringtones/Error.mp3"
},
{
"name": "App closer",
"scr": "assets/ringtones/Appcloser.mp3"
}
];
var ringTones = [];
enyo.kind({
name: "pic... | JavaScript | 0.000001 | @@ -1525,33 +1525,32 @@
der, inEvent) %7B%0A
-%09
%09this.log(%22sende
@@ -1586,20 +1586,16 @@
Event);%0A
-%09%09%0A%09
%09// load
@@ -1636,21 +1636,163 @@
ones %5B%5D%0A
+%09//TODO fix this properly for getting ringtones in /media/internal/ringtones (using Media Indexer?);%0A%09 this.ringTones = phonyringT... |
11eb05700ce14cfa0352fb30f7ba251ae3fb9f0d | Add necessary test plans | test.js | test.js | import test from 'ava'
import { createServer } from 'http'
import axiosist from '.'
test('should request', async t => {
await axiosist((req, res) => res.end()).get('/')
t.pass()
})
test('should request the right method', async t => {
await axiosist((req, res) => {
t.is(req.method, 'POST')
res.end()
... | JavaScript | 0.000008 | @@ -106,32 +106,44 @@
', async t =%3E %7B%0A
+ t.plan(0)%0A
await axiosist
@@ -181,24 +181,10 @@
/')%0A
- t.pass()%0A%7D)%0A
+%7D)
%0A%0Ate
@@ -226,32 +226,44 @@
', async t =%3E %7B%0A
+ t.plan(1)%0A
await axiosist
@@ -383,32 +383,44 @@
', async t =%3E %7B%0A
+ t.plan(1)%0A
await axiosist
@@ -622,32... |
66af25dc15fdb3aa230ca7ffbcab6130a53c8285 | Set body class. | src/article/shared/BodyComponent.js | src/article/shared/BodyComponent.js | import { Component } from 'substance'
export default class BodyComponent extends Component {
render ($$) {
const model = this.props.model
const ModelComponent = this.getComponent(model.type)
const SectionLabel = this.getComponent('section-label')
let el = $$('div')
.addClass('sc-body')
.a... | JavaScript | 0 | @@ -536,16 +536,36 @@
%7D)
+.addClass('sm-body')
%0A )%0A
|
4166055b2b1b92618f83774df0973645c390c653 | Work with the new emits API | test.js | test.js | describe('fuse', function () {
'use strict';
var EventEmitter = require('events').EventEmitter
, assume = require('assume')
, fuse = require('./');
it('exports it self as function', function() {
assume(fuse).to.be.a('function');
});
it('returns the Base', function () {
function Base() {} fu... | JavaScript | 0 | @@ -4251,16 +4251,22 @@
nction (
+next,
arg) %7B%0A
@@ -4317,28 +4317,38 @@
-return
+next(undefined,
'foo'
+)
;%0A
|
3ad20efd614b4560dd2d84084ca281580318e712 | update tests | test.js | test.js | /*!
* koa-hello-world <https://github.com/tunnckoCore/koa-hello-world>
*
* Copyright (c) 2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.
*/
/* jshint asi:true */
'use strict'
var koa = require('koa')
var test = require('assertit')
var request = require('supertest')
var helloWorld = r... | JavaScript | 0.000001 | @@ -351,30 +351,8 @@
oa()
-%0Aapp.use(helloWorld())
%0A%0Ate
@@ -441,16 +441,43 @@
done) %7B%0A
+ app.use(helloWorld())%0A%0A
requ
@@ -546,16 +546,16 @@
World')%0A
-
.e
@@ -568,11 +568,504 @@
e)%0A %7D)%0A
+ test('should yield next middleware', function (done) %7B%0A var ok = false%0A%0A app... |
e23fc22146d74e43c0848223034e4e09efd5d4fc | add test to ensure next middleware | test.js | test.js | /*!
* koa-ip-filter <https://github.com/tunnckoCore/koa-ip-filter>
*
* Copyright (c) 2015 Charlike Mike Reagent, contributors.
* Released under the MIT license.
*/
/* jshint asi:true */
'use strict'
var test = require('assertit')
var ipFilter = require('./index')
var request = require('supertest')
var extend = ... | JavaScript | 0 | @@ -3445,11 +3445,777 @@
%7D)%0A %7D)%0A
+ test('should have %60this.filter%60 and %60this.identifier%60 in next middleware', function (done) %7B%0A var ok = false%0A var app = middleware(%7B%0A filter: %5B'*', '!213.15.*'%5D%0A %7D)%0A%0A app.use(function * (next) %7B%0A test.ok(this.filter, '... |
dcf4adbf893ed1e7eecd66370b9ee2afdbe47352 | Add hasFired alias for Callback.fired. | packages/lib/Callback.js | packages/lib/Callback.js | exports = Class(function() {
this._fired = false;
this._id = 0;
this._pending = null;
this.init = function() { this._run = []; };
this.fired = function() { return this._fired; } ;
// preserve pending callbacks, but clear fired status
this.reset = function() { this._args = []; this._fired = false; };
// clea... | JavaScript | 0 | @@ -130,16 +130,32 @@
%5B%5D; %7D;%0A%09
+this.hasFired =
this.fir
|
feee5cddbc9f2adf702979b5c4507f955029f31b | remove server info | test.js | test.js | 'use strict';
var assert = require('chai').assert;
var Redlock = require('./redlock');
test('node-redis', [require('redis').createClient('6379', '192.168.59.103')]);
test('ioredis', [new (require('ioredis'))('6379', '192.168.59.103')]);
function test(name, clients){
var redlock = new Redlock(clients, {
retryCount... | JavaScript | 0 | @@ -136,32 +136,8 @@
ent(
-'6379', '192.168.59.103'
)%5D);
@@ -183,32 +183,8 @@
'))(
-'6379', '192.168.59.103'
)%5D);
|
d884ee8228fbf106cdfb537f3a943793d77c1f1c | add example of how to subdir all files | test.js | test.js |
var fs = require('fs')
var path = require('path')
var tarballify = require('./lib/tarballify')
console.log("creating new tarball …")
var tarball = tarballify('./lib/tarballify.js', {
dirname:__dirname,
})
.register(".node", function (body, file) {
console.log("BINARY FILE WARNING:", file)
retu... | JavaScript | 0.000001 | @@ -88,16 +88,57 @@
allify')
+%0Avar package = require('./package.json');
%0A%0Aconsol
@@ -487,27 +487,24 @@
inish %E2%80%A6%22)%7D)%0A
-//
.on('app
@@ -521,12 +521,155 @@
tion
+
(f)
-%7B
+ %7B%0A f.path = path.join(package.name + %22-%22 + package.version,%0A path.relative(... |
ce798ee2ea6755112ea296844835b834dbf0528e | set endpoint to test box for PRs | test.js | test.js | var util = require ('util');
var app = require ('./');
// Setup
// set env GEOIP2WS_USERID and GEOIP2WS_LICENSE (Travis CI)
// or user cli arguments: npm test --app_userid=1234 --app_license=abc123
var config = {
userId: process.env.GEOIP2WS_USERID || null,
licenseKey: process.env.GEOIP2WS_LICENSE || null,
serv... | JavaScript | 0.000001 | @@ -502,16 +502,132 @@
5000%0A%7D%0A%0A
+if (!config.userId %7C%7C !config.licenseKey) %7B%0A config.endpoint = 'https://frankl.in/u/ci_test.php?a=geoip2ws&b=';%0A%7D%0A%0A
var geo
|
930f84d6151eb83fd3ecdc9bb0ea3d2bda924da9 | Allow Element mode | test.js | test.js | import parse from './module';
const test = require('tape-catch');
const {safeLoad: yaml} = require('js-yaml');
const ord = require('ord');
const tosource = require('tosource');
const {jsdom} = require('jsdom');
const arrayFrom = require('array-from');
const {DOMParser: XmldomParser} = require('xmldom');
if (typeof re... | JavaScript | 0.000001 | @@ -300,16 +300,181 @@
dom');%0A%0A
+const wrap = (element) =%3E (%0A%60%3Csvg%0A version=%221.1%22%0A xmlns=%22http://www.w3.org/2000/svg%22%0A xmlns:parametric=%22//parametric-svg.js.org/v1%22%0A %3E%0A $%7Belement%7D%0A%3C/svg%3E%0A%60%0A);%0A%0A
if (type
@@ -1465,16 +1465,263 @@
ument';%0A
+ const %5Bd... |
34fcdc86070c7e4e8a5f1d64d8de2394e56df0b3 | Update to test Importer events | test.js | test.js | import test from 'tape'
import assetsToXML from './src'
import { parseString } from 'xml2js'
import Importer from 'node-matrix-importer'
import { context } from 'node-matrix-assets'
const asset = context()
const tree = asset('folder', { name: 'Sites', link: 'type_2', paths: 'sites' },
asset('site', { name: 'My Site'... | JavaScript | 0 | @@ -1959,16 +1959,124 @@
ue%0A %7D)%0A
+%0A xmlImporter.once('create_asset', (asset) =%3E %7B%0A assert.ok(asset, 'xml importer event triggered')%0A %7D)%0A%0A
const
@@ -2138,32 +2138,33 @@
nerateXML(tree)%0A
+%0A
parseString(xm
|
e4c269397d0c0ca7ed876bbb954062a221631356 | use const in test.js | test.js | test.js | 'use strict'
var util = require('util')
var test = require('tape')
var callsites = require('./')
test('return non-empty array', function (t) {
var err = new Error('foo')
var arr = callsites(err)
t.ok(Array.isArray(arr))
t.ok(arr.length > 0)
t.end()
})
test('return array of callsites', function (t) {
var ... | JavaScript | 0.000524 | @@ -7,19 +7,21 @@
trict'%0A%0A
-var
+const
util =
@@ -36,19 +36,21 @@
'util')%0A
-var
+const
test =
@@ -65,19 +65,21 @@
'tape')%0A
-var
+const
callsit
@@ -138,35 +138,37 @@
unction (t) %7B%0A
-var
+const
err = new Error
@@ -169,35 +169,37 @@
Error('foo')%0A
-var
+const
arr = callsites
@@ -311,35 +... |
7c7c00cc040d73b93e3621ee816a2eae1fbe00c1 | add varable c | test.js | test.js | let a = 'hello git!'
let b = 'hello world.' | JavaScript | 0.000025 | @@ -36,8 +36,31 @@
world.'
+%0Alet c = 'hi everyone!'
|
fb9f554960f065d58e45c8ae31d18c0bea71cb44 | add space between array elements | test.js | test.js | 'use strict'
var test = require('tape')
var flatten = require('./')
test('only flatten nested objects', function (t) {
var obj = {
number: 1,
string: 'foo',
bool: true,
arr1: [1,2,3],
arr2: [{ foo: 1 }, { bar: 2 }],
sub: { foo: 1, bar: { baz: 3 } }
}
t.deepEqual(flatten(obj), {
numb... | JavaScript | 0.002595 | @@ -183,34 +183,36 @@
e,%0A arr1: %5B1,
+
2,
+
3%5D,%0A arr2: %5B%7B
@@ -370,18 +370,20 @@
rr1: %5B1,
+
2,
+
3%5D,%0A
|
78de82e2026e674baee5eda1eed9704b78b238cc | Make it a kata. | katas/es6/language/set/delete.js | katas/es6/language/set/delete.js | // ??: Set - delete
// To do: make all tests pass, leave the assert lines unchanged!
describe('`set.delete()` deletes an element from a set', function(){
let set;
beforeEach(() => set = new Set());
describe('when an existing element gets removed', function() {
beforeEach(function() {
set.add('one').a... | JavaScript | 0.000109 | @@ -1,9 +1,9 @@
//
-??
+64
: Se
@@ -405,37 +405,30 @@
turns = set.
-delete('two')
+remove
;%0A asse
@@ -422,33 +422,39 @@
e;%0A assert.
-e
+strictE
qual(returns, tr
@@ -512,33 +512,8 @@
) %7B%0A
- set.delete('two');%0A
@@ -683,32 +683,54 @@
', function() %7B%0A
+ set.add('one');%0A
... |
0840cebd576940eee6ecf823466782c50775bfb7 | Rearrange purchase order table | InvenTree/InvenTree/static/script/inventree/order.js | InvenTree/InvenTree/static/script/inventree/order.js | function removeOrderRowFromOrderWizard(e) {
/* Remove a part selection from an order form. */
e = e || window.event;
var src = e.target || e.srcElement;
var row = $(src).attr('row');
$('#' + row).remove();
}
function newSupplierPartFromOrderWizard(e) {
/* Create a new supplier part directly... | JavaScript | 0.000005 | @@ -2816,24 +2816,25 @@
field: '
-supplier
+reference
',%0A
@@ -2852,22 +2852,28 @@
title: '
-Suppli
+Purchase Ord
er',%0A
@@ -2964,118 +2964,65 @@
urn
-imageHoverIcon(row.supplier__image) + renderLink(row.supplier__name, '/company/' + value + '/purchase-orders/'
+renderLink(value, %22/order/purchase-orde... |
b43ca248ac07a8e346bb6eb854653983e6f45bcd | change output object reference | task.js | task.js | 'use strict';
/* ============================================================ *\
STYLES / SCSS
\* ============================================================ */
// Gulp dependencies
var sourcemaps = require('gulp-sourcemaps');
var gulpif = require('gulp-if');
var rename = require('gulp-rename');
var path ... | JavaScript | 0.00001 | @@ -1382,15 +1382,19 @@
.src
-.styles
+%5BTASK_NAME%5D
+ '
|
fa7ed57e591939ca289f2bed922f9f5d446f6db8 | Use new link for File Upload | Resources/ui/handheld/ios/platform/xhr_fileupload.js | Resources/ui/handheld/ios/platform/xhr_fileupload.js | function xhr_upload(_args) {
var win = Titanium.UI.createWindow({
title:_args.title
});
var ind=Titanium.UI.createProgressBar({
width:200,
height:50,
min:0,
max:1,
value:0,
style:Titanium.UI.iPhone.ProgressBarStyle.PLAIN,
top:10,
message:'Uploading Image',
font:{fontSize:12, fontWeight:'bold'},... | JavaScript | 0 | @@ -958,16 +958,81 @@
State);%0A
+%09%09%09%09Ti.API.info('Additional Information: ' + this.responseText);%0A
%09%09%09%7D;%0A%09%09
@@ -1216,43 +1216,139 @@
s://
-twitpic.com/api/uploadAndPost
+api.imgur.com/3/image');%0A%09%09%09// set the Authorization header%0A%09%09%09xhr.setRequestHeader('Authorization', 'Clie... |
32ae670a5fe2f84281d379b00b5af0081768e5ce | Add panel to software section for metronome | src/home/Software.js | src/home/Software.js | import React from 'react'
import SectionHeader from './SectionHeader'
import ExternalLink from '../external-link'
const Panel = ({ href, label, strap }) => (
<div className="cpf-grid__column-one-third">
<div className="cpf-software__panel">
<h2 className="cpf-header--small">
{href ? <a className="c... | JavaScript | 0 | @@ -1366,32 +1366,198 @@
/%3E%0A %3CPanel%0A
+ label=%22Metronome%22%0A strap=%22An online metronome built with React, Redux and the Web Audio API%22%0A href=%22metronome/index.html%22%0A /%3E%0A %3CPanel%0A
label=%22M
@@ -1577,16 +1577,16 @@
evices%22%0A
-
@@ -1... |
bf54b942d3f52ce63c4ea284301fef3554820c10 | fix failing test | test.js | test.js | const { strictEqual: equal } = require('assert')
const md = require('markdown-it')
const highlightjs = require('./')
equal(
(() => {
try {
return md().use(require('./core'))
} catch (ex) {
return ex.message
}
})(),
'Please pass a highlight.js instance for the required `hljs` option.'
)
e... | JavaScript | 0.99965 | @@ -1668,17 +1668,52 @@
%3C/span%3E
-*
+%3Cspan class=%22hljs-operator%22%3E*%3C/span%3E
%3Cspan c
|
65f67bcd42253ba7deb16a153aaa7fdc7a4d5362 | set loggedIn to true when email and password matches | js/Auth.js | js/Auth.js | /**
* Created by gebi on 2014.09.22.
*/
var Auth = (function(){
var check = function() {
};
var logout = function(){
};
var login = function(email, pass){
// compare email with existing emails
var _userTable = localStorage.keabookUsers ? JSON.parse(localStorage.keabookUsers) : ... | JavaScript | 0.000005 | @@ -854,24 +854,218 @@
welcome');%0A
+%0A // todo: set loggedin to true%0A _userTable%5BcurrentUserIndex%5D.loggedIn = true;%0A%0A localStorage.keabookUsers = JSON.stringify(_userTable, null, ' ');%0A%0A
@@ -1097,16 +1097,17 @@
keabook%0A
+%0A
|
cf1af72f96309cef2d9e5a82fc62c697262269cc | add test for ordered lists, issue #28 | test.js | test.js | /* eslint-env mocha */
'use strict';
var assert = require('assert');
var Md = require('markdown-it');
var markdownItAttrs = require('./');
var utils = require('./utils.js');
describe('markdown-it-attrs.utils', function() {
it('should parse {.class #id key=val}', function () {
var src = '{.red #head key=val}';
... | JavaScript | 0 | @@ -4855,32 +4855,291 @@
pected);%0A %7D);%0A%0A
+ it('should work with ordered lists', function()%7B%0A var src = '1. item%5Cn%7B.blue%7D';%0A var expected = '%3Col class=%22blue%22%3E%5Cn';%0A expected += '%3Cli%3Eitem%3C/li%3E%5Cn';%0A expected += '%3C/ul%3E%5Cn';%0A var res = md.render(src);%0A ... |
6153744f7f7072956cd52f42f2df3ff7c30052d9 | add props for setting initial values | src/components/ContributeDetails.js | src/components/ContributeDetails.js | import React from 'react';
import PropTypes from 'prop-types';
import { compose, withHandlers, withState } from 'recompose';
import moment from 'moment';
import { pick } from 'lodash';
import { FormattedMessage } from 'react-intl';
import Container from './Container';
import { Flex } from '@rebass/grid';
import Styled... | JavaScript | 0 | @@ -712,16 +712,39 @@
requency
+, totalAmount, interval
%7D) =%3E (
@@ -752,24 +752,40 @@
%0A amount:
+ (totalAmount %7C%7C
amountOptio
@@ -789,16 +789,17 @@
tions%5B0%5D
+)
/ 100,%0A
@@ -814,16 +814,31 @@
lAmount:
+ totalAmount %7C%7C
amountO
@@ -877,16 +877,28 @@
quency ?
+ interval %7C%7C
Object.
@... |
86b3bd06d76d8ea3806acaf397cda97bff202127 | Add props for the action trigger | src/components/ControlsComponent.js | src/components/ControlsComponent.js | 'use strict';
import React from 'react';
require('styles//Controls.scss');
class ControlsComponent extends React.Component {
renderStopButton() {
if (this.props.isPlaying) {
return <button id="stop">Stop</button>
}
return <button id="stop" style={{display: 'none'}}>Stop</button>
}
renderP... | JavaScript | 0 | @@ -580,22 +580,26 @@
id=%22
+p
re
-wind%22%3ERewind
+vious%22%3EPrevious
%3C/bu
@@ -702,24 +702,18 @@
id=%22
-forward%22%3EForward
+next%22%3ENext
%3C/bu
@@ -844,16 +844,17 @@
laying :
+
React.P
@@ -877,16 +877,164 @@
Required
+,%0A onPrevious : React.PropTypes.func,%0A onStop : React.PropTypes.func,%0... |
a0bde73bd1672349c0894dbe48eacb96965d786f | make close btn smaller to prevent UI from being broken | js/base.js | js/base.js | $(document).ready(function() {
// hide localstored hidden widgets
keepWidgetHidden();
// enable popovers
$(".pop").popover();
// activate tooltips on hover
$("[data-toggle='tooltip']").tooltip({trigger: 'hover', placement:'right'});
dashboard.getAll();
}).on("click", ".js-smoothscroll", f... | JavaScript | 0 | @@ -2457,16 +2457,30 @@
ss=%22btn
+btn-icon-only
icon-rem
|
b58c36746acc40681e458d69530ee0ddcd55e630 | Create doc for createInputSubmit() | js/blog.js | js/blog.js | // Create a form input element that listens to click events.
function createInputSubmit(action, value) {
let input = document.createElement('input');
input.type = 'submit';
input.formAction = action;
input.value = value;
addEvent(input, 'click', function(e) {
let el = e.currentTarget;
el.form.action =... | JavaScript | 0 | @@ -1,20 +1,24 @@
/
-/
+**%0A *
Create
+s
a
-form
+DOM
inp
@@ -32,37 +32,208 @@
ent
-that listens to click events.
+of type submit, and attaches event listener to%0A * it.%0A * @param %7Bstring%7D action - The action for the post form.%0A * @param %7Bstring%7D value - The value of the button.%0A * @return An ... |
d3fb44ea4321a6de311d06554ec91e8b508c8ddb | test for create_rhythmic_sequences | test.js | test.js | // test.js
// makes sure the code in this repository is functioning correctly
// J. Hassler Thurston
// January 24, 2014
// CURRENT FILES AND FUNCTIONS TESTED:
// fiddletune.js
// -- rhythmic_sequence(rhythm_lengths)
// general testing framework
// takes in a function to test, an ordered list of its inputs, a... | JavaScript | 0.000717 | @@ -2488,16 +2488,311 @@
, %5B%5D));%0A
+%09tests.push(test_function(%22create_rhythmic_sequences%22, create_rhythmic_sequences, %5B%5D, array_equals, %5B%5B%5B0,1%5D%5D,%0A%09%09%5B%5B0,0.5%5D,%5B0.5,1%5D%5D,%5B%5B0,0.5%5D,%5B0.5,0.75%5D,%5B0.75,1%5D%5D,%5B%5B0,0.25%5D,%0A%09%09%5B0.25,0.5%5D,%5B0.5,0.625%5D,%5B0.625... |
f07889cccb9239cb5b7e6a577cefa33c19557950 | Revert unintentinal whitespace removal | js/bots.js | js/bots.js | // Copyright 2017 Google Inc.
//
// 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.000001 | @@ -754,24 +754,26 @@
ript%22,%0A %7D);
+
%0A req.done(
|
94cfb27642d9a7a7401c7d9a332958622d5c4ee3 | Remove unnecessary default arguments from Specimen | src/components/Specimen/Specimen.js | src/components/Specimen/Specimen.js | // Higher-order Specimen which provides theme
import React, {PropTypes} from 'react';
import Span from './Span';
import parseSpecimenOptions from '../../utils/parseSpecimenOptions';
import parseSpecimenBody from '../../utils/parseSpecimenBody';
const identity = (v) => v;
export default function Specimen(mapBodyToPro... | JavaScript | 0.000001 | @@ -244,36 +244,8 @@
';%0A%0A
-const identity = (v) =%3E v;%0A%0A
expo
@@ -291,19 +291,18 @@
rops
- = identity
+: Function
, ma
@@ -320,13 +320,18 @@
rops
- = %5B%5D
+: Function
) %7B%0A
|
f3673b58381795fc62c1670fb5b6c8e0b2e5559e | fix (VTooltip): top (#3775) | src/components/VTooltip/VTooltip.js | src/components/VTooltip/VTooltip.js | import '../../stylus/components/_tooltips.styl'
// Mixins
import Colorable from '../../mixins/colorable'
import Delayable from '../../mixins/delayable'
import Dependent from '../../mixins/dependent'
import Detachable from '../../mixins/detachable'
import Menuable from '../../mixins/menuable'
import Toggleable from '..... | JavaScript | 0 | @@ -1681,17 +1681,17 @@
tor.top
--
++
%0A
@@ -1699,19 +1699,22 @@
(this.
+bot
to
-p
+m
? activ
@@ -1728,25 +1728,23 @@
ight : -
-activator
+content
.height)
@@ -1744,17 +1744,17 @@
height)
--
++
%0A
@@ -1766,14 +1766,18 @@
his.
+bot
to
-p
+m
?
+1
0 :
|
14a2e5b81c575dfa00d976547b7ac245115f9d39 | Update tabula_leaflet_utils.js | tabula_leaflet_utils.js | tabula_leaflet_utils.js |
require('leaflet');
var MapRenderer = function(){
this.circleOptions = {
radius : 4,
color : '#000',
weight : 1,
fillOpacity : 0
}
this.hover_style = {
weight : 1,
opacity : 1,
color : '#FFFF00',
fillColor : '#FFFF00',
fillOpacity : 0.5
}
this.selected_style = {
weight : 1,
opacity : 1,
... | JavaScript | 0 | @@ -1633,32 +1633,66 @@
%0A%09%09%09%09%7D%0A%09%09%09%7D)%0A%09%09%7D
+,%0A%09%09style : _this.unselected_style
%0A%09%7D);%0A%09layer.add
@@ -4584,8 +4584,9 @@
nderer%0A%7D
+%0A
|
6bc6dbc404f6fb20c272ef56d2eb6ee9cb27b852 | Rename test data val | test.js | test.js | var sinon = require('sinon');
var chai = require('chai');
var shelljs = require('shelljs');
var fs = require('fs');
var util = require('util');
var sprintf = util.format;
var should = chai.should();
chai.Assertion.includeStack = true;
chai.use(require('sinon-chai'));
var gitemplate = require('./build/build');
var Git... | JavaScript | 0.002978 | @@ -572,25 +572,20 @@
me = 'my
-component
+proj
';%0A t
@@ -1916,25 +1916,20 @@
%5C%7D%5C%5C%7D/my
-component
+proj
' + this
@@ -3815,17 +3815,12 @@
t/my
-component
+proj
');%0A
|
ecae1627d27fb1f4c5dbc063bbeb81087c12532c | move normalize path | src/internal/mock.js | src/internal/mock.js | import express from "express";
import preferHeader from "parse-prefer-header";
import { normalizePath } from "../util";
import mockMap from "../parser/mock";
export function router(elements) {
const router = express.Router();
elements.forEach(element => {
const actions = mockMap(element);
actions.forEach... | JavaScript | 0.000013 | @@ -76,49 +76,8 @@
r%22;%0A
-import %7B normalizePath %7D from %22../util%22;%0A
impo
@@ -1077,12 +1077,190 @@
formats);%0A%7D%0A
+%0Afunction normalizePath(pathName) %7B%0A if (pathName) %7B%0A const str = pathName.replace(/%7B/g, %22:%22).replace(/%7D/g, %22%22);%0A return str === %22%22 ? %22/%22 : str;%0A... |
50bc4173c4e257afe7a8531a4525d25565c46092 | allow for trim to take null objects | trim.js | trim.js | // Thanks goog! http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/string/string.js?r=2
module.exports = function(str) {
return str.replace(/^[\s\xa0]+|[\s\xa0]+$/g, '')
}
| JavaScript | 0 | @@ -144,16 +144,22 @@
%0A%09return
+ str ?
str.rep
@@ -192,11 +192,16 @@
$/g, '')
+ : ''
%0A%7D%0A
|
67d0d9f9ed968f17aabbd6b1019002cfc289be90 | Remove TODO | test.js | test.js | /* eslint-disable no-console */
// //////////////////////////// //
// WHAT SHOULD BE RAN //
// //////////////////////////// //
// List of all tests to be ran in order
var allTestsToRun = [
// Helpers
require('./src/helpers/executablePath.test.js'),
require('./src/helpers/runCommand.test.js'),
... | JavaScript | 0.000004 | @@ -4277,192 +4277,8 @@
);%0A%0A
-// TODO: Remove this line after you are done splitting up the verifyParams to modules%0Aif (numberOfTestsPassed !== 1134) %7B throw ' You forgot to import a subtest during refactoring'; %7D%0A
%0A%0A//
|
88ef896455d6f492ddcc56562dea52dc3347ea4c | Add model object players. After players array is populated, change color of some individual players. | js/draw.js | js/draw.js | // Create a Paper.js Path to draw a line into it:
var line = new Path();
line.style = {
strokeColor: 'black',
strokeWidth: 4
}
var start = new Point(300, 100);
// Move to start and draw a line from there
line.moveTo(start);
// Note the plus operator on Point objects.
line.lineTo(start + [200, -50]);
// if vie... | JavaScript | 0 | @@ -2456,16 +2456,34 @@
lor;%0A%7D%0A%0A
+var players = %5B%5D;%0A
// Loop
@@ -2738,26 +2738,26 @@
) %7B%0A
-var
player
+s%5Bi%5D
= new P
@@ -3002,16 +3002,20 @@
player
+s%5Bi%5D
.roundRe
@@ -3053,16 +3053,20 @@
player
+s%5Bi%5D
.text.tr
@@ -3092,8 +3092,97 @@
i);%0A%7D;%0A
+%0Aplayers%5B2%5D.roun... |
282c27738e15fcddfaf6b6a7d1499eb95063e131 | Fix create test to throw properly on fail | test.js | test.js | 'use strict'
// setup
import test from 'ava'
import scrud from './index'
import axios from 'axios'
import getScrud from 'get-scrud'
const allowOrigins = ['localhost']
const postBody = {
first: 'andrew',
last: 'carpenter',
zip: 37601,
email: 'andrew@audioinhd.com'
}
const basePath = '/api'
const port = 8092
con... | JavaScript | 0.000001 | @@ -763,14 +763,16 @@
s%0A
-id
+let c
=
-(
awai
@@ -810,17 +810,25 @@
ostBody)
-)
+%0A id = c
.id%0A as
|
a2668e96fc2ed09ee02abe4f74b754934fa86c2b | Update draw.js | js/draw.js | js/draw.js | var drawModule = (function () {
var bodySnake = function(x, y) {
ctx.fillStyle = 'green';
ctx.fillRect(x*snakeSize, y*snakeSize, snakeSize, snakeSize);
ctx.strokeStyle = 'darkgreen';
ctx.strokeRect(x*snakeSize, y*snakeSize, snakeSize, snakeSize);
}
var pizza = function(x, y) {
... | JavaScript | 0.000001 | @@ -1685,16 +1685,85 @@
ore ++;%0A
+ if score == 5 %7B%0A createObstacle(); %0A %7D%0A
|
9704ade925f62eff09af478768d376dadd13bac3 | fix url | js/draw.js | js/draw.js | //Empty to store drawn routes after they are submitted
var submittedRoutes = new L.geoJson(false, {
onEachFeature: function (feature, layer) {
layer.bindPopup('<b>'+feature.properties.name +', '+ feature.properties.password +'</b><br>' +feature... | JavaScript | 0.86565 | @@ -7070,16 +7070,20 @@
aws.com/
+api/
submissi
|
cca33a3bed8b4b40b495ef4d9259f23a267444ff | Version 1.2.5, allowed brackets as a URI character | js/edit.js | js/edit.js | $(function() {
var editing = false;
$(document).on('dblclick', '.editable', function(event) {
event.preventDefault();
if (!editing) {
editing = true;
var text = $(this).text();
var elementType = $(this).prev().prop('nodeName');
var element = $(this);
$(this).before('<input type="text" class="fo... | JavaScript | 0 | @@ -905,16 +905,56 @@
lash-');
+%0A%09%09valueToSend = encodeURI(valueToSend);
%0A%0A%09%09$.ge
|
39fc0add79dea1a2ca8418cf17599e265e575f33 | fix tests | test.js | test.js | import fs from 'fs';
import test from 'ava';
import bufferEquals from 'buffer-equals';
import intoStream from 'into-stream';
import m from './';
test('get stream as a string', async t => {
t.is(await m(fs.createReadStream('fixture')), 'unicorn\n');
t.is(await m(fs.createReadStream('fixture'), {encoding: 'hex'}), '75... | JavaScript | 0.000001 | @@ -586,24 +586,54 @@
', 'utf8');%0A
+%09fixture.setEncoding('utf8');%0A
%09t.is(typeof
|
41bd5bdd133e5b6d74b76b454d1a5681ffb90201 | Fix ReferenceError in saveAs polyfill | js/file.js | js/file.js | var save = (function() {
"use strict";
// saveAs from https://gist.github.com/MrSwitch/3552985
var saveAs = window.saveAs || (window.navigator.msSaveBlob ? function (b, n) {
return window.navigator.msSaveBlob(b, n);
} : false) || window.webkitSaveAs || window.mozSaveAs || window.msSaveAs || (function (... | JavaScript | 0.000001 | @@ -934,151 +934,47 @@
-event.screenX, event.screenY, event.clientX, event.clientY,%0A event.ctrlKey, event.altKey, event.shiftKey, event.metaKey,%0A
+0, 0, 0, 0, false, false, false, false,
0,
|
54af6f0d8eb613099e9f3b591e0ffdb44c114945 | add replace regex | usen.js | usen.js | 'use strict'
const client = require('cheerio-httpcli');
const request = require('request');
const settings = require('./settings');
const post = require('./post');
const itunes = require('./itunes');
const Usen = function() {
this.param = {
npband: 'A',
npch : '44',
nppage: 'yes',
_ : ... | JavaScript | 0.000156 | @@ -731,16 +731,18 @@
%EF%BC%9F%EF%BC%84%EF%BC%8B%EF%BC%8A%EF%BC%85%EF%BC%86%EF%BC%8C%EF%BC%8E
+%EF%BC%88%EF%BC%89
%5D/g, (s)
|
3f9f85c67f4480d5a99b8201c96cde731cc129e4 | Add tests for `replacer` option (#22) | test.js | test.js | import path from 'path';
import fs from 'fs';
import test from 'ava';
import tempfile from 'tempfile';
import m from '.';
test('async', async t => {
const tmp = path.join(tempfile(), 'foo');
await m(tmp, {foo: true}, {indent: 2});
t.is(fs.readFileSync(tmp, 'utf8'), '{\n "foo": true\n}\n');
});
test('sync', t => {... | JavaScript | 0 | @@ -1843,28 +1843,454 @@
e,%5Cn%5Ct%22a%22: true%5Cn%7D%5Cn');%0A%7D);%0A
+%0Atest('async - %60replacer%60 option', async t =%3E %7B%0A%09const tmp = path.join(tempfile(), 'foo');%0A%09await m(tmp, %7Bfoo: true, bar: true%7D, %7Breplacer: %5B'foo'%5D%7D);%0A%09t.is(fs.readFileSync(tmp, 'utf8'), '%7B%5Cn%5Ct%22foo%22: ... |
7181b97dbbbff835a4dce077743851d78db6fa40 | move window to global | test.js | test.js | var spyLifeCycle = require('./')
var test = require('tape')
var React = require('react')
var ReactDOM = require('react-dom')
function withDom () {
if (!global.document) {
try {
var jsdom = require('jsdom').jsdom
var exposedProperties = ['window', 'navigator', 'document']
global.document = jsd... | JavaScript | 0.000002 | @@ -1008,16 +1008,23 @@
ainer =
+global.
window.d
|
73ff438b4c00db851c39fb9b04513531a1227fc6 | Create static Plug objects on-demand (User) | user.js | user.js | /**
* Martian - Core JavaScript API for MindTouch
*
* Copyright (c) 2015 MindTouch Inc.
* www.mindtouch.com oss@mindtouch.com
*
* 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
*
* ... | JavaScript | 0 | @@ -856,12 +856,106 @@
l';%0A
-let
+export default class User %7B%0A static _getPlug() %7B%0A if(!this.userPlug) %7B%0A this.
user
@@ -1005,35 +1005,53 @@
');%0A
-export default class User %7B
+ %7D%0A return this.userPlug;%0A %7D
%0A
|
d87bb6fab5c97f163f17ca4e388aec2f17a41680 | Fix pb liens images quand langue spécifiée en paramètre | js/home.js | js/home.js | $(document).ready(function() {
$('a:has(b)').css('text-decoration','none');
$('[data-toggle="tooltip"]').tooltip();
// Init map
$('map').imageMapResize();
$('#carte').maphilight();
var carte = $('#carte').attr('src');
carte = window.location.href+carte.replace('victoires','animation').... | JavaScript | 0.000387 | @@ -273,16 +273,38 @@
ion.href
+.replace(/%5C?l=.*/, '')
+carte.r
|
8c9c8d7adcf9083b794f2237012f7cb5d8a75521 | Add test | test.js | test.js | const test = require('tape-catch');
test.skip('Returns an object of the right shape', (is) => {
is.equal(
'with the `type` property of the right value'
);
is.equal(
'with the `version` property of the right value'
);
is.end();
});
test.skip('Enforces types', (is) => {
is.equal(
'fails with a... | JavaScript | 0.000005 | @@ -1,8 +1,37 @@
+import ast from './module';%0A%0A
const te
@@ -63,21 +63,16 @@
);%0A%0Atest
-.skip
('Return
@@ -118,32 +118,74 @@
%3E %7B%0A is.equal(%0A
+ ast(%5B%5D).type,%0A 'ParametricSvgAst',%0A
'with the %60t
@@ -232,24 +232,52 @@
is.equal(%0A
+ ast(%5B%5D).version,%0A 1,%0A
'with ... |
c3e487e45416e991e04a8602cbacf581f9be128e | Update init.js | js/init.js | js/init.js | $(function(){
"use strict";
// Preloader
$( window ).load(function() {
$("#loading-img").fadeOut();
$("#preloader").delay(400).fadeOut("slow");
});
$(document).ready(function(){
// Create launch date for ticker
// Date below denotes 10 January, 2015
$(function () {
var laun... | JavaScript | 0.000001 | @@ -267,17 +267,18 @@
es 1
-0 January
+st October
, 20
|
b2bbdf8cbfca0649f538bf3e0c34445e5476e4bb | Add `hidden` attribute to DOM properties. | src/dom/DefaultDOMPropertyConfig.js | src/dom/DefaultDOMPropertyConfig.js | /**
* Copyright 2013 Facebook, Inc.
*
* 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 ... | JavaScript | 0 | @@ -1760,24 +1760,76 @@
_ATTRIBUTE,%0A
+ hidden: MUST_USE_ATTRIBUTE %7C HAS_BOOLEAN_VALUE,%0A
href: nu
|
58f672f9472e2ef6487fbad8ec329d546ab93407 | Fix bug in detection of respec generator | util.js | util.js | var jsdom = require('jsdom');
/**
* Load the given specification.
*
* @function
* @public
* @param {String} url The URL of the specification to load
* @return {Promise} The promise to get a window object once the spec has
* been loaded with jsdom.
*/
function loadSpecification(url) {
return new Promise(f... | JavaScript | 0 | @@ -1827,21 +1827,32 @@
lve(
+%7B
doc,
+generator:
'respec'
);%0A
@@ -1847,16 +1847,17 @@
'respec'
+%7D
);%0A
|
1d802d18975532ab0bcfe4d5fb78e5addaba9b00 | change to intrepid | src/layouts/index.js | src/layouts/index.js | import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import './index.css'
const ListLink = props =>
<li style={{ display: `inline-block`,marginRight: `1rem` }}>
<Link style={{ color: `white` , fontSize: `1.5rem`}} to={props.to}>
{props.chi... | JavaScript | 0.999993 | @@ -801,38 +801,94 @@
http
+s
://
-manntravel.com.au/resources
+www.intrepidgroup.travel/sites/intrepidgroup.travel/themes/bootstrap_intrepidgroup
/ima
@@ -895,16 +895,18 @@
ges/logo
+_0
.png' /%3E
@@ -1235,12 +1235,22 @@
le=%22
-Mann
+Intrepid Group
Tra
|
f77aeee536a4c657297e1daaff90bc3a508a677b | Fix meta tags in layout, closes #142 | src/layouts/index.js | src/layouts/index.js | import React from 'react'
import Helmet from 'react-helmet'
import data from 'data.json'
import { ThemeProvider, colors } from '@hackclub/design-system'
const { name, title, description, img, url } = data
export default props => (
<ThemeProvider>
<Helmet
defaultTitle={title}
title={title}
meta... | JavaScript | 0 | @@ -200,16 +200,92 @@
= data%0A%0A
+const meta = tags =%3E tags.map(props =%3E React.createElement('meta', props))%0A%0A
export d
@@ -331,22 +331,16 @@
%3CHelmet
-%0A
default
@@ -356,41 +356,355 @@
tle%7D
-%0A title=%7Btitle%7D%0A meta=%7B
+ title=%7Btitle%7D%3E%0A %3Chtml lang=%22en%22 /%3E%... |
5c15958817e3ad4c83faaf0b357cd8daf2cf13c5 | Add test on got methods | test.js | test.js | /* global it */
'use strict';
var assert = require('assert');
var got = require('./');
it('should have promisified methods', function () {
assert.ok(typeof got.promise === 'function');
assert.ok(typeof got.get.promise === 'function');
assert.ok(typeof got.post.promise === 'function');
assert.ok(typeof got.put.pr... | JavaScript | 0 | @@ -504,35 +504,161 @@
);%0A%0Ait('
-promisified methods
+got should work', function (done) %7B%0A%09got.promise('google.com').then(function (res) %7B%0A%09%09assert.ok(res.body);%0A%09%09done();%0A%09%7D, done);%0A%7D);%0A%0Ait('got.get
should
@@ -679,32 +679,36 @@
n (done) %7B%0A%09got.
+get.
promise('google.
|
6a8201e48a55b492872e3e43b0cfbe6bdd9a4c57 | fix the error throwing wrong because members isn't split | src/lib/usage/Tag.js | src/lib/usage/Tag.js | const Possible = require('./Possible');
/**
* Represents a usage Tag
*/
class Tag {
/**
* @param {string} members The tag contents to parse
* @param {number} count The position of the tag in the usage string
* @param {boolean} required The type of tag (required or optional)
*/
constructor(members, count, ... | JavaScript | 0.000016 | @@ -847,22 +847,25 @@
= %5B%5D;%0A%09%09
-return
+members =
members
@@ -875,16 +875,34 @@
lit('%7C')
+;%0A%09%09return members
.map((me
@@ -1476,34 +1476,49 @@
if (
-possible.type === 'string'
+%5B'str', 'string'%5D.includes(possible.type)
&&
|
506d93be22e96f76a3da2fd90e41f7df4329a477 | use co.wrap for tests | test.js | test.js | const co = require('co')
const expect = require('chai').expect
const validate = require('.')
const Joi = validate.Joi
const next = () => Promise.resolve(true)
describe('koa-joi-schema', () => {
it('should validate input matching the schema', () => {
const ctx = {
body: {
name: 'Test'
}
... | JavaScript | 0.000004 | @@ -562,21 +562,36 @@
input',
-() =%3E
+co.wrap(function *()
%7B%0A c
@@ -791,119 +791,39 @@
-return co(function *() %7B%0A yield validator(ctx, next)%0A expect(ctx.joiError).to.be.undefined%0A %7D)%0A %7D
+yield validator(ctx, next)%0A %7D)
)%0A%0A
@@ -867,37 +867,52 @@
ng the schema',
... |
583ca1d0107f7656beed3545143f027c0f2170b8 | add sync/async tests | test.js | test.js | /*!
* helper-resolve <https://github.com/jonschlinkert/helper-resolve>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var path = require('path');
var handlebars = require('handlebars');
var Template = require('template');
var template = new Template();
var resolve = re... | JavaScript | 0.000001 | @@ -166,19 +166,32 @@
';%0A%0A
-var path =
+/* deps:mocha jquery */%0A
requ
@@ -199,12 +199,14 @@
re('
-path
+should
');%0A
@@ -289,235 +289,256 @@
var
-template = new Template();%0Avar resolve = require('./');%0Arequire('should');%0A%0Avar expected = 'node_modules/jquery/index.js';%0A%0Adescribe('resolve helper... |
aad7503664558389f4730618cd73fcb13f69bcf4 | Extract email decoding into a new function | js/main.js | js/main.js | "use strict";
$(document).ready(function () {
// Smooth scroll
// See https://github.com/kswedberg/jquery-smooth-scroll
$("a").smoothScroll();
// Email link decoding
if ($(".email").length) {
// variables, which will be replaced
var at = / AT /,
dot = / DOT /g;
// function, which replace... | JavaScript | 1 | @@ -12,144 +12,33 @@
%22;%0A%0A
-$(document).ready(function () %7B%0A%0A // Smooth scroll%0A // See https://github.com/kswedberg/jquery-smooth-scroll%0A $(%22a%22).smoothScroll();%0A
+function decodeEmail () %7B
%0A /
@@ -436,13 +436,168 @@
%22);%0A %7D%0A
+%7D%0A%0A$(document).ready(function () %7B%0A // Smoo... |
202f2a748239704b264e51ab4d683c7fbc1510b2 | Remove debug line | app/framework-qui-tue/cycle-domain-context-driver.js | app/framework-qui-tue/cycle-domain-context-driver.js | import {Rx} from '@cycle/core';
function makeDomainContextDriver (domainDefinition, eventStore) {
// TODO Create an internal subscriber to prevent binding multiple times
console.debug('making domain driver for context', domainDefinition.name);
const replayedAndLiveEvent$ = eventStore.replayedEvents.concat(eventS... | JavaScript | 0.000039 | @@ -1228,52 +1228,8 @@
%7D))
-%0A .tap(x =%3E console.debug('states', x))
;%0A
|
d8aaa0b9ff70800364f047a2948577fb59898735 | Fix import | app/ui/components/dropdowns/environments-dropdown.js | app/ui/components/dropdowns/environments-dropdown.js | import React, {PureComponent, PropTypes} from 'react';
import autobind from 'autobind-decorator';
import classnames from 'classnames';
import EnvironmentsModal from '../modals/workspace-environments-edit-modal';
import {Dropdown, DropdownDivider, DropdownButton, DropdownItem, DropdownHint} from '../base/dropdown';
impo... | JavaScript | 0.000002 | @@ -8,16 +8,27 @@
React, %7B
+PropTypes,
PureComp
@@ -36,19 +36,8 @@
nent
-, PropTypes
%7D fr
@@ -95,45 +95,8 @@
r';%0A
-import classnames from 'classnames';%0A
impo
@@ -194,23 +194,22 @@
Dropdown
-Divider
+Button
, Dropdo
@@ -202,38 +202,39 @@
Button, Dropdown
-Button
+Divider
, DropdownItem,
@@ -227,20 +2... |
1af86ff832ee29f26d04e24ab39e4ae2d30261c1 | add random start positions to squids | js/main.js | js/main.js | var randomIntFromInterval = function (min,max) {
return Math.floor(Math.random() * (max-min + 1) + min);
};
$(document).ready(function() {
var i = 15;
do {
var squidLeftStart = randomIntFromInterval(0, 100);
var squidTopStart = i * 10;
var squidLeftEnd = 100 / i;
var squidTopEnd = 100 / i;
var sq... | JavaScript | 0 | @@ -238,14 +238,37 @@
t =
-i *
+randomIntFromInterval(0,
10
+0)
;%0A%0A%09
|
0fcd1463c255f1cfc71518b3c52f5e5cfd827fa0 | Add medication div on form submit | js/main.js | js/main.js | /*
* ADR Reporting
* Copyright (C) 2017 Divay Prakash
* GNU Affero General Public License 3.0 (https://github.com/divayprakash/adr/blob/master/LICENSE)
*/
$(document).ready(function(){
$('.button-collapse').sideNav();
var helpOpen = false;
$('#help-fab').click(function(e) {
if (helpOpen) {
$('#help-tap-... | JavaScript | 0 | @@ -2306,10 +2306,456 @@
lose');%0A
+ var divToAdd = %22%3Cdiv class='card blue lighten-4'%3E%3Cdiv class='card-content'%3E%3Cspan class='card-title'%3E%22+ name +%22%3C/span%3E%3Cp%3E%22+ manufacturer + %22 / %22 + expiry + %22%3C/p%3E%3C/div%3E%3Cdiv class='card-action'%3E%3Cbutton class='waves-effect waves-light b... |
6acc230ac592520a743b37407513bac88cb5f5e1 | disable touchpad scrolling if iframed | js/main.js | js/main.js | 'use strict';
(function ($) {
var MAP // global reference to the Leaflet map object
function resizeMapWindow () {
var aboutBoxHeight = $('#about').outerHeight()
$('#map').css('top', Math.floor(aboutBoxHeight))
}
function inIframe () {
try {
return window.self !== window.top
} catch (e) ... | JavaScript | 0.000002 | @@ -3872,24 +3872,101 @@
ativeMap()%0A%0A
+ if (inIframe()) %7B%0A MAP.scrollWheelZoom.disable()%0A %7D%0A%0A
poin
|
345620fbb9be201663e87175da46b36d8c025354 | Update main.js | js/main.js | js/main.js | var map;
function initialize() {
var mapOptions = {
zoom: 9,
center: new google.maps.LatLng(34.708, -77.959)
};
google.maps.visualRefresh=true;
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
// Load a GeoJSON from the same server as our demo.
var jsonData = "dat... | JavaScript | 0.000001 | @@ -439,42 +439,15 @@
nt:
-event.feature.getProperty('Name');
+content
%0A %7D
@@ -551,16 +551,60 @@
) %7B%0A
+content = event.feature.getProperty('Name');
%0A %7D);%0A%0A
|
8655ff92fd7370eaa7d5fca85991688292cd1167 | fix JSLint errors post-sugar | js/main.js | js/main.js |
define(function(require) {
'use strict';
var Forms = window.BlinkForms || {};
Forms._models = {
Form: require('models/form'),
Page: require('models/page'),
Element: require('models/element'),
DateElement: require('models/elements/date'),
HiddenElement: require('models/elements/hidden'),
... | JavaScript | 0.00007 | @@ -43,16 +43,45 @@
;%0A var
+$ = require('jquery'),%0A
Forms =
@@ -1043,15 +1043,8 @@
s%0A
-return
wind
@@ -1066,14 +1066,30 @@
Forms;%0A
+ return Forms;%0A
%7D);%0A%0A%0A
|
980012464ffb8bc079760deace1051f6b0622330 | Append meme url | js/main.js | js/main.js | function postComment() {
// Firebase
var ref = new Firebase("https://tauduluan.firebaseio.com"),
comments = ref.child("comments");
// Get input value
var nama = $('#nama').val(),
komentar = $('#komentar').val(),
input = $('.input').val();
// Time
var date = new Date(),
right_now = date... | JavaScript | 0.000001 | @@ -1545,28 +1545,40 @@
ndow.location.href =
+ '/memes/' +
url;%0A%7D%0A
|
c050778ab8b37fb548b218e3b572930c63c2cd34 | Update main.js | js/main.js | js/main.js | $(document).ready(function(event){
$('#submit').click(function(event){
getData();
});
$('#formThing').submit(function(event){
event.preventDefault();
getData();
});
});
function getData(){
$.get('https://beam.pro/api/v1/channels/' + $('#inputText').val(), "", function(data){
... | JavaScript | 0.000001 | @@ -2781,18 +2781,16 @@
log(
-Username+%22
+%22Someone
Pre
@@ -2805,16 +2805,41 @@
Button
+%5CnFollowers:%22+Followers+%22
%5CnLive:%22
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.