NotHereToPlayGames Posted April 29, 2022 Author Share Posted April 29, 2022 Could also be a content-type issue. If memory serves, your config is a "start-from-scratch" config because the Swiss Army Knife has too many knives. Can you filter ANY .js files with your config? 1 Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted April 29, 2022 Author Share Posted April 29, 2022 On 4/27/2022 at 9:01 AM, UCyborg said: They're supposed to replace: /(?:reddit\.com\/r\/)(?<subreddit>[\w]+)(?:\/comments\/)?(?<postId>[\w]+)?/ /(?:reddit\.com\/r\/)([\w]+)(?:\/comments\/)?([\w]+)?/ And: var s;const{subreddit:o,postId:r}=(null===(s=t.match(i))||void 0===s?void 0:s.groups)||{}; const s=t.match(i),o=null===s[1]?void 0:s[1],r=null===s[2]?void 0:s[2]; 1st line is original, 2nd is replacement. These both work as-is for me -- Link to comment Share on other sites More sharing options...
UCyborg Posted April 29, 2022 Share Posted April 29, 2022 (edited) 6 hours ago, NotHereToPlayGames said: Could also be a content-type issue. Ohhh, thanks for the hint! Putting application/x-javascript instead of application/javascript works. Both are considered legacy though (https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types - Legacy JavaScript MIME types): Note: Even though any given user agent may support any or all of these, you should only use text/javascript. It's the only MIME type guaranteed to work now and into the future. 6 hours ago, NotHereToPlayGames said: If memory serves, your config is a "start-from-scratch" config because the Swiss Army Knife has too many knives. Yup, I'm clumsy and don't want to cut myself. Those rules from the starting point config break JS left and right on that site. 6 hours ago, NotHereToPlayGames said: Can you filter ANY .js files with your config? Sure can, this was the odd one, all because of MIME type. Edited April 29, 2022 by UCyborg Link to comment Share on other sites More sharing options...
UCyborg Posted April 30, 2022 Share Posted April 30, 2022 (edited) On 4/29/2022 at 3:14 PM, NotHereToPlayGames said: My initial hunch is that you have to 'escape' the "=" characters. Yes, that would be better for consistency since expecting minified JS and escaped = is taken as literal without the added documented behavior. On 4/29/2022 at 10:07 PM, UCyborg said: Ohhh, thanks for the hint! Putting application/x-javascript instead of application/javascript works. Now I've put that MIME-List into use and added the following rule: In = TRUE Out = FALSE Key = "Content-Type: Fix MIME types" Match = "(*|(^?))$URL([^/]+*.([a-z0-9]+{2,5}&&$LST(MIME-List))((^?)|\?))" Replace = "\0" Edited April 30, 2022 by UCyborg Threw out HTTP:// bit Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted April 30, 2022 Author Share Posted April 30, 2022 Out of curiosity, how many "filters" are you up to? Link to comment Share on other sites More sharing options...
UCyborg Posted April 30, 2022 Share Posted April 30, 2022 I currently use 14 filters in total. Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted April 30, 2022 Author Share Posted April 30, 2022 Ah, guess I assumed you were kinda building a new "swiss army knife", but I'd call 14 basically just site-dependent and not "global". 1 Link to comment Share on other sites More sharing options...
UCyborg Posted May 2, 2022 Share Posted May 2, 2022 Oops, byte limit starts counting from where the match is found. Why did I bother counting preceding bytes? Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted May 2, 2022 Author Share Posted May 2, 2022 On 4/27/2022 at 9:01 AM, UCyborg said: [Patterns] Name = "Reddit - comments page regex 1" Active = TRUE URL = "www.redditstatic.com/desktop2x/CommentsPage.*.js" Limit = 127300 Match = "/\(\?:reddit\\.com\\/r\\/\)\(\?<subreddit>\[\\w\]\+\)\(\?:\\/comments\\/\)\?\(\?<postId>\[\\w\]\+\)\?/" Replace = "/\(\?:reddit\\.com\\/r\\/\)\(\[\\w\]\+\)\(\?:\\/comments\\/\)\?\(\[\\w\]\+\)\?/" Name = "Reddit - comments page regex 2" Active = TRUE URL = "www.redditstatic.com/desktop2x/CommentsPage.*.js" Limit = 127700 Match = "var s;const{subreddit:o,postId:r}=\(null===\(s=t.match\(i\)\)\|\|void 0===s\?void 0:s.groups\)\|\|{};" Replace = "const s=t.match\(i\),o=null===s\[1\]\?void 0:s\[1\],r=null===s\[2\]\?void 0:s\[2\];" Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted May 2, 2022 Author Share Posted May 2, 2022 15 minutes ago, UCyborg said: byte limit starts counting from where the match is found. I wondered why your filter limits were set so high. Link to comment Share on other sites More sharing options...
UCyborg Posted May 2, 2022 Share Posted May 2, 2022 Yeah, misunderstood documentation. I've put those two to 128 now. Link to comment Share on other sites More sharing options...
OutlawHusbando Posted November 20, 2022 Share Posted November 20, 2022 Great topic, I'm a fan of Proximitron and Scott's godly work (sadly I'll never be able to meet him), hope you'll update this thread. Link to comment Share on other sites More sharing options...
UCyborg Posted February 2 Share Posted February 2 One thing that one would think would be simple...how do I write a Web Page filter that applies to "localhost" and "localhost/*.html"? If I write "localhost", then it'll match EVERY file coming from localhost, but I only want the root page and whatever other network requests for files end with .html. Link to comment Share on other sites More sharing options...
NotHereToPlayGames Posted February 2 Author Share Posted February 2 Hmm. I haven't tried that and can't from here at work. You can use header filters "inside" of a web page filter, only if the header is "true" is the web page filter applied. 1 Link to comment Share on other sites More sharing options...
UCyborg Posted February 2 Share Posted February 2 (edited) Looks like I can use: localhost/ $TYPE(htm) Had no idea about it - somehow this page was hiding from me: https://proxomitron.info/45/help/Matching-Commands.html (linked from https://proxomitron.info/45/help/Matching-Rules.html) https://www.prxbx.com/forums/showthread.php?tid=2074 Edited February 2 by UCyborg 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now