RainHong
小狐狸
小狐狸
  • UID17920
  • 注册日期2007-04-10
  • 最后登录2007-04-10
  • 发帖数1
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:4950回复:4

今天为动网论坛DVBBS写了GreaseMonkey的回帖JScript

楼主#
更多 发布于:2007-04-10 18:38
测试了一下,能够发帖和回帖了.
上动网有问题的可以试一下.先装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;
附件名称/大小 下载次数 最后更新
dvbbs_reply.user.rar (1KB)  27 2007-04-10 18:38
fang5566
管理员
管理员
  • UID3719
  • 注册日期2005-03-07
  • 最后登录2025-09-08
  • 发帖数18502
  • 经验4858枚
  • 威望5点
  • 贡献值4324点
  • 好评度1118点
  • 社区居民
  • 最爱沙发
  • 忠实会员
  • 终身成就
1楼#
发布于:2007-04-10 18:38
的确是有效的。。。。。。。。。希望其他方面也可以改进
Firefox More than meets your experience
hnstxx
千年狐狸
千年狐狸
  • UID1952
  • 注册日期2005-01-09
  • 最后登录2013-05-14
  • 发帖数4977
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2007-04-10 18:38
楼主好人^_^
赞一下先
MM:你是个外表冷酷,内心却很甜蜜的男人。
独孤木人
小狐狸
小狐狸
  • UID16864
  • 注册日期2007-01-28
  • 最后登录2007-03-12
  • 发帖数8
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
3楼#
发布于:2007-04-10 18:38
超级支持 等了很久了
angus
小狐狸
小狐狸
  • UID1325
  • 注册日期2004-12-23
  • 最后登录2021-02-19
  • 发帖数40
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
4楼#
发布于:2007-04-10 18:38
这个具体修改了什么?
我常去的几个使用dvbbs的论坛最大的问题就是
1、编辑帖子和引用帖子时在编辑区没有内容
2、上传附件后不能在编辑区显示
3、帖子中图片多的话非常容易造成firefox死机

一般的发帖和回帖好像没问题
游客

返回顶部