1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 23:19:52 +01:00

61 Commits

Author SHA1 Message Date
Ilya Kreymer
5072ed568c fix typos: wombat: fix rewrite not being called on setter
frame_insert: ensure <iframe> has separate close tag
recordloader: ensure length used as string
2015-05-14 22:32:07 -07:00
Ilya Kreymer
72982829bd postMessage: check for rewitten message 2015-05-14 22:32:07 -07:00
Ilya Kreymer
160794e4ec wombat: add options to disable worker override, use mutation observers instead of setAttribute() override 2015-04-27 00:43:10 -07:00
Ilya Kreymer
904b4265e9 wombat typo fix 2015-04-26 18:28:05 -07:00
Ilya Kreymer
a88acb7476 wombat work: add option to use MutationObserver instead of setAttribute override
use original setAttribute when calling internally
use querySelectorAll for child element rewrite selection
add check for ':port' being dropped from host url and attempt to add back in
2015-04-24 22:09:08 -07:00
Ilya Kreymer
d9bd47ea77 wombat: disable always remove slash in extract_orig, as this may break urls that depend
on it (and they are different urls anyway)
2015-04-20 17:46:03 -07:00
Randall Leeds
2776d5d0b4 Fix typo in handling of no_rewrite_prefixes 2015-04-17 20:03:36 -07:00
Ilya Kreymer
74c6b60d5e wombat customization: pass custom options from config.yaml 'rewrite_opts.client' as a json obj
to wombat.js #96
currently supporting no_rewrite_prefixes, and skipping dom, setAttribute and postmessage overrides
(used by via.hypothes.is) -- other options to be added later
2015-04-16 12:24:01 -07:00
Ilya Kreymer
2e4427100c wombat init refactor: init wbinfo first, then pass wbinfo to wombat
to allow for additional options for wombat, in prep for #96
2015-04-16 11:51:25 -07:00
Ilya Kreymer
ac06a49d4a fixes: add correct path for frame_mod and replay_mod
wombat: copy Date prototype to appeace 'instanceof Date' check
2015-04-04 17:31:51 -07:00
Ilya Kreymer
3dd600c530 wombat: improve document.write override to write each elem at a time for body as well as head, #82 2015-03-24 10:46:10 -07:00
Ilya Kreymer
5b4d12eb05 wombat: fix wombat_location.href assign when url is already rewritten, compare against current url not passed in url
fixes ikreymer/pywb-webrecorder#9
2015-03-23 16:12:58 -07:00
Ilya Kreymer
26df8d7784 remove debug logging and spaces 2015-02-19 01:17:31 -08:00
Ilya Kreymer
f9452bf48e rewrite: refactor IDN support: instead of returning IRI, return utf-8 %-encoded url
remove support for  returning IRI, as that requires detecting charset, instead just use %-encoded form
and let browser decode. Should address #66

Add rewrite option 'punycode_links_only' (default to false) to skip the %-encoded conversion of host, and just return punycode.

wombat: use getAttribute('href') on <a> tag to get original url, not punycode version

replay: add extra sanity check on Location header to ensure utf-8
2015-02-14 17:26:39 -08:00
Ilya Kreymer
dcf3688dc3 wombat: also override frameElement when changing window.parent for top-level replay frame 2015-02-11 19:26:45 -08:00
Ilya Kreymer
f068186e37 wombat: replace window.self -> window for clarity 2015-02-11 15:01:04 -08:00
Ilya Kreymer
148651680a wombat fix: use __orig_parent when referencing top-frame, since window.parent is being overriden 2015-02-10 15:02:08 -08:00
Ilya Kreymer
78ae86b6b6 Merge branch 'master' for 0.7.8 into develop 2015-02-05 08:45:55 -08:00
Ilya Kreymer
c47d3ca925 wombat: add mutation observers, addressing #71 and maybe #67
rules: fix regex for yt, add rx for wikimedia
2015-02-03 11:19:41 -08:00
Ilya Kreymer
7e017fd85e rewrite fixes: don't rewrite window.parent as it is overridable directly
html rewriter: ensure style is rewritten for all elements, add test!
wombat: cleanup and additional checks for assign(), setAttribute()
2015-01-29 20:08:00 -08:00
Ilya Kreymer
043ad5c860 wombat: improve createElementNS override to set prototype, just assign
window.parent directly
2015-01-29 10:13:32 -08:00
Ilya Kreymer
ccedb2d60e regex_rewrite: add 'parent' rewrite in addition to 'top' for frames, add
WB_wombat_parent to wombat, add test for WB_wombat_parent
2015-01-27 19:57:56 -08:00
Ilya Kreymer
976decb3f1 wombat: ensure document.write override handles elements that go into
head as well as body
2015-01-27 18:02:14 -08:00
Ilya Kreymer
c9b2e3e69e wombat 2.2 improvements:
* for postMessage, add receive message overrides which uses original origin
to fix message passing tests that check for origin

* for createElementNS, ensure that the namespace url is not rewritten

* add equals_any() method, add "poster" attr to attr rewriting list

