本站不兼容 8 以前的版本的 Interner Explorer 浏览器(或基于这些版本的 IE 的其他浏览器),并且页面样式不完全兼容 IE 8,我们建议你升级至 IE 9 或改用其他非 IE 浏览器

Mozest™

  • 正在加载用户菜单…

开放、分享、互助

top100\.cn/.*\.mp3

我用这个自动下载谷歌的音乐,存下来中文文件名是乱码,楼主看看能不能修正一下。
本帖最后由 tiramn2 于 2009-5-12 20:46 编辑
top100\.cn/.*\.mp3

我用这个自动下载谷歌的音乐,存下来中文文件名是乱码,楼主看看能不能修正一下。
ilinkcn 发表于 2009-5-12 19:00
稍微改了一下,更新在顶楼。
LS同学先试试看,应该可以了。
谢谢。

新版本最晚后天能公开的说
新版本会有什么新变化
本帖最后由 tiramn2 于 2009-5-12 23:04 编辑
新版本会有什么新变化
gsky916 发表于 2009-5-12 22:58
没什么特别大的变化,把discuz规则整合进去,修正原先的一些规则,添加自动备份手动恢复自定义列表,新function:插入外部文件(其实就是插入自定义代码的外部文件版本),改名字......还有一些细微的变化......

话说本来答应ilinkcn同学的,悬浮框定位以及自动清除cache都由于功力不够黄了....
对了,似乎默认整合之后的代码是不允许修改或删除的(灰色),只能禁用。

但是比如说我打算把表情框关闭时间那个从1S改到0.5S的话,在新版本中,我就只能先禁用整合进去discuz规则,然后添加一个自定义的(事实上只修改了一个参数而已),有什么别的途径修改吗?
对了,似乎默认整合之后的代码是不允许修改或删除的(灰色),只能禁用。

