脚本作用: 右栏评论移动至下方评论, 拉宽文章内容.
注意, 使用该脚本不能使用拉宽规则, 另外脚本运行是在网页结构加载完毕之后.
=====使用方法=====
1. 安装"暴力猴"插件: http://extension.maxthon.cn/detail/index.php?view_id=1680
2. 复制一下代码框内的脚本信息.
3. 打开 "暴力猴" 管理脚本
4. 新建脚本, 清空脚本编辑器的代码, 然后粘贴刚才复制的代码, 接着保存.
脚本代码
- // ==UserScript==
- // @name 驱动之家 文章内容重新排版
- // @author 极品ΦωΦ小猫
- // @version 0.0.1
- // @include /^http:\/\/news\.mydrivers.com\/\d\/\d{3}\/\d+/
- // @homepage http://bbs.maxthon.cn/forum.php?mod=redirect&goto=findpost&ptid=889553&pid=6215921&fromuid=1388242
- // @icon http://www.mydrivers.com/favicon.ico
- // @run-at document-idle
- // ==/UserScript==
- var Cright=document.getElementsByClassName('news_right')[0];
- var Ciframe=document.getElementById('commentsiframe');
- Ciframe.style.cssText+="float:left;width:695px";
- var CiframeN=Ciframe.nextElementSibling;
- var CiframeP=Ciframe.parentNode;
- var Cdiv=document.createElement('div');
- Cdiv.innerHTML="<style>div.news_left, div.news_n {width:auto!important;}</style>";
- Cdiv.appendChild(Ciframe);
- Cdiv.appendChild(Cright);
- CiframeP.insertBefore(Cdiv,CiframeN);
复制代码 效果预览图
|