You could check if the current URL contains http
protocol.
var app = document.URL.indexOf( 'http://' ) === -1 && document.URL.indexOf( 'https://' ) === -1;
if ( app ) {
// PhoneGap application
} else {
// Web page
}
More Related Contents:
- What is the best way to detect a mobile device?
- jQuery Mobile: document ready vs. page events
- jQuery Mobile: Markup Enhancement of dynamically added content
- Why I have to put all the script to index.html in jquery mobile
- Detect viewport orientation, if orientation is Portrait display alert message advising user of instructions
- onClick not working on mobile (touch)
- JQuery document.ready vs Phonegap deviceready
- How to handle floats and decimal separators with html5 input type number
- jQuery: keyup event for mobile device
- :touch CSS pseudo-class or something similar?
- How to check browser for touchstart support using JS/jQuery?
- Use jQuery to detect whether a device can make telephone calls (supports “tel://” protocol)
- jQuery Mobile : What is the order of page events triggering?
- Choosing Mobile Web HTML5 Framework [closed]
- ask for geolocation permission again if it was denied
- How to detect a mobile device using jQuery
- iphone/ipad triggering unexpected resize events
- html5 drag and drop FOR MOBILE [duplicate]
- Not able to launch a pdf file in inappbrowser in android
- Is there any way to check reachability test of server in jQuery
- Fade animation while scrolling
- Attach an event in a child iframe to a handler in the parent window
- jQuery .append() not appending to textarea after text edited
- How to reenable event.preventDefault?
- How to chain ajax requests?
- Use Django template tags in jQuery/Javascript?
- minimise the code since I am using the same code only the content in p tags changes and component AccordionHeader header changes
- Rotate div text after clicking on button using jquery and css
- let user scrolling stop jquery animation of scrolltop?
- Hot to get incomplete datetime-local input values