Don't actually use Blob URL'd stylesheets, they don't get cleared automatically when navigating.
This commit is contained in:
parent
eee15f192e
commit
df81ea3815
@ -742,15 +742,10 @@
|
|||||||
return setTimeout($.asap, 25, test, cb);
|
return setTimeout($.asap, 25, test, cb);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addStyle: function(css, type) {
|
addStyle: function(css) {
|
||||||
var style;
|
var style;
|
||||||
style = type === 'style' || !window.URL ? $.el('style', {
|
style = $.el('style', {
|
||||||
textContent: css
|
textContent: css
|
||||||
}) : $.el('link', {
|
|
||||||
rel: 'stylesheet',
|
|
||||||
href: URL.createObjectURL(new Blob([css], {
|
|
||||||
type: 'text/css'
|
|
||||||
}))
|
|
||||||
});
|
});
|
||||||
$.asap((function() {
|
$.asap((function() {
|
||||||
return d.head;
|
return d.head;
|
||||||
@ -4453,7 +4448,7 @@
|
|||||||
if (checked) {
|
if (checked) {
|
||||||
$.on(window, 'resize', ImageExpand.resize);
|
$.on(window, 'resize', ImageExpand.resize);
|
||||||
if (!ImageExpand.style) {
|
if (!ImageExpand.style) {
|
||||||
ImageExpand.style = $.addStyle(null, 'style');
|
ImageExpand.style = $.addStyle(null);
|
||||||
}
|
}
|
||||||
return ImageExpand.resize();
|
return ImageExpand.resize();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
11
lib/$.coffee
11
lib/$.coffee
@ -88,14 +88,9 @@ $.extend $,
|
|||||||
cb()
|
cb()
|
||||||
else
|
else
|
||||||
setTimeout $.asap, 25, test, cb
|
setTimeout $.asap, 25, test, cb
|
||||||
addStyle: (css, type) ->
|
addStyle: (css) ->
|
||||||
style = if type is 'style' or !window.URL
|
style = $.el 'style',
|
||||||
$.el 'style',
|
textContent: css
|
||||||
textContent: css
|
|
||||||
else
|
|
||||||
$.el 'link',
|
|
||||||
rel: 'stylesheet'
|
|
||||||
href: URL.createObjectURL new Blob([css], type: 'text/css')
|
|
||||||
$.asap (-> d.head), ->
|
$.asap (-> d.head), ->
|
||||||
$.add d.head, style
|
$.add d.head, style
|
||||||
style
|
style
|
||||||
|
|||||||
@ -2948,7 +2948,7 @@ ImageExpand =
|
|||||||
if checked
|
if checked
|
||||||
$.on window, 'resize', ImageExpand.resize
|
$.on window, 'resize', ImageExpand.resize
|
||||||
unless ImageExpand.style
|
unless ImageExpand.style
|
||||||
ImageExpand.style = $.addStyle null, 'style'
|
ImageExpand.style = $.addStyle null
|
||||||
ImageExpand.resize()
|
ImageExpand.resize()
|
||||||
else
|
else
|
||||||
$.off window, 'resize', ImageExpand.resize
|
$.off window, 'resize', ImageExpand.resize
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user