Skip to content

Commit

Permalink
Modify trickster section detection (and sucker replacement)
Browse files Browse the repository at this point in the history
  • Loading branch information
madman-bob committed Apr 14, 2018
1 parent fd00a5e commit ead69a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions POV Cam/next-page-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ function createLink(linkData) {

var link = destinationLink.createLinkElement(nextPageCaption);

if ((document.location.pathname == "/trickster.php") && (destinationLink.pageCaption.indexOf("==>") != -1)) {
var originalSucker = document.querySelector("img[src*='sucker']");

if (originalSucker && (destinationLink.pageCaption.indexOf("==>") != -1)) {
// In trickster section, replace "==>" in page name with sucker image
link.innerHTML = destinationLink.pageCaption.replace("==>", "");

var sucker = document.createElement("img");
sucker.src = "http://mspaintadventures.com/images/trickster_sitegraphics/sucker.gif";
sucker.src = originalSucker.src;
sucker.style.backgroundColor = linkData.colour;
sucker.style.boxShadow = "0px 0px 2px 2px " + linkData.colour;

Expand Down

0 comments on commit ead69a5

Please sign in to comment.