diff --git a/POV Cam/injection.js b/POV Cam/injection.js index 64c8244..d458dd4 100644 --- a/POV Cam/injection.js +++ b/POV Cam/injection.js @@ -72,9 +72,9 @@ function modifyPage() { }); // Add link to go to the options page - var sogb = getSOGB(outerContainer); + var SOLinkContainer = getStartOverLinkContainer(); - if (sogb) { + if (SOLinkContainer) { var optionsLink = document.createElement("a"); optionsLink.href = chrome.extension.getURL("options/options.html"); optionsLink.innerText = "POV Cam Options"; @@ -82,7 +82,7 @@ function modifyPage() { optionsLink.style["font-size"] = "10px"; optionsLink.style.display = "block"; - sogb.parentElement.insertBefore(optionsLink, sogb); + SOLinkContainer.parentElement.insertBefore(optionsLink, SOLinkContainer); } } diff --git a/POV Cam/mspaintadventures-page-elements.js b/POV Cam/mspaintadventures-page-elements.js index 362c360..a020fa8 100644 --- a/POV Cam/mspaintadventures-page-elements.js +++ b/POV Cam/mspaintadventures-page-elements.js @@ -76,12 +76,11 @@ function getStandardNextPageLink() { return linkContainer; } -function getSOGB(container) { - // sogb = Start Over | Go Back - var sogb = container.querySelector("a[href='?s=6']"); - if (sogb) { - sogb = sogb.parentElement.parentElement; +function getStartOverLinkContainer() { + var SOLink = document.querySelector("a[href$='?s=6']"); + if (SOLink) { + SOLink = SOLink.parentElement.parentElement; - return sogb; + return SOLink; } }