NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name NZ WHV for china // @description Try login and apply for the NZ whv for china // @author Jay Gong // @include https://www.immigration.govt.nz/ // @include https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm // @include http://www.immigration.govt.nz/migrant/default.htm // @include https://www.immigration.govt.nz/WorkingHoliday/ // @version 2.0 // @namespace https://openuserjs.org/users/glsjay // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js // @require https://code.createjs.com/soundjs-0.6.1.min.js // ==/UserScript== //alert("Hello! bao bao is the cutest !!"); //window.location.replace("https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm"); var username = "", password = "", player; player = document.createElement('audio'); player.src = 'http://static1.grsites.com/archive/sounds/bells/bells003.wav'; player.preload = 'auto'; $().ready(function() { var hostName = window.location.hostname, url = window.location.href; // $("#ctl00_ContentPlaceHolder1_falseStatementCheckBox").attr('checked', false); // alert(hostName); if (url == "https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm") { //chrome.tabs.create({url:'chrome://flags/'}); //chrome.tabs.update({ url: "chrome://flags/" }); $("#OnlineServicesLoginStealth_VisaLoginControl_userNameTextBox").val(username); $("#OnlineServicesLoginStealth_VisaLoginControl_passwordTextBox").val(password); $("#OnlineServicesLoginStealth_VisaLoginControl_loginImageButton").click(); }else if (url == "http://www.immigration.govt.nz/migrant/default.htm") { $("#OnlineServices_workingHolidayAnchor").click(); }else if (url == "https://www.immigration.govt.nz/WorkingHoliday/") { console.log(">>>>>>>" + $("#ctl00_ContentPlaceHolder1_countryDropDownList").val()); if($("#ctl00_ContentPlaceHolder1_countryDropDownList").val() == "undefined"){ player.play(); } $("#ctl00_ContentPlaceHolder1_countryDropDownList").val("46"); $("#ctl00_ContentPlaceHolder1_okButton").click(); }else if(url == "https://www.immigration.govt.nz/" || url == "https://www.immigration.govt.nz/error.htm?aspxerrorpath=/Templates/Custom/MasterHomepage.aspx"){ setTimeout(function(){ window.location.replace("https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm"); }, 60000); }else if(url == "https://www.immigration.govt.nz/WorkingHoliday/Default.aspx"){ //chrome.send('restartBrowser'); window.location.replace("https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm"); } else { player.play(); } });