The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
function RemoveAccents(strAccents) { | |
var strAccents = strAccents.split(''); | |
var strAccentsOut = new Array(); | |
var strAccentsLen = strAccents.length; | |
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; | |
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz"; | |
for (var y = 0; y < strAccentsLen; y++) { | |
if (accents.indexOf(strAccents[y]) != -1) { | |
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); | |
} else |
//App build.gradle | |
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' | |
android { | |
compileSdkVersion 27 |
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
<?php | |
//https://github.com/laravel/framework/issues/2093#issuecomment-39154456 | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
use Illuminate\Database\Eloquent\Relations\Pivot; | |
class User extends Eloquent { | |
public function groups() { | |
return $this->belongsToMany('Group'); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
(http://www.wtfpl.net/about/) | |
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es) | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
API_URL=https://api.example.com | |
CLIENT_ID= | |
CLIENT_SECRET= | |
FIREBASE_SECRET= |
API_URL=https://api.example.com | |
CLIENT_ID=122554888 | |
CLIENT_SECRET=XXXXXXX | |
FIREBASE_SECRET=XXXXXX |
// config/envparser.js | |
const DotEnv = require('dotenv') | |
const parsedEnv = DotEnv.config().parsed | |
module.exports = function () { | |
// Let's stringify our variables | |
for (key in parsedEnv) { | |
if (typeof parsedEnv[key] === 'string') { | |
parsedEnv[key] = JSON.stringify(parsedEnv[key]) | |
} |
const DotEnv = require('dotenv') | |
const parsedEnv = DotEnv.config().parsed | |
module.exports = function () { | |
// Let's stringify our variables | |
for (key in parsedEnv) { | |
if (typeof parsedEnv[key] === 'string') { | |
parsedEnv[key] = JSON.stringify(parsedEnv[key]) | |
} | |
} |