From 9333ebc8434d83c0f6f03aef5d9639a27448e9a2 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Fri, 3 Jul 2015 11:53:45 -0700 Subject: [PATCH] rules: tweak better twitter rules, more limited custom rules, hopefully fix inline video --- pywb/rules.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pywb/rules.yaml b/pywb/rules.yaml index 2ea6bf46..3d008831 100644 --- a/pywb/rules.yaml +++ b/pywb/rules.yaml @@ -6,16 +6,21 @@ rules: fuzzy_lookup: '/profiles/show/.*with_replies\?.*(max_id=[^&]+)' -# - url_prefix: 'com,twimg,abs)/c/' - -# rewrite: -# js_rewrite_location: urls - - - - url_prefix: 'com,twimg,ton)/' + - url_prefix: 'com,twimg,abs)/c/swift/en/bundle/boot' rewrite: js_rewrite_location: urls + js_regexs: + - match: 'window.location' + replace: 'window.WB_wombat_location' + + - match: 'document.location' + replace: 'document.WB_wombat_location' + + #- url_prefix: 'com,twimg,ton)/' + + # rewrite: + # js_rewrite_location: all - url_prefix: 'com,twimg,amp)/amplify-web-player/prod/js/build.min.js'