在百度贴吧发帖时能全自动挑选出需要转码的文字进行转码,支持主楼、楼中楼、标题
< Feedback on 百度貼吧繁體轉碼
换一换写法支持ScriptishScriptish无论有没有用到GM_api,都是在沙箱里执行的,这个脚本就会无效。可以这样改myscript = function(){ /* 把所有代码套进这个函数 */}document.addEventListener('DOMContentLoaded',function(e){ document.head.appendChild(document.createElement('script')).innerHTML = myscript.toString().replace(/(^function.*?\(\)\s*?\{|\}$)/g, '');},false);
类似地,也可以把整个代码转成字符串,然后document.location = "javascript:void( 代码 )";
非常感謝你的反饋和指導。其實我還不太會JS,最近正在學習中。我照你的建議更新0.6版了,為了不太亂我沒有裝Scriptish測試,在FF上的UserScriptLoader測試了。目測在Scriptish上也能用,哈哈
Sign in to post a reply.
换一换写法支持Scriptish
Scriptish无论有没有用到GM_api,都是在沙箱里执行的,这个脚本就会无效。可以这样改
myscript = function(){ /* 把所有代码套进这个函数 */}
document.addEventListener('DOMContentLoaded',
function(e){
document.head.appendChild(document.createElement('script')).innerHTML = myscript.toString().replace(/(^function.*?\(\)\s*?\{|\}$)/g, '');
},false);