SOURCE



window.location = "airpay://order?order_uri=aHR0cHM6Ly90ZXN0cGF5LmFpcnBheS5pbi50aC9wYXk%2Fb3JkZXJfaWQ9U0JJUFNfMTU3NTg4NzA2OF8xNDA0ODk5MzIyJnNvdXJjZT13ZWImYXBwX2lkPTEwMDAwMSZrZXk9cUpGdDZkYTU0OWZhNTBmZDgwNTcmcmV0dXJuX3VybD1hSFIwY0hNNkx5OTBaWE4wWkdWdGJ5NWhhWEp3WVhrdWFXNHVkR2d2YzJGdGNHeGxYMlpwYm1semFDNXdhSEElMkZiM0prWlhKZmFXUTlVMEpKVUZOZk1UVTNOVGc0TnpBMk9GOHhOREEwT0RrNU16SXk"
var callAppStore = setTimeout(function(){
      addVisibilityHandler(function(){
        window.location = getStoreUrl();
      })
		}, 200);
var changeVisibility = function() {
  clearTimeout(callAppStore)
}
document.addEventListener('visibilitychange', changeVisibility)

function addVisibilityHandler(callback){
    // Set the name of the hidden property and the change event for visibility
    var hidden, visibilityChange;
    if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
        hidden = "hidden";
        visibilityChange = "visibilitychange";
    } else if (typeof document.msHidden !== "undefined") {
        hidden = "msHidden";
        visibilityChange = "msvisibilitychange";
    } else if (typeof document.webkitHidden !== "undefined") {
        hidden = "webkitHidden";
        visibilityChange = "webkitvisibilitychange";
    }

    function handleVisibilityChange(e) {
        e.preventDefault(); // Didnt prevent the page from scrolling to top
        e.stopPropagation();
        e.stopImmediatePropagation();

        if (!document[hidden]) {
            // Check again if the use still has permissions to see this page
            callback()
        }


    }
	// Handle page visibility change
	document.addEventListener(visibilityChange, handleVisibilityChange, false);

}
console 命令行工具 X clear

                    
>
console