Skip to content

Instantly share code, notes, and snippets.

@x-magic
Last active February 17, 2018 00:24
Show Gist options
  • Save x-magic/04c6d7d87f7c934cd1c3fc102d6d8d63 to your computer and use it in GitHub Desktop.
Save x-magic/04c6d7d87f7c934cd1c3fc102d6d8d63 to your computer and use it in GitHub Desktop.
一个忽略知乎邀请页单页所有邀请的脚本(怎么读起来这么别扭……)
// ==UserScript==
// @name Zhihu Ignore All Invitation
// @namespace http://www.zhihu.com/
// @version 0.2.1
// @description Add a button to ignore all invitation
// @include http*://www.zhihu.com/question/invited*
// @run-at document-end
// @copyright 2016, x-magic <xmagic5589@gmail.com>
// @updateURL https://gist.githubusercontent.com/x-magic/04c6d7d87f7c934cd1c3fc102d6d8d63/raw/ZhihuIgnoreAllInvitation.user.js
// @downloadURL https://gist.githubusercontent.com/x-magic/04c6d7d87f7c934cd1c3fc102d6d8d63/raw/ZhihuIgnoreAllInvitation.user.js
// ==/UserScript==
//ZhihuIgnoreAllInvitation.user.js 一个忽略知乎邀请页单页所有邀请的脚本(怎么读起来这么别扭……)
(function() {
'use strict';
jQuery('h4.zm-invite-title').append(' <a href="#" id="signoreall">忽略本页</a>');
jQuery('#signoreall').click(function(){
jQuery('a[name=ignore]').each(function(){$(this)[0].click();});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment