WordPress通過分類查找文章

引用請注明原作者

目前為 2018-05-05 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name WordPress Find Articles By Classifying
  3. // @name:zh-TW WordPress通過分類查找文章
  4. // @namespace http://WWW.NTRSN.CN/
  5. // @version 0.1
  6. // @description:en Find Articles By Classifying,I hope to help you
  7. // @description:zh-TW 引用請注明原作者
  8. // @author WWW.NTRSN.CN
  9. // @match */wordpress/wp-admin/edit.php*
  10. // @supportURL 873248164@qq.com
  11. // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=873248164@qq.com&item_name=Greasy+Fork+donation
  12. // @compatible chrome
  13. // @compatible firefox
  14. // @compatible opera 未測試not test
  15. // @compatible safari 未測試not test
  16. // ==/UserScript==
  17.  
  18. (function() {
  19. 'use strict';
  20. var list=document.getElementById('cat').cloneNode(true);
  21. document.getElementsByClassName('search-box')[0].appendChild(list);
  22. list.onchange=function(){
  23. var SelectValue=list.options[list.selectedIndex].textContent.replace(/^\s*|\s*$/g, "");
  24. document.getElementById('post-search-input').value=SelectValue;
  25. document.getElementById('search-submit').click();
  26. };
  27. })();