但是比如说我打算把表情框关闭时间那个从1S改到0.5S的话,在新版本中,我就只能先禁用整合进去discuz规则,然后添加一个自定义的(事实上只 ...
gsky916 发表于 2009-5-12 23:19
不单单是0.5S,包括表情文件要自定义......都得重新建规则
下个版本允许使用外部文件,gsky916同学可以把原来的文件复制一份出来,然后改好
建立新规则并且引用。
的确有点麻烦,但是为了万一的脚本代码维护,不得不这么做。
我在考虑要不要创建一种新的function叫做template的,把代码分拆成写死的和自定义2部分。
嗯,楼主比我考虑的严密,如果是自定义性质比较强的规则,写死了就很僵化了.

估计大多数网友都只会把整合进去的规则作为一个参考的模版,然后就禁用了,自己再照葫芦画瓢写一个自定义的。这样整合进去的规则就丧失了原本的意义。
本帖最后由 gsky916 于 2009-5-13 11:41 编辑

导入外部文件是一个非常有前瞻性的功能,可以考虑把表情规则存为文本文档,作为一个模版提供下载,有需要的同学自行下载,然后进行修改导入,这样就和GM的脚本安装模式类似。

现在规则不多,因此都整合进去。如果以后规则多的话,不可能整合所有的规则。可以找个网站类似googlecode这样的,提供规则的下载,自由选用,可能想的有点远了,呵呵。

当然如果楼主说的那种拆分功能实现的话就更棒了~
导入外部文件是一个非常有前瞻性的功能,可以考虑把表情规则存为文本文档,作为一个模版提供下载,有需要的同学自行下载,然后进行修改导入,这样就和GM的脚本安装模式类似。

现在规则不多,因此都整合进去。如果以 ...
gsky916 发表于 2009-5-13 11:38
还是在考虑拆分的问题,头都大了。2个问题: 1. 拆分到什么程度; 2. 谁用


估计还是得放弃。
后果就是,今后的大多数自定义规则不得不从扩展的版本更新中分离开。烦恼阿
我不太懂得程序的开发和维护.....因此没办法发表什么看法。
OK~其实楼主也不必太过烦恼,如果感觉定位困难,那就维持现状好了,也不必一定分离开。

不如这样....在默认列表里添加一个模版列表这样的子项目,里面放类似表情规则这样的规则,默认为不勾选启用。单独分类的目的意在突出表明这部分规则的可自定制性。

由用户自行选择是否启用该条规则又或者是以这个规则为模版创建自己的自定义规则。
在今后的帮助文档或者使用说明里说明一下就行。
本帖最后由 gsky916 于 2009-5-16 12:46 编辑
不过如果真要把整个202L搬进扩展本身,最大的问题还是语言,我英语不过关,实在翻译不过去。 ...
tiramn2 发表于 2009-5-9 13:09
花了几天时间折腾出来了一个试译版本,限于水平,只有这种质量了......

原则上是尽量完全按照楼主202L的原文词句来进行翻译,尽量避免意译,实在译不了(限于水平)或者是容易发生歧义的地方采用意译,这样的地方应该不会太多......
另外有一处从原文看起来说的不是很清楚,于是用括号引用了两句楼主在后面帖子里回复解释的发言,加到了译文里。
可能有些用词不准确,一来限于水平,二来对一些IT词汇不熟悉;另外语法出现问题,或者词不达意啥的,这个就完全是水平问题了

我相信包括回复本帖的在内的很多朋友以及Mozest的网友都是英语达人,我在这厚着脸皮班门弄斧,呵呵,大家不要见笑,希望能够为这个扩展将来能够加入帮助文档尽一份微薄之力。

作为一篇技术类的使用指南,更加要求严谨和准确。
如果楼主和高手们发现错误之处,或者对此感兴趣,还望能够不吝出手指正,进一步完善,非常感谢。
=====================================================

A beginner's guide



If you find any mistakes, please kindly contact me.Welcome to submit suggestions!




Recommended prepare work



A. Regular expressions.

All the rules are divided into two parts,the condition part and the Function part.The URI and content type in the condition part both used regular expressions .

For the regular expressions course, I do not have too much to say here(because I am also a beginner), you can easily find tutorials from the Internet. It is worth noting that, please do not forget to add a "\" (backslash) in front of the "." (Decimal point) in the url, as the decimal point is a special character, representing an arbitrary character, in order to avoid unnecessary trouble, it would be best to add a "\" (backslash) to prevent false triggering.

B. The definition of HTTP header information

Most functions of this addon get effective by modifying the http header information . This is a standard definition of W3C, almost includes all the header information you can see in the internet.
http://www.w3.org/Protocols/rfc2616/rfc2616.html

C. addon Live HTTP Headers
https://addons.mozilla.org/zh-CN/firefox/addon/3829
I strongly recommended this firefox addon,it could Real-time display the header information of every HTTP connection. It's very very nice to use.
If you can not see the header information,basically, it is difficult to write rule of this addon.


Primary User Guide



1. Make it downloadable.
Can prompt download box correctly for specified file  (some invalid).
No one knows how Firefox determine the so-called invalid part.

Someone who is interested in it may try to establish a rule that set all links to "make it downloadable" and see what is the effect.

This function modified the content-disposition section (Different from Force Content-Type), according to this information,FF determine whether to prompt download files and decide download file's default name.
The addon define the default file name based on the original content-disposition section, or the file name in the link.

Some guys would find redundant suffix .txt when using this function, it is difficult to say that it is already exist in the content-disposition section or FF decide to add one according to the MIME Type.

        
2. Change content type (modify Content Type).
Exactly the same with force content-type , modify content-type section.

FF determine the download action based on content-type section and file suffix, such as use what associated program to open files. The management of these actions are in the application tab in Firefox's options menu , due to unknown reasons, FF didn't set up a function that can delete or add an action directly.You can only modify it in the profile\mimeTypes.rdf manually .

However, even if the set of MIME-Type are the same with content type, it may not be effective. Unknown reasons.

Some guys hope that can downlaod torrent files directly(not open) , you can use this function.(As some websites used "inline" instead of "attachment" to describe a torrent file, cause firefox's default action changes to"open",rather than "download".)

Modify content-type to what you want, and then set the corresponding MIME-Type. If you are lucky enough , now you can get what you want.

Here is a problem, this function is invalid to the cache files (cache) !
If you are interested in it, you can modify the following URI content-type to "image / x-icon" ,give it a try.
http://www.baidu.com/favicon.ico


3. referrer to host root(anti - anti-navigating(general))
referrer to specified site(anti - anti-navigating(custom))


The same as Ref Control,modify referrer section.
The difference between the two function is that the former will automatically point to the uri root path, the latter need to manually specify url.

4. Fake IE6
As the title implies,make some websites mistakenly believe that the browser is ie6.
Modify user-agent section. Independent use ..... basically ,only can be used to do some test.


Intermediate User Guide



Congratulations,you have finished reading the above boring primary user guide, no illustrations, no examples, or think it would be too simple, or feel that it is a sealed book.I can't help more, because the above is the most simple applications.

From now on I'll introduce the "download locally while watching" function that everyone are long-awaited!!!

5. download locally while watching
        
This function is mainly used to download any files, we may be more concerned about the multimedia files, such as flv, mp3 files.

Omit superfluous words ,the following example is to establish a rules that download mp3 file from yobo.
Test address
http://yobo.com/song/home/321752

a. empty the cache
b. close other tabs to avoid interference
c. open the above address (please ensure that haven't ban javascript script)
d. open Live HTTP header to monitor http header information
e. click the play button
f. music started, the window of Live HTTP header start scrolling
g. cancel the Capture check box of Live HTTP header so that it will stop monitoring
h. Research the captured information, as shown in the following figure:


Please note the blue lines, this is the mp3 file's address.
Guys must be asked here, how to determine which line is the real address?
The answer is, "guess." First of all the "mp3" is in the filename, then, the returned Content-Type is audio/mpeg ,and the file size is pretty much the same. So take this as a real address.

i. Download the file from above address, to verify the correctness.
j. According to the real address,come up with a regular expression, this step need us use our brains.

The regular expression I guessed is:
http://222.168.102.82/.*\.mp3
The Principle is "as precise as possible, usable is enough, bold guess, be careful to verify"

Here are three tips:

/ / Most sites start caching as soon as you enter the page,so Live HTTP header must start monitoring before you open the page, because the HTTP header only exists in the first interaction of document request  . You can't grasp the information later.

/ / Youku's video have been divide into parts,each part is about 7 minutes;no solution.

/ / The text of Live HTTP header can be copied or saved into a text file, please use the find function flexibly.

At last, some guys may have a doubt, "since the address already know, why do not use the general multi-thread download tools (Thunder, Flashget, QQDownload), but rather use this addon to establish rules to download when watching?"

Answer: Because of the site's anti-download set, there may be a phenomenon that we can watch or listen media online normally , but we can't use download tools to download them correctly.
Using "download when watching" function to download would not have such concerns.


Advanced User Guide



For most users, please ignore the following content, because use these functions need to write code manually.Very powerful, but also a hard work.

6. insert custom logic(insert custom code)

Insert custom code in the forefront of any document .

This function is different from the page modify addons such as GM and Stylish , the different is:
The latter take effect after the page loaded,can not impact on the non-interactive pages, as well as the script code that implemented before the document load .
While the former is not based on DOM analysis,modify the document itself directly, more violence. But at the same time,  this function could do nothing about the cache files (Cache), so please be sure to empty the cache for the first use.

Examples.... none, guys who are interested in this function please make reference to ys168 rule settings.


Thanks for reading.

无数感谢!!!!!!!!!!!!!!!!
大约看了一下...能纠正以下的错误吗?

1)是 URL 不是 URI

2)If you find any mistake,please tell me.
最好改成
If you find any bugs, please kindly contact me.

3)download locally when watching(同步本地下载)
最好改成
download locally while watching
本帖最后由 gsky916 于 2009-5-13 18:12 编辑

