mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-10 09:24:49 +00:00
misc bug fixes
This commit is contained in:
parent
5f01a960f1
commit
f76512d55b
2 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,7 @@ chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
|
||||||
if (request.type === 'get include style') {
|
if (request.type === 'get include style') {
|
||||||
chrome.storage.local.get('includeStyle', function (data) {
|
chrome.storage.local.get('includeStyle', function (data) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
sendResponse({includeStyle: true});
|
sendResponse({includeStyle: false});
|
||||||
} else {
|
} else {
|
||||||
sendResponse({includeStyle: data.includeStyle});
|
sendResponse({includeStyle: data.includeStyle});
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,9 @@ document.getElementById("applyStyle").onclick = function() {
|
||||||
currentWindow: true,
|
currentWindow: true,
|
||||||
active: true
|
active: true
|
||||||
}, function(tab) {
|
}, function(tab) {
|
||||||
|
if (!currentStyle || !currentStyle.style) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
chrome.tabs.insertCSS(tab[0].id, {code: currentStyle.style});
|
chrome.tabs.insertCSS(tab[0].id, {code: currentStyle.style});
|
||||||
appliedStyles.push(currentStyle);
|
appliedStyles.push(currentStyle);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue