- 积分
- 185528
- 最后登录
- 2024-4-28
- 精华
- 0
- 阅读权限
- 255
- 主题
- 250
- UID
- 1004992
- 帖子
- 156604
- PB币
- 213424
- 威望
- 20481
- 贡献
- 3
- 技术
- 142
- 活跃
- 2668
幻想乡中享幸福
- UID
- 1004992
- 帖子
- 156604
- PB币
- 213424
- 贡献
- 3
- 技术
- 142
- 活跃
- 2668
|
阿伯才的风格 发表于 2013-8-6 23:00
好吧还被和谐了
实测高级模式下也无效……
只能在下面的回复框使用,支持按钮和快捷键的吧
这下换行应该没问题了- // ==UserScript==
- // @name PB_at
- // @author aa65535
- // @namespace https://i.pcbeta.com/space-uid-1004992.html
- // @version 0.0.1
- // @lastmodified 2013-08-06 22:44:44
- // @description 论坛回复伪@功能
- // @updateURL http://aa65535.com/public/js/pb_at.user.js
- // @downloadURL http://aa65535.com/public/js/pb_at.user.js
- // @include https://bbs.pcbeta.com/*
- // ==/UserScript==
- window.addEventListener("load", function() {
- script = 'function at(){for(var a=$("fastpostmessage").value,b=a.split("@"),c=1,d=b.length;d>c;c++)if(b[c].replace(/\\s/g,"")){var e=b[c],f=e.substring(0,-1==e.indexOf(" ")?(-1==e.indexOf("\\n")?e.length:e.indexOf("\\n")):e.indexOf(" "));a=a.replace("@"+f,"[url=https://i.pcbeta.com/space-username-"+encodeURL(f)+".html]@"+f+"[/url]")}return $("fastpostmessage").value=a,fastpostvalidate($("fastpostform"))}function encodeURL(a){if(!a)return"";var b=document.createElement("img");return b.src="nothing.action?sp="+a,b.src.split("?sp=").pop()}';
- appendscript('', script);
- $("fastpostform").onsubmit = at;
- $("fastpostmessage").onkeydown = function(e) {
- e = e || event;
- seditor_ctlent(e, "at()");
- };
- }, true);
复制代码 |
|