Skip to content

Instantly share code, notes, and snippets.

@hzhangxyz
Last active March 31, 2017 07:17
Show Gist options
  • Save hzhangxyz/20f45401cac747b7b908871c788efc4f to your computer and use it in GitHub Desktop.
Save hzhangxyz/20f45401cac747b7b908871c788efc4f to your computer and use it in GitHub Desktop.
mis.USTC.helper
// ==UserScript==
// @name mis.USTC Helper
// @namespace mis.ustc.edu.cn
// @version 0.0
// @description delete login information for USTC mis automatically
// @author H.Zhang
// @match http://mis.teach.ustc.edu.cn/
// @match http://mis.teach.ustc.edu.cn/index.jsp
// @grant none
// ==/UserScript==
(function(){
document.getElementsByClassName('bg2')[0].onclick=function(){
document.cookie.split(";").forEach(function(c) {
document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/");
});
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment