阅读:4950回复:4
今天为动网论坛DVBBS写了GreaseMonkey的回帖JScript
测试了一下,能够发帖和回帖了.
上动网有问题的可以试一下.先装GreaseMonekey,再加入这个user.js就行了. // ==UserScript== // @name RedFish Dvbbs Reply(by Rain Hong) // @author Rain Hong // @email <!-- e --><a href="mailto:hong.blue@gmail.com">hong.blue@gmail.com</a><!-- e --> // @16:50 2007-04-10 // ==/UserScript== function newsubmit(event) { var target = event ? event.target : this; var h=window.location.href.toLowerCase(); if(h.indexOf('dispbbs.asp')!=-1||h.indexOf('say.asp')!=-1|| h.indexOf('show.asp')!=-1 || h.indexOf('messanger.asp')!=-1 || h.indexOf('post.asp')!=-1 || h.indexOf('showpost.asp')!=-1 || h.indexOf('newtopic.asp')!=-1){ var hInput = document.getElementById('Body'); var iframe = document.getElementById('Dvbbs_Composition'); var doc = iframe.contentWindow.document; hInput.value=doc.body.innerHTML; } // call real submit function this._submit(); } // capture the onsubmit event on all forms window.addEventListener('submit', newsubmit, true); // If a script calls someForm.submit(), the onsubmit event does not fire, // so we need to redefine the submit method of the HTMLFormElement class. HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit; HTMLFormElement.prototype.submit = newsubmit; |
|
|
1楼#
发布于:2007-04-10 18:38
的确是有效的。。。。。。。。。希望其他方面也可以改进
|
|
|
2楼#
发布于:2007-04-10 18:38
楼主好人^_^
赞一下先 ![]() ![]() |
|
|
3楼#
发布于:2007-04-10 18:38
超级支持 等了很久了
|
|
4楼#
发布于:2007-04-10 18:38
这个具体修改了什么?
我常去的几个使用dvbbs的论坛最大的问题就是 1、编辑帖子和引用帖子时在编辑区没有内容 2、上传附件后不能在编辑区显示 3、帖子中图片多的话非常容易造成firefox死机 一般的发帖和回帖好像没问题 |
|