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);
|
||||
}
|
||||
},
|
||||
addStyle: function(css, type) {
|
||||
addStyle: function(css) {
|
||||
var style;
|
||||
style = type === 'style' || !window.URL ? $.el('style', {
|
||||
style = $.el('style', {
|
||||
textContent: css
|
||||
}) : $.el('link', {
|
||||
rel: 'stylesheet',
|
||||
href: URL.createObjectURL(new Blob([css], {
|
||||
type: 'text/css'
|
||||
}))
|
||||
});
|
||||
$.asap((function() {
|
||||
return d.head;
|
||||
@ -4453,7 +4448,7 @@
|
||||
if (checked) {
|
||||
$.on(window, 'resize', ImageExpand.resize);
|
||||
if (!ImageExpand.style) {
|
||||
ImageExpand.style = $.addStyle(null, 'style');
|
||||
ImageExpand.style = $.addStyle(null);
|
||||
}
|
||||
return ImageExpand.resize();
|
||||
} else {
|
||||
|
||||
11
lib/$.coffee
11
lib/$.coffee
@ -88,14 +88,9 @@ $.extend $,
|
||||
cb()
|
||||
else
|
||||
setTimeout $.asap, 25, test, cb
|
||||
addStyle: (css, type) ->
|
||||
style = if type is 'style' or !window.URL
|
||||
$.el 'style',
|
||||
textContent: css
|
||||
else
|
||||
$.el 'link',
|
||||
rel: 'stylesheet'
|
||||
href: URL.createObjectURL new Blob([css], type: 'text/css')
|
||||
addStyle: (css) ->
|
||||
style = $.el 'style',
|
||||
textContent: css
|
||||
$.asap (-> d.head), ->
|
||||
$.add d.head, style
|
||||
style
|
||||
|
||||
@ -2948,7 +2948,7 @@ ImageExpand =
|
||||
if checked
|
||||
$.on window, 'resize', ImageExpand.resize
|
||||
unless ImageExpand.style
|
||||
ImageExpand.style = $.addStyle null, 'style'
|
||||
ImageExpand.style = $.addStyle null
|
||||
ImageExpand.resize()
|
||||
else
|
||||
$.off window, 'resize', ImageExpand.resize
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user