fixed infinite retry messages

This commit is contained in:
fourtf 2018-05-30 17:30:31 +02:00
parent 3c9c3493ae
commit 452014019f
2 changed files with 14 additions and 8 deletions

View file

@ -8,9 +8,6 @@ const ignoredPages = {
"directory": true,
};
let popup = chrome.extension.getViews({type: "popup"})[0];
popup.window.getElementById("status").innerHTML = "NaM";
/// return channel name if it should contain a chat
function matchChannelName(url) {
if (!url)

View file

@ -73,12 +73,21 @@
}
// nav bar
if (rightCollapseButton && !installedObjects.topNav) {
let x = findRightCollapse();
if (!installedObjects.topNav) {
if (rightCollapseButton) {
let x = findNavBar();
installedObjects.topNav = true;
} else {
retry = true;
x.addEventListener("mouseup", () => {
if (!isCollapsed) {
let collapse = findRightCollapse();
collapse.click();
}
});
installedObjects.topNav = true;
} else {
retry = true;
}
}
// retry if needed