1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

wombat work:

- for prototype override, ensure object exists
- for domain setter, ensure location exists, default to window
rules: expand facebook rule to match fbid also
This commit is contained in:
Ilya Kreymer 2017-08-22 13:51:10 -07:00
parent 7ddd3296ad
commit b2f3a580c2
2 changed files with 11 additions and 2 deletions

View File

@ -59,7 +59,8 @@ rules:
#=================================================================
- url_prefix: 'com,facebook)/ajax/pagelet/generic.php/'
fuzzy_lookup: 'com,facebook\)/.*[?&]data=(.*?(?:[&]|query_type[^,]+))'
#fuzzy_lookup: 'com,facebook\)/.*[?&]data=(.*?(?:[&]|query_type[^,]+))'
fuzzy_lookup: 'com,facebook\)/.*[?&]data=(.*?(?:[&]|(?:query_type|fbid)[^,]+))'
- url_prefix: 'com,facebook)/ajax/ufi/'

View File

@ -2138,6 +2138,9 @@ var _WBWombat = function($wbwindow, wbinfo) {
//============================================
function override_func_this_proxy_to_obj(cls, method) {
if (!cls || !cls.prototype) {
return;
}
var prototype = cls.prototype;
var orig = prototype[method];
@ -2150,6 +2153,9 @@ var _WBWombat = function($wbwindow, wbinfo) {
//============================================
function override_func_first_arg_proxy_to_obj(cls, method) {
if (!cls || !cls.prototype) {
return;
}
var prototype = cls.prototype;
var orig = prototype[method];
@ -2415,7 +2421,9 @@ var _WBWombat = function($wbwindow, wbinfo) {
// domain
var domain_setter = function(val) {
if (ends_with(this._WB_wombat_location.hostname, val)) {
var loc = this._WB_wombat_location || this.defaultView._WB_wombat_location;
if (loc && ends_with(loc.hostname, val)) {
this.__wb_domain = val;
}
}