Skip to content

Instantly share code, notes, and snippets.

@josuecorm
josuecorm / studio-page.js
Created October 27, 2018 01:39
Mingo Estudio Estudio Script
function StudioView(){};
StudioView.prototype.init = function(){
console.log('HOME :: INIT');
var _self = this;
_self.scenes = [];
_self.activeScenes = [];
_self.controller = new ScrollMagic.Controller({
globalSceneOptions:{
@josuecorm
josuecorm / progressivemedia-manager.js
Created October 27, 2018 01:36
Progressive Media Manager
function ProgressiveMediaManager(){};
ProgressiveMediaManager.prototype.init = function(){
var _self = this;
if (!('IntersectionObserver' in window)) {
return;
}
this.observerConfig = {
@josuecorm
josuecorm / history-manager.js
Created October 27, 2018 01:32
Script History Manager
function HistoryManager() { }
HistoryManager.prototype.init = function () {
var _self = this;
_self.body = jQuery('body');
_self.mainContainer = jQuery('#main');
// _self.siteUrl = "http://" + top.location.host.toString();
_self.siteUrl = globalObject.home_url;
jQuery(document).on("click", "a[href^='" + _self.siteUrl + "']:not(a[href*='wp-content/uploads']):not(a[href*='feed']):not(a[href*='wp-admin']):not(a[href*='wp-login']):not('.reload')", function (e) {
@josuecorm
josuecorm / SettingsScreeen.jsx
Created October 27, 2018 01:01
Component that update user preferences
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Redirect } from 'react-router-dom';
import axios from 'axios';
import { withStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import List from '@material-ui/core/List';
@josuecorm
josuecorm / UnitPanel.jsx
Created October 27, 2018 00:29
Component for Unit Options
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Redirect } from 'react-router-dom';
import { withStyles } from '@material-ui/core/styles';
import axios from 'axios';
import Drawer from '@material-ui/core/Drawer';
import List from '@material-ui/core/List';
import Divider from '@material-ui/core/Divider';
import ListItem from '@material-ui/core/ListItem';