呵呵,没什么,其实我也是一时好玩.

对了,刚返回头看了下,我在317L可能表达的有点不是很明白,再解释一下:

就是维持现状的基础上,将整合进去的默认规则,其中一些具备用户手动可定制性的默认规则(像表情规则这样的),专门划归为一个子类。之后在使用说明里对这个部分向用户加以说明就可以。

实际上这个子类里的规则本质上仍然是默认规则(不可修改),我想这个实现起来应该比拆分容易的多,其实用户自己动手也不是一件太大的问题,这样也减少楼主开发的工作量,主要是大家都用着明白就好!
嘿嘿,新版本改名字了啊
呵呵,没什么,其实我也是一时好玩.

对了,刚返回头看了下,我在317L可能表达的有点不是很明白,再解释一下:

就是维持现状的基础上,将整合进去的默认规则,其中一些具备用户手动可定制性的默认规则( ...
gsky916 发表于 2009-5-13 17:50
现在是作为一个未安装的脚本(sample)随扩展一起发布,嘿嘿
大约看了一下...能纠正以下的错误吗?

1)是 URL 不是 URI

2)If you find any mistake,please tell me.
最好改成
If you find any bugs, please kindly contact me.

3)download locally when watching(同步本地下 ...
skyline 发表于 2009-5-13 17:37
非常感谢您的指正.
1)URI这个是楼主的原文,之后我在google上搜索了一下,确实有这个术语,就没敢更改。
这个可能需要楼主的确认。
2)已经按您说的更正,对于bugs一词,我先保留一下,因为我看了几遍202L的文章,楼主所说的有错必改应该是指文章中的错误,bug一词多用于程序上的错误,我不是很肯定在这里是否合适,我再查一下,或者您能告知一下这样使用的合理性或者已有的范例。
3)这个也是楼主的原文,因为本身就是英文,因此没有做变动,如果楼主对这个词进行变动的话,那么英文版里当然也会进行变动。
非常感谢您的指正.
1)URI这个是楼主的原文,之后我在google上搜索了一下,确实有这个术语,就没敢更改。
这个可能需要楼主的确认。
2)已经按您说的更正,对于bugs一词,我先保留一下,因为我看了几遍2 ...
gsky916 发表于 2009-5-13 18:08
扩展里面when刚改成while了,其他还是维持现状把。
话说我也搞不清楚uri和url的区别......
URI = Universal Resource Identifier 统一资源标识符
URL = Universal Resource Locator 统一资源定位符

