You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
lazyload is a very good product,
we are going to use it in chinese environment now, but it only supports utf8 charset when loading js/css files.
i know that utf8 is the best choice, but in our sites there is lots of old js/css files using non-unicode charsets such as gbk, gb2312, etc.
so i suggest to add custom charset support:
// lazyload.js 2.0.3
// line 218 add:
var charset = '';
var match = url.match(/\[charset=([a-zA-Z0-9-]+)\]$/);
if (match) {
charset = match[1];
url = url.replace(match[0], '');
}
// line 230 change to:
if (charset != '') node.setAttribute('charset', charset);
Thanks
The text was updated successfully, but these errors were encountered:
lazyload is a very good product,
we are going to use it in chinese environment now, but it only supports utf8 charset when loading js/css files.
i know that utf8 is the best choice, but in our sites there is lots of old js/css files using non-unicode charsets such as gbk, gb2312, etc.
so i suggest to add custom charset support:
or
Either one would be fine.
and here is the code for the first form:
Thanks
The text was updated successfully, but these errors were encountered: