Skip to content

Instantly share code, notes, and snippets.

View tiagopotencia's full-sized avatar

Tiago Brandão tiagopotencia

View GitHub Profile
@tiagopotencia
tiagopotencia / detect android or ios
Created March 27, 2017 16:54
Detects if is Android or IOS. This code is very useful and i don't want to go Stackoverflow every time i need it LOL.
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
return "Android";
}
// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "iOS";
package main
import (
"fmt"
)
type x struct {
id *int
}
import java.util.List;
import java.util.regex.Pattern;
import javafx.application.*;
import javafx.collections.FXCollections;
import javafx.event.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.effect.*;
import javafx.scene.image.*;
import javafx.scene.web.HTMLEditor;
import java.util.List;
import java.util.regex.Pattern;
import javafx.application.*;
import javafx.collections.FXCollections;
import javafx.event.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.effect.*;
import javafx.scene.image.*;
import javafx.scene.web.HTMLEditor;