Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Application Error:
- net::ERR_UNKNOWN_URL_SCHEME(twitter://user?screen_name=xerxesnoble)
- //If Android
- var ua = navigator.userAgent.toLowerCase();
- var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
- if (isAndroid) {
- alert('Android!');
- twitterCheck = function() {
- alert('Android!');
- var now = new Date().valueOf();
- setTimeout(function () {
- if (new Date().valueOf() - now > 100) return;
- window.open('https://play.google.com/store/apps/details?id=com.twitter.android', '_system', 'location=no');
- }, 50);
- window.open('twitter://user?screen_name=XerxesNoble', '_system', 'location=no');
- };
- };
- $('.twiterNav').click(function() {
- window.open('twitter://user?screen_name=xerxesnoble', '_system', 'location=no');
- });
- //Twitter checker
- // If Mac//
- var twitterCheck = function(){
- appAvailability.check('twitter://', function(availability) {
- // availability is either true or false
- if(availability) { window.open('twitter://user?screen_name=xerxesnoble', '_system', 'location=no');}
- else{window.open('https://itunes.apple.com/ca/app/twitter/id333903271?mt=8', '_system', 'location=no'); };
- });
- };
- //If Android
- var ua = navigator.userAgent.toLowerCase();
- var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
- if(isAndroid) {
- twitterCheck = function(){
- appAvailability.check('com.twitter.android', function(availability) {
- // availability is either true or false
- if(availability) {window.open('twitter://user?screen_name=xerxesnoble', '_system', 'location=no');}
- else{window.open('https://play.google.com/store/apps/details?id=com.twitter.android', '_system', 'location=no');};
- });
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement