Skip to content

Instantly share code, notes, and snippets.

View laphilosophia's full-sized avatar
🖖
live long and prosper

Erdem Arslan laphilosophia

🖖
live long and prosper
View GitHub Profile
var gulp = require('gulp');
var browserify = require('browserify');
var notify = require('gulp-notify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var plumber = require('gulp-plumber');
var less = require('gulp-less');
var csso = require('gulp-csso');
var watch = require('gulp-watch');
var envify = require('envify');
@CrocoDillon
CrocoDillon / cookies.js
Last active February 11, 2024 22:42
Export your awesome module using AMD, CommonJS, Node.js or just as global.
/*
* Inspiration (well… copy pasting more or less) from:
* https://github.com/ScottHamper/Cookies/blob/0.3.1/src/cookies.js#L127-L140
*
* Thanks Scott!
*/
(function (global) {
'use strict';
var MyModule = function () {
@pbojinov
pbojinov / README.md
Last active December 8, 2023 21:09
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

/*!
* jQuery JavaScript Library v2.1.1pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license