misc bug fixes

This commit is contained in:
Alex Adam 2018-03-12 19:52:10 +02:00
parent bc8dfab9b3
commit 9237935f69
6 changed files with 105 additions and 34 deletions

View file

@ -91,6 +91,13 @@ function checkIfBusy(callback) {
});
}
function setIsBusy(isBusy) {
chrome.runtime.sendMessage({
type: "set is busy",
isBusy: isBusy
}, function(response) {});
}
/////
function getCurrentUrl() {
var url = window.location.href;
@ -261,6 +268,8 @@ function getBase64ImgData(srcTxt) {
}
function getXPath(elm) {
if (!elm) return ''
var allNodes = document.getElementsByTagName('*');
for (var segs = []; elm && elm.nodeType === 1; elm = elm.parentNode) {
if (elm.hasAttribute('id')) {