Merge branch 'master' of git://github.com/MayhemYDG/4chan-x into filesize
This commit is contained in:
commit
abea2d7c83
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan x
|
||||
// @version 2.27.0
|
||||
// @version 2.27.1
|
||||
// @namespace aeosynth
|
||||
// @description Adds various features.
|
||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
@ -20,7 +20,7 @@
|
||||
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
* Copyright (c) 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
||||
* http://mayhemydg.github.com/4chan-x/
|
||||
* 4chan X 2.27.0
|
||||
* 4chan X 2.27.1
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
NAMESPACE = '4chan_x.';
|
||||
|
||||
VERSION = '2.27.0';
|
||||
VERSION = '2.27.1';
|
||||
|
||||
SECOND = 1000;
|
||||
|
||||
@ -553,7 +553,11 @@
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
regexp = RegExp(regexp[1], regexp[2]);
|
||||
if (key === 'md5') {
|
||||
regexp = regexp[1];
|
||||
} else {
|
||||
regexp = RegExp(regexp[1], regexp[2]);
|
||||
}
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
continue;
|
||||
@ -574,7 +578,11 @@
|
||||
return function(root, value, isOP) {
|
||||
var firstThread, thisThread;
|
||||
if (isOP && op === 'no' || !isOP && op === 'only') return false;
|
||||
if (!regexp.test(value)) return false;
|
||||
if (typeof regexp === 'string') {
|
||||
if (regexp !== value) return false;
|
||||
} else if (!regexp.test(value)) {
|
||||
return false;
|
||||
}
|
||||
if (hl) {
|
||||
$.addClass(root, hl);
|
||||
if (isOP && top && !g.REPLY) {
|
||||
@ -588,7 +596,7 @@
|
||||
if (isOP) {
|
||||
if (!g.REPLY) threadHiding.hideHide(root.parentNode);
|
||||
} else {
|
||||
replyHiding.hideHide(root.previousSibling);
|
||||
replyHiding.hideHide(root);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@ -2159,7 +2167,7 @@
|
||||
<p>Filename:<br><textarea name=filename></textarea></p>\
|
||||
<p>Image dimensions:<br><textarea name=dimensions></textarea></p>\
|
||||
<p>Filesize:<br><textarea name=filesize></textarea></p>\
|
||||
<p>Image MD5:<br><textarea name=md5></textarea></p>\
|
||||
<p>Image MD5 (uses exact string matching, not regular expressions):<br><textarea name=md5></textarea></p>\
|
||||
</div>\
|
||||
<input type=radio name=tab hidden id=rice_tab>\
|
||||
<div>\
|
||||
|
||||
2
Cakefile
2
Cakefile
@ -2,7 +2,7 @@
|
||||
{exec} = require 'child_process'
|
||||
fs = require 'fs'
|
||||
|
||||
VERSION = '2.27.0'
|
||||
VERSION = '2.27.1'
|
||||
|
||||
HEADER = """
|
||||
// ==UserScript==
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
master
|
||||
|
||||
2.27.1
|
||||
- Mayhem
|
||||
Fix stubs with the new filter.
|
||||
The MD5 will now check for exact string matching, it will not use regular expressions.
|
||||
|
||||
2.27.0
|
||||
- aeosynth / ahodesuka
|
||||
new option: expand images from current position
|
||||
|
||||
@ -1 +1 @@
|
||||
postMessage({version:'2.27.0'},'*');
|
||||
postMessage({version:'2.27.1'},'*');
|
||||
|
||||
@ -156,7 +156,7 @@ conf = {}
|
||||
) null, config
|
||||
|
||||
NAMESPACE = '4chan_x.'
|
||||
VERSION = '2.27.0'
|
||||
VERSION = '2.27.1'
|
||||
SECOND = 1000
|
||||
MINUTE = 60*SECOND
|
||||
HOUR = 60*MINUTE
|
||||
@ -458,8 +458,12 @@ filter =
|
||||
continue
|
||||
|
||||
try
|
||||
# Please, don't write silly regular expressions.
|
||||
regexp = RegExp regexp[1], regexp[2]
|
||||
if key is 'md5'
|
||||
# MD5 filter will use strings instead of regular expressions.
|
||||
regexp = regexp[1]
|
||||
else
|
||||
# Please, don't write silly regular expressions.
|
||||
regexp = RegExp regexp[1], regexp[2]
|
||||
catch e
|
||||
# I warned you, bro.
|
||||
alert e.message
|
||||
@ -492,7 +496,11 @@ filter =
|
||||
(root, value, isOP) ->
|
||||
if isOP and op is 'no' or !isOP and op is 'only'
|
||||
return false
|
||||
unless regexp.test value
|
||||
if typeof regexp is 'string'
|
||||
# MD5 checking
|
||||
if regexp isnt value
|
||||
return false
|
||||
else unless regexp.test value
|
||||
return false
|
||||
if hl
|
||||
$.addClass root, hl
|
||||
@ -508,7 +516,7 @@ filter =
|
||||
unless g.REPLY
|
||||
threadHiding.hideHide root.parentNode
|
||||
else
|
||||
replyHiding.hideHide root.previousSibling
|
||||
replyHiding.hideHide root
|
||||
true
|
||||
|
||||
node: (root) ->
|
||||
@ -1754,7 +1762,7 @@ options =
|
||||
<p>Filename:<br><textarea name=filename></textarea></p>
|
||||
<p>Image dimensions:<br><textarea name=dimensions></textarea></p>
|
||||
<p>Filesize:<br><textarea name=filesize></textarea></p>
|
||||
<p>Image MD5:<br><textarea name=md5></textarea></p>
|
||||
<p>Image MD5 (uses exact string matching, not regular expressions):<br><textarea name=md5></textarea></p>
|
||||
</div>
|
||||
<input type=radio name=tab hidden id=rice_tab>
|
||||
<div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user