KF_fastreply

fastreply for Kf

目前为 2016-12-13 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name KF_fastreply
  3. // @namespace https://greasyfork.org/users/14059
  4. // @version 0.2
  5. // @description fastreply for Kf
  6. // @author setycyas
  7. // @grant none
  8. // @include http://*2dkf.com/*
  9. // @include http://*ddgal.com/*
  10. // @include http://*9moe.com/*
  11. // @include http://*kfgal.com/*
  12. // ==/UserScript==
  13.  
  14. /*****************
  15. 重新绑定快速回复的方法
  16. *****************/
  17. postreply=function(txta,txtb){
  18. //找到快速回复的文本区域
  19. var replyArea=document.getElementsByTagName("textarea")[0];
  20. if(typeof document.FORM != "undefined"){
  21. //添加引用字符串
  22. replyArea.focus();
  23. replyArea.value+= '[quote]'+txta+'[/quote]\r\n';
  24. //添加关键词
  25. if(document.FORM.diy_guanjianci.value!==''){
  26. document.FORM.diy_guanjianci.value += ','+txtb;
  27. }else{
  28. document.FORM.diy_guanjianci.value = txtb;
  29. }
  30. }
  31. };
  32.  
  33. /*****************
  34. 脚本运行提示
  35. *****************/
  36. console.log('fast reply script for KF by setycyas running!');