这网站有说明,请tiramn2自己判断要表达的是什么...
http://www.itkhl.com/Article/html/itkhl-110408.html
本帖最后由 jiajiepan 于 2009-5-13 18:53 编辑

不知道为什么,在附加组件窗口里打不开 选项,并且附加组件窗口没反应了,但在工具菜单里可以打开 选项
附件: 您所在的用户组无法下载或查看附件
我和楼上的朋友有同样的问题,一旦在附加组件窗口里点选项键,就会失去响应.
感谢jiajiepan和gsky916同学的反馈,
已经更新顶楼。
是我改名字时候的疏忽.....
URI = Universal Resource Identifier 统一资源标识符
URL = Universal Resource Locator 统一资源定位符

这网站有说明,请tiramn2自己判断要表达的是什么...
http://www.itkhl.com/Article/html/itkhl-110408.html ...
skyline 发表于 2009-5-13 18:27
感谢skyline同学的链接,虽然还是有点不明白,暂时还是维持现状
(话说这个扩展里面基本混淆了这2个概念的说)
永远支持楼主!
谢谢,失去响应的问题修好了。

建议楼主在将来的版本中给帮助文档以及sample在配置界面加个快捷按钮。

路径蛮深的,一步一步的点到那个文件夹挺费劲,不大好找。
个人感觉应该是URI。拆分还是不拆分的确是个问题,我是支持拆分的。不妨做个网站或者主页,把规则放在上面,谁需要什么就在上面导入什么,就像GM和userscripts.org一样。
听老人说,今生做千件好事,来世方能讨生为猫。
刚看了这个帖子:http://g.mozest.com/viewthread.php?tid=30055&highlight=,让我禁不住有个幻想:很多论坛的图片需要回复方能查看,用mason能不回复就查看吗?论坛网址和用户名不太方便贴出来,我发到楼主站内信箱里了。这个估计比较难实现,楼主有空的话帮我看看,多谢了。
听老人说,今生做千件好事,来世方能讨生为猫。
谢谢分享,支持楼主,:-) :-) :-)
刚看了这个帖子:http://g.mozest.com/viewthread.php?tid=30055&highlight=,让我禁不住有个幻想:很多论坛的图片需要回复方能查看,用mason能不回复就查看吗?论坛网址和用户名不太方便贴出来,我发到楼主站内 ...
harnack 发表于 2009-5-13 21:00
想法非常大胆,那个帖子我也看到了,果然是印证了ilinkcn同学在308L的回复,呵呵。

回复可见这个问题已经涉及到论坛程序的破解,有点具备hack的性质了,估计需要精通php,和那个去除广告脚本的难度不是一个级别的。

而且即便能实现,规则也是不能公开传播的,一旦被一些站长知道,肯定会提交到官网,估计会出安全补丁封掉。

虽然这个扩展很强大,但是一定不要用来做坏事哈。

PS.mozest的访问速度不大理想啊~~
相当遗憾,那个和这个不是同一个概念,扩展永远都只能改本地的东西,像回复后可见之类的都牵涉到和服务器交互以及服务器的本地存取,所以应该是基本没有希望生效的。
与此类似的还有验证码.....

gsky916同学,你帮我PS的那个图标能不能找个速度快的稳定的图库上传一下,我担心会不会给modest服务器造成负担,另外还有你提供的那个表情站点要不要紧?