mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
wombat: actually enable style overrides, use CSS2Declaration for FF, keep old rule in place for now
This commit is contained in:
parent
5d9081e5d9
commit
8ab342c4ca
@ -81,13 +81,13 @@ rules:
|
|||||||
|
|
||||||
# instagram rules
|
# instagram rules
|
||||||
#=================================================================
|
#=================================================================
|
||||||
# - url_prefix: 'net,cloudfront,'
|
- url_prefix: 'net,cloudfront,'
|
||||||
|
|
||||||
# rewrite:
|
rewrite:
|
||||||
# js_regexs:
|
js_regexs:
|
||||||
# - match: '\burl\((//[^)]+)\)'
|
- match: '\burl\((//[^)]+)\)'
|
||||||
# rewrite: true
|
rewrite: true
|
||||||
# group: 1
|
group: 1
|
||||||
|
|
||||||
- url_prefix: 'com,instagram)/p/'
|
- url_prefix: 'com,instagram)/p/'
|
||||||
|
|
||||||
|
@ -1183,7 +1183,7 @@ var wombat_internal = function($wbwindow) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (orig_getter) {
|
if (orig_getter) {
|
||||||
getter = function(val) {
|
getter = function() {
|
||||||
var res = orig_getter.call(this);
|
var res = orig_getter.call(this);
|
||||||
res = extract_orig(res);
|
res = extract_orig(res);
|
||||||
return res;
|
return res;
|
||||||
@ -1211,7 +1211,7 @@ var wombat_internal = function($wbwindow) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
var getter = function(val) {
|
var getter = function() {
|
||||||
if (orig_getter) {
|
if (orig_getter) {
|
||||||
return orig_getter.call(this);
|
return orig_getter.call(this);
|
||||||
} else {
|
} else {
|
||||||
@ -1240,19 +1240,26 @@ var wombat_internal = function($wbwindow) {
|
|||||||
override_attr($wbwindow.HTMLEmbedElement.prototype, "src", "oe_");
|
override_attr($wbwindow.HTMLEmbedElement.prototype, "src", "oe_");
|
||||||
|
|
||||||
override_anchor_elem();
|
override_anchor_elem();
|
||||||
/*
|
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "cssText");
|
|
||||||
|
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "background", "background");
|
var style_proto = $wbwindow.CSSStyleDeclaration.prototype;
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "backgroundImage", "background-image");
|
|
||||||
|
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "listStyle", "list-style");
|
// For FF
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "listStyleImage", "list-style-image");
|
if ($wbwindow.CSS2Properties) {
|
||||||
|
style_proto = $wbwindow.CSS2Properties.prototype;
|
||||||
|
}
|
||||||
|
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "border", "border");
|
override_style_attr(style_proto, "cssText");
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "borderImage", "border-image");
|
|
||||||
override_style_attr($wbwindow.CSSStyleDeclaration.prototype, "borderImageSource", "border-image-source");
|
override_style_attr(style_proto, "background", "background");
|
||||||
*/ }
|
override_style_attr(style_proto, "backgroundImage", "background-image");
|
||||||
|
|
||||||
|
override_style_attr(style_proto, "listStyle", "list-style");
|
||||||
|
override_style_attr(style_proto, "listStyleImage", "list-style-image");
|
||||||
|
|
||||||
|
override_style_attr(style_proto, "border", "border");
|
||||||
|
override_style_attr(style_proto, "borderImage", "border-image");
|
||||||
|
override_style_attr(style_proto, "borderImageSource", "border-image-source");
|
||||||
|
}
|
||||||
|
|
||||||
//============================================
|
//============================================
|
||||||
function override_anchor_elem() {
|
function override_anchor_elem() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user