Skip to content

Instantly share code, notes, and snippets.

@shui
Last active April 8, 2021 14:53
Show Gist options
  • Save shui/77de1eb522e37ec41249c6ab5232ad8d to your computer and use it in GitHub Desktop.
Save shui/77de1eb522e37ec41249c6ab5232ad8d to your computer and use it in GitHub Desktop.
USTC邮箱修改默认邮箱域名为mail.ustc.edu.cn
// ==UserScript==
// @name USTCmail修改默认邮箱域名为mail.ustc.edu.cn
// @namespace https://gist.github.com/shui
// @version 0.1
// @description USTCmail修改默认邮箱域名为mail.ustc.edu.cn,以及使用SSL登录
// @author shui
// @homepageURL https://gist.github.com/shui/77de1eb522e37ec41249c6ab5232ad8d
// @downloadURL https://gist.github.com/shui/77de1eb522e37ec41249c6ab5232ad8d/raw/ustcmail-change-default-domain.user.js
// @updateURL https://gist.github.com/shui/77de1eb522e37ec41249c6ab5232ad8d/raw/ustcmail-change-default-domain.user.js
// @match http*://mail.ustc.edu.cn/
// @match http*://email3.ustc.edu.cn/
// @grant unsafeWindow
// ==/UserScript==
var $ = unsafeWindow.jQuery;
// 修改默认域名为mail.ustc.edu.cn
$("#domainVal").html("mail.ustc.edu.cn");
// 强制使用SSL登录
$("input[name='useSSL']").prop('checked', true);
@wangyu-
Copy link

wangyu- commented Apr 8, 2021

There is an easier way without using scripts.
You can use [email protected] as your username, the @mail.ustc.edu.cn suffix will override the default setting. Then you will be able to login into mail.ustc.edu.cn even if ustc.edu.cn is chosen.

(source: https://github.com/zzh1996/USTC-Network-Resources)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment