nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: darkreader/darkreader
Pull request #3046 (2020-07-08 18:18:50)

fix for facebook.com
Added one more class for not using blobbed maximize button in movies.

P.S. Would be nice to have option DO NOT USE BLOB and use * in facebook. 😂


Patch:
diff --git a/src/config/dynamic-theme-fixes.config b/src/config/dynamic-theme-fixes.config
index bbf822cf..9d8d843a 100644
--- a/src/config/dynamic-theme-fixes.config
+++ b/src/config/dynamic-theme-fixes.config
@@ -1453,7 +1453,7 @@ img[src*="map"], [style*="map"],
 .sp_zT9aHJDYI11 {
     background-image: url(/rsrc.php/v3/yB/r/99Zvs7cEY2d.png) !important;
 }
-.sp_58eJ3V9_er3 {
+.sp_58eJ3V9_er3, .sp_tUIA9AtJipl {
     background-image: url(/rsrc.php/v3/yd/r/jUiHkRoni5c.png) !important;
 }
 
diff --git a/src/utils/url.ts b/src/utils/url.ts
index e1d7dbfc..7f8590d9 100644
--- a/src/utils/url.ts
+++ b/src/utils/url.ts
@@ -113,6 +113,9 @@ export function isPDF(url: string) {
         if (url.includes('#')) {
             url = url.substring(0, url.lastIndexOf('#'));
         }
+        if (url.match(/(wikipedia|wikimedia).org/i) && url.match(/(wikipedia|wikimedia)\.org\/.*\/[a-z]+\:[^\:\/]+\.pdf/i)) {
+            return false;
+        }
         if (url.endsWith('.pdf')) {
             for (let i = url.length; 0 < i; i--) {
                 if (url[i] === '=') {


Test patch:
diff --git a/tests/url.tests.ts b/tests/url.tests.ts
index e0d0c31f..686de5a0 100644
--- a/tests/url.tests.ts
+++ b/tests/url.tests.ts
@@ -124,6 +124,15 @@ test('URL is enabled', () => {
     expect(isPDF(
         'https://www.google.com/very/good/hidden/folder/pdf#file.pdf'
     )).toBe(false);
+    expect(isPDF(
+        'https://fi.wikipedia.org/wiki/Tiedosto:ExtIPA_chart_(2015).pdf?uselang=en'
+    )).toBe(false);
+    expect(isPDF(
+        'https://commons.wikimedia.org/wiki/File:ExtIPA_chart_(2015).pdf'
+    )).toBe(false);
+    expect(isPDF(
+        'https://upload.wikimedia.org/wikipedia/commons/5/56/ExtIPA_chart_(2015).pdf'
+    )).toBe(true);  
 
     // IPV6 Testing
     expect(isURLEnabled(