Skip to content

Instantly share code, notes, and snippets.

Created Jan 28, 2013
What would you like to do?
Detecting PhoneGap/Ripple emulator via JavaScript
myFunction( param ) {
var emulated = window.tinyHippos != undefined;
if ( emulated ){
//do something specific to emulated environment;
///do something else...
Copy link

jerone commented Jan 28, 2013

I used this for older versions:

// check if we are in Ripple Emulator;
var emulated = !!document.getElementById("tinyhippos-injected") && !!;

Copy link

sgrebnov commented Jun 25, 2014

I think the following code could be used as well

var emulated = window.parent && window.parent.ripple;

Copy link

slorber commented Oct 23, 2014

thanks it works fine :) sgrebnov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment