Reddit Filter Plus

By burger Last update Nov 17, 2011 — Installed 4,670 times.

Fix for user filter

in
Subscribe to Fix for user filter 1 post, 1 voice

jackthecoiner User
FirefoxMacintosh

I needed to make this change in order for the user-based filtering to work:

jackthecoiner$ diff -U4 -p redditfilterplus.user.js mine.js
--- redditfilterplus.user.js	2010-02-01 10:05:58.000000000 -0800
+++ mine.js	2010-02-01 10:11:12.000000000 -0800
@@ -176,9 +176,9 @@ rf_doFilter = function()
           // user match
           for (var l = 0; !match && l < filter.user.length; ++l) {
             var pattern = filter.user[l];
             
-            if (pattern == link.href.toLowerCase()) {
+            if (pattern.match(link.href.toLowerCase())) {
               match = true;
               break;
             }
           }// [end]for each user

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel