Epub阅读器0.0.1

This commit is contained in:
shen
2026-05-21 19:40:51 +08:00
commit daa36d8fe7
559 changed files with 106266 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
window.cssInjector = {
inject: function(json) {
Object.keys(json).forEach(function(identifier) {
var style = document.getElementById(identifier)
if (!style) {
var style = document.createElement('style');
style.type = 'text/css';
style.setAttribute('id', identifier);
}
style.innerHTML = json[identifier]
document.getElementsByTagName('head')[0].appendChild(style);
});
},
remove: function(identifier) {
var style = document.getElementById(identifier)
if (style) {
style.parentNode.removeChild(style)
}
},
}