(solves several issues for vine replay, #62)
2015-01-22 16:43:52 -05:00
Ilya Kreymer
06b2ea498e setup: set zipSafe to true to allow bundling egg in installer 2015-01-09 22:57:21 -08:00
Ilya Kreymer
205aeca4a1 bump version to 0.7.3
rewrite: add additional tags for client side src rewrite, add missing
tags to server-side html rewrite
2015-01-04 17:32:58 -08:00
Ilya Kreymer
4aabba559c vidrw: refactor object/embed adding code into seperate functions for
iterating over tags, allows for reuse with setInterval (not yet added)
2014-12-18 13:22:03 -08:00
Ilya Kreymer
f3dc256503 wombat: also rewrite src= in video and audio tags 2014-12-18 13:18:22 -08:00
Ilya Kreymer
3e3a74619f various fixes: wombat: add Date.UTC and Date.parse
rewrite: support vi_ https -> metadata
video: fallback to vi_ call on current page
remove debug logging
2014-11-25 00:21:28 -08:00
Ilya Kreymer
4b7186a62e wombat: adjust date for timezone! 2014-11-24 13:46:50 -08:00
Ilya Kreymer
f4431c0872 wombat: add extra check for correct scheme for ajax open 2014-11-23 18:44:11 -08:00
Ilya Kreymer
c6a2c83b66 rangecache: always bound range, set default bound of 16384
wombat: work on date override, disable for now
head_insert: check for wombat not being inited to avoid undef error
2014-11-05 10:55:46 -08:00
Ilya Kreymer
88f553dce7 video work: live rewrite pings proxy with full rewrite, proxies direct
range request
reorg rangecache to support is_range() check, yt-specific logic
(experimental)
wombat: add date override (experimental)
bump tentative version to 0.7.0!
yt replays work with native player! (though still issues remain)
2014-11-04 22:11:25 -08:00
Ilya Kreymer
ced94d289d wombat: add generic setAttribute override for href and src, Image object
override, src prop rewrite
2014-11-02 16:09:56 -08:00
Ilya Kreymer
50cae15663 wombat: add wombat class to window 2014-11-01 15:41:00 -07:00
Ilya Kreymer
5b9dcba15f video: add video rewriting use vidrw client side and youtube-dl on the server
add vi_ modifier:
-on record, gets video_info from youtube-dl, sends to proxy,
if any, via PUTMETA to create metadata record
-on playback, fetches special metadata record with video info and
returns to client as json
-vidrw script: fetches video info, if any, and attempts to replace
iframe and embed tags (so far) which are videos
wombat: export extract_url function, fix spaces and use object instance
semantics
2014-11-01 15:41:00 -07:00
Ilya Kreymer
67e94d13f4 handlers/wombat: pass in mod to wombat, ability to customize modifier
for embeds
2014-10-24 12:45:41 -07:00
Ilya Kreymer
729320393a update license statement in js files with github link 2014-10-18 15:18:40 -07:00
Ilya Kreymer
4a1cc46fa3 framed replay: invert framed replay paradigm, replay always uses
canonical, no-modifier archival url (instead of mp_).
When using frames, the page redirects to a 'tf_' page, which then uses
replaceHistory() to change url back to canonical form.
memento: support for framed replay, include memento headers in top frame
bump version to 0.6.2
2014-10-18 11:21:07 -07:00
Ilya Kreymer
7feb0893eb rewrite: add 'application/json' to a seperate 'json' regex rewriter type (rewrite links only, no
http), can be customized via rules
wombat: add rewrite_style for rewriting style attrs
query: don't include any filter in latest, custom filter can be used
without any other filters
tests: fix typos in tests
2014-09-30 10:57:25 -07:00
Ilya Kreymer
b68ef06067 banner: add back inner frame update of banner on load, if html
rewrite: banner only mode encodes to utf-8, adjusts length
2014-08-05 10:12:54 -07:00
Ilya Kreymer
950673908d proxy: fix wombat.js to work in proxy mode! rewrite only https -> http 2014-07-21 14:41:49 -07:00
Ilya Kreymer
fa52e0126d cookies: support client side rewriting of document.cooke -> WB_wombat_cookie to rewrite cookie path, if present 2014-07-15 12:52:42 -07:00
Ilya Kreymer
22a2da6e0c rewrite: for WB_wombat_top rewriting, select next-to-top instead of self 2014-06-16 19:42:15 -07:00
Ilya Kreymer
41e1809039 update wombat.js (support for write override, fill in WB_wombat_location on new iframe)
disable 307 redirects as FF always displays modal confirmation for these, even for same host
2014-06-11 20:12:05 -07:00
Ilya Kreymer
bdafe0938d remove accidental debug commits 2014-06-11 12:44:49 -07:00
Ilya Kreymer
e2349a74e2 replay: better POST support via post query append!
record_loader can optionally parse 'request' records
archiveindexer has -a flag to write all records ('request' included),
-p flag to append post query
post-test.warc.gz and cdx
POST redirects using 307
2014-06-10 19:21:46 -07:00
Ilya Kreymer
52040127b3 update wombat.js to latest
rewrite live: add another rewrite live header,
use 307 for archival referer based redirects
2014-05-30 11:03:22 -07:00
Ilya Kreymer
8758e60590 update to latest wombat.js 2014-05-16 09:58:07 -07:00
Ilya Kreymer
09653cf77e rewrite: more nuanced 'top' rewriting, fix wombat frame mode detection 2014-04-26 18:43:25 -07:00