()
| 1648 | } |
| 1649 | // 针对首页几个页面 |
| 1650 | function switchHomeRecommend() { |
| 1651 | document.querySelectorAll('header.AppHeader nav>a:not([target])[href="https://www.zhihu.com/"]').forEach((a)=>{a.addEventListener('click', function(e){e.preventDefault();document.cookie='tst=r; expires=Thu, 18 Dec 2099 12:00:00 GMT; domain=.zhihu.com; path=/';location.href=this.href;return false;})}) |
| 1652 | } |
| 1653 | |
| 1654 | (function() { |
| 1655 | if (window.onurlchange === undefined) {addUrlChangeEvent();} // Tampermonkey v4.11 版本添加的 onurlchange 事件 grant,可以监控 pjax 等网页的 URL 变化 |