Blacklist for Userclient avoiding Popup

Discussion in 'General Discussion' started by bezibaerch3n, May 28, 2010.

  1. bezibaerch3n New Member

    I received complaints from members about the popup saying that this forum is native:

    Problem is, that this popup also occurs while surfing with Opera Mini. Additionally, not only once like in the native Android browser but on every page access. It seems like as this is not the case in other tapatalk enabled forums, so the error must be on my side, but i have not a small clue what the problem might be.

    Please advice.

    Thanks

    Ben
  2. Yao Android Developer

    what is url of your forum?
  3. bezibaerch3n New Member

    IT is www.mobil-talk.de

    BUT: It only seems to Happen with Opera Mini on Android, on iPhone Popup seems to work.
    Nevertheless I am wondering why it appears at all on Opera Mini As that js stuff shouldn't Match with Opera for my understanding.
  4. bezibaerch3n New Member

    Any update on that One?
  5. CheckN3D New Member

    The browser detection is looking for the device rather than the browser.

    I'm having a similar problem with opera mini in iPhone. It comes up with the popup and then fails to redirect. Your users probably have cookies turned off.

    You could try changing the tapatalkdetect.js to this to stop the pop up in Opera:

    Code:
    function detectTapatalk() {
    	if (document.cookie.indexOf("tapatalk_redirect=false") < 0) {
    		if(navigator.userAgent.match(/Opera Mini/i)) {
    				setTapatalkCookies();
    		} else if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
    			if (confirm("This forum is iPhone Native! Click OK to learn more about Tapatalk for iPhone.")) {            
    				document.cookie = "tapatalk_redirect=false"; 
    				window.location = "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307880732&mt=8";
    			} else {
    				setTapatalkCookies();
    			}
    		} else if(navigator.userAgent.match(/android/i)) {
    			if (confirm("This forum is Android Native! Click OK to learn more about Tapatalk for Android.")) {            
    				document.cookie = "tapatalk_redirect=false"; 
    				window.location = "market://search?q=pname:com.quoord.tapatalkpro.activity";
    			} else {
    				setTapatalkCookies();
    			}
    		} else if((navigator.userAgent.match(/Symbian/i)) || (navigator.userAgent.match(/Nokia/i))) {
    			if (confirm("This forum is Nokia Native! Click OK to learn more about Tapatalk for Nokia.")) {            
    				document.cookie = "tapatalk_redirect=false"; 
    				window.location = "http://store.ovi.com/content/22647?clickSource=browse&contentArea=applications";
    			} else {
    				setTapatalkCookies();
    			}
    		}
    	}
    }
    
    function setTapatalkCookies() {
    	var date = new Date();
    	var days = 30;
    	date.setTime(date.getTime()+(days*24*60*60*1000));
    	var expires = "; expires="+ date.toGMTString();
    	document.cookie = "tapatalk_redirect=false" + expires; 
    }
    
    detectTapatalk();
    Hope that helps

    Paul Davison
  6. winter Tapatalk Master

    Yup thanks for the clarification Paul. You can adjust the .js code to cater your need. Also removing it completely will not affect usability of Tapatalk.
  7. bezibaerch3n New Member

    Sorry for late reply:

    @Paul: Thanks a lot for that, saved me from analysing myself ;)

    Hope that will end in "normal" version soon.

    Ben

Share This Page