Patch to Add WebM to File Extensions Pattern

195 views
Skip to first unread message

Christopher J. Volny

unread,
Sep 6, 2014, 2:30:28 PM9/6/14
to img...@googlegroups.com
--- ./1.67_0/img2tab.js.bak
+++ ./1.67_0/img2tab.js
@@ -33,7 +33,7 @@
  var count = 0;
  for (var i = 0; i < links.length; i ++) {
  var url = links[i].href;
- if (url.match(/.+\.(jpg|gif|png)|.*imgur\.com\/([m]|[a-z]|[A-Z]|[0-9]|[\/]|(.(jpg|gif|png)))+/im)){
+ if (url.match(/.+\.(jpg|gif|png|webm)|.*imgur\.com\/([m]|[a-z]|[A-Z]|[0-9]|[\/]|(.(jpg|gif|png|webm)))+/im)){
  if (inArray(url, imageUrls) == -1){
  var link = links[i].href;
 
Maybe we should look at how to break this extension / domain list out to a config page? Additionally, jpg is sometimes spelled jpeg. Here's a test for adding a ? after the e: http://regex101.com/r/wS4yO1/1

Cheers,
Chris

Chris Schuck

unread,
Sep 14, 2014, 6:28:41 PM9/14/14
to img...@googlegroups.com
How do we apply this patch?
Message has been deleted

Chris Schuck

unread,
Sep 21, 2014, 3:29:53 PM9/21/14
to img...@googlegroups.com
I have ubuntu on a flash drive so I'll at least be able to apply the patch somewhere.  Any way to do this on Windows?

On Sunday, September 14, 2014 7:08:23 PM UTC-5, Christopher J. Volny wrote:
On Linux, save the file somewhere (below it's /tmp/img2tab.webm.patch), find the file that needs patching, use the patch utility, then restart Chrome.

This does the first part:
$ find ~/.config/google-chrome/Default/Extensions/ -iname 'img2tab.js' -execdir patch {} /tmp/img2tab.webm.patch \;

Then just kill Chrome's tray icon (Super+M, Quit) and restart. Should work.


Christopher J. Volny 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
419-667-6752 (mobile)
cvo...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "img2tab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/img2tab/dvQ3uAxyL-M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to img2tab+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher J. Volny

unread,
Sep 21, 2014, 4:09:48 PM9/21/14
to img...@googlegroups.com

http://superuser.com/questions/264984/gui-tool-for-applying-patch-files-for-windows

For diffs I use Meld which has a windows exe, maybe it can apply patches too.

Worst case, grab the win32 gnu utils package (should include diff and patch). Lots of useful tools there.

~Chris

Sumeet Patel

unread,
Dec 10, 2015, 3:54:19 PM12/10/15
to img2tab
Hey guys, 

I have updated the extension for chrome and included this patch. (v1.72+)

Thanks for the feedback.
Reply all
Reply to author
Forward
0 new messages