Skip to content

Instantly share code, notes, and snippets.

💭
ArangoDB is kinda cool

Paceaux paceaux

💭
ArangoDB is kinda cool
Block or report user

Report or block paceaux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paceaux
paceaux / speaker.js
Last active Aug 29, 2015
Speech Synthesis JS API
View speaker.js
speech = function (msg, options, onend) {
this.text = msg;
this._defaults = {
voiceURI: 'native',
volume: 3,
rate: 2,
pitch: 1.5,
lang: 'en-US'
};
this.defaults = options !== undefined ? options : this._defaults;
@paceaux
paceaux / mm.js
Created Jan 30, 2014
Media manager Module
View mm.js
var mediaManager = {};
mediaManager: {
init: function () {
var _this = this;
//MMPLAYERREADY is the event that fires when the media manager event loads
_this.functions.setMetadata($('.js-active'));
_this.bindUIEvents();
$(document).bind("MMPLAYERREADY", function (e){
_this.functions.adjustDimensions();
_this.functions.modifyProjekktor();
@paceaux
paceaux / needy.js
Last active Aug 29, 2015
Page Visibility + speech
View needy.js
var tabAway;
tabAway = {
init: function () {
var _this = tabAway;
_this.bindEvents();
},
data: {
tabAwayMsg: "Don't go, I need you!",
tabBackMsg: "I knew you'd never leave me",
},
@paceaux
paceaux / mm.client.css
Created Jun 16, 2014
Media Manager Layout Tweak
View mm.client.css
/*this assumes the parent container of the video is one with the id of video__player*/
/* Media Manager tweak*/
#video__player [id*="sdlmm_"] {
width: 100% !important;
height: 310px !important;
}
#video__player .pptooltip,
#video__player .ppbackslide,
#video__player .projekktor[style*="fixed"] .pptooltip[class],
#video__player .projekktor[style*="fixed"] .ppbackslide[class]{
@paceaux
paceaux / Golden
Created Jul 14, 2014
Golden Ratio Stylus Mixin
View Golden
//======Golden Ratio Mixin
golden()
if @width
height: @width * .618
else
if @height
width: @height * .618
@paceaux
paceaux / vars
Created Nov 24, 2014
Stylus Variables bootstrap
View vars
$fontBody : "Roboto Condensed";
$fontHeaders : "din-condensed-web", sans-serif;
$fontCallout: "proxima-nova", sans-serif;
$colorNeutralWhitest : #ffffff;
$colorNeutralLightest : #ebebeb;
$colorNeutralDarkest : #646464;
$colorCoolDesat1: #323f50;
$colorCoolDesat2: #b8d098;
@paceaux
paceaux / BEMStylusGrid
Last active Aug 29, 2015
BEM + Grid + Stylus
View BEMStylusGrid
colWidth = 5em
numCols = 12
thirdCol = ((numCols / 3) * colWidth)
fourthCol = ((numCols / 4) * colWidth)
eightCol = fourthCol /2
halfCol = ((numCols / 2) * colWidth)
[class*="--col"]
height: 100%;
@paceaux
paceaux / form
Last active Aug 29, 2015
This makes a safe Form Object with information about all of the forms in a web page. Protects the JS from the Data
View form
//wrap it all in an anonymous function
//This keeps our code safe from other JavaScript,and we don't polute the global namespace
(function() {
//create the encapsulating variable
var taForm;
//add a namespacing function so that we can inject modules to it
taForm = {
namespace: function(ns_string) {
var parts = ns_string.split('.'),
View pubUp.js
String.prototype.replaceAt = function () {
var rlen = arguments[2] == null ? 1 : arguments[2];
return this.substring(0, arguments[0]) + arguments[1] + this.substring(arguments[0] + rlen);
};
var currentItem = SDL.Client.UI.ApplicationHost.ViewModels.Navigation.currentNavigationItem();
var navHappy = {
init: function () {
this.newSrc = this.getNewSrc();
},
getCurrentItem: function () {
@paceaux
paceaux / frameMediator.js
Created Dec 31, 2014
A mediator between you, the console, Anguilla, and Tridion
View frameMediator.js
var AnguillaMediator = function() {
this._getAnguillaFrame = function() {
if (navHappy.isNavigating) {
return window.top.frames[1];
} else {
return window.top;
}
};
this.aFrame = this._getAnguillaFrame();
You can’t perform that action at this time.