This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * responseListenerData - callback passed to de xhrHttp request, | |
| * selects the DOM element, which will be used to append the response text | |
| * | |
| * @return {void} void | |
| */ | |
| function responseListenerData () { | |
| // queries the parent node | |
| const parentNode = document.querySelector( '.container' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"/> | |
| <meta name="viewport" content="width=device-width initial-scale=1"/> | |
| <title>infiniteScroll</title> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <header class="container__header"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * whichUserAgent - Extracts a string for a later reference from the window.userAgent | |
| * | |
| * @param {Object} navigatorObject - browser navigator Object | |
| * @return {String} - navigator.userAgent from user visitor's | |
| */ | |
| function whichUserAgent( navigatorObject ) { | |
| const userAgent = navigatorObject.userAgent.split( ' ' ); | |
| const userAgentString = [ 'Firefox', 'AppleWebKit', 'Trident' ]; | |
| let actualUserAgent = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { whichUserAgent, isFirefoxAgent, isWebKitAgent, isOldInternetExplorer } from './modules/userAgent'; | |
| import { doHttpRequest } from './modules/httpRequest'; | |
| document.addEventListener( 'DOMContentLoaded', () => { | |
| /** | |
| * checkHeightBody - Calls isFirefoxAgent, isWebKitAgent or isOldInternetExplorer | |
| * dependig on userAgent | |
| * | |
| * @param {Object} navigatorObject navigator Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // build IA | |
| import Human from 'forgotten/species'; | |
| import Utils from 'some/crazy/path'; | |
| @Uitls | |
| @Human | |
| export default IA extends Human { | |
| constructor(type, ram) { | |
| super(name, sex) | |
| this.type = type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Row, Col, Progress } from 'reactstrap'; | |
| import Loading from '../components/subComponents/loading'; | |
| import ReactHtmlParser from 'react-html-parser'; | |
| export default class Success extends Component { | |
| constructor( props ) { | |
| super( props ) | |
| this.state = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import loadGoogleMapsAPI from 'load-google-maps-api'; // Única dependencia extra | |
| // es muy importante añadirle height y width!!! | |
| const MAP_STYLES = { | |
| height: '450px', | |
| width: '100%' | |
| } | |
| const OPTIONS = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Express from 'express'; | |
| import pathUtil from 'path'; | |
| import { DBDisconnect } from '../../utils'; | |
| import { rootPath } from '../../conf'; | |
| const bodyParser = require( 'body-parser' ); | |
| const allRoutes = require( './routes' ); | |
| const notFoundRoute = require( './routes/404' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable import/no-extraneous-dependencies*/ | |
| // Test cases for Mongo Schemas | |
| import { ImdbSchema } from '../../app/server/models/ImdbSchema'; | |
| import sampleData from '../sampleData'; | |
| let movie; | |
| let Imdb; | |
| let connection; | |
| require( '../../app/server/db' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gulp from 'gulp'; | |
| import browserSync from 'browser-sync'; | |
| import nodemon from 'gulp-nodemon'; | |
| const browserOpts = { | |
| proxy: 'http://localhost:3000', | |
| port: 9000, | |
| open: false | |
| }; |