diff --git a/4chan_x.user.js b/4chan_x.user.js
index 52edf26ee..714a8cef6 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -141,6 +141,7 @@
subject: '',
comment: '',
filename: '',
+ dimensions: '',
filesize: '',
md5: ''
},
@@ -624,6 +625,11 @@
if (file = $('.filesize > span', root)) return file.title;
return false;
},
+ dimensions: function(root) {
+ var span;
+ if (span = $('.filesize', root)) return span.textContent.match(/\d+x\d+/)[0];
+ return false;
+ },
filesize: function(root) {
var img;
if (img = $('img[md5]', root)) return img.alt;
@@ -2111,6 +2117,7 @@
Subject:
\
Comment:
\
Filename:
\
+ Image dimensions:
\
Filesize:
\
Image MD5:
\
\
diff --git a/script.coffee b/script.coffee
index 71d20df85..42bcd1161 100644
--- a/script.coffee
+++ b/script.coffee
@@ -52,14 +52,15 @@ config =
'Indicate Cross-thread Quotes': [true, 'Add \'(Cross-thread)\' to cross-threads quotes']
'Forward Hiding': [true, 'Hide original posts of inlined backlinks']
filter:
- name: ''
- tripcode: ''
- email: ''
- subject: ''
- comment: ''
- filename: ''
- filesize: ''
- md5: ''
+ name: ''
+ tripcode: ''
+ email: ''
+ subject: ''
+ comment: ''
+ filename: ''
+ dimensions: ''
+ filesize: ''
+ md5: ''
sauces: [
'http://iqdb.org/?url=$1'
'http://www.google.com/searchbyimage?image_url=$1'
@@ -506,6 +507,10 @@ filter =
if file = $ '.filesize > span', root
return file.title
false
+ dimensions: (root) ->
+ if span = $ '.filesize', root
+ return span.textContent.match(/\d+x\d+/)[0]
+ return false
filesize: (root) ->
if img = $ 'img[md5]', root
return img.alt
@@ -1683,6 +1688,7 @@ options =
Subject:
Comment:
Filename:
+ Image dimensions:
Filesize:
Image MD5: