Commit 4c76b67e authored by Jim Tittsler's avatar Jim Tittsler
Browse files

Handle WikiEducator pages not in outline

Fixes #29
parent b036d976
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -280,6 +280,11 @@ function processPage(pi) {
      var orig = $(this).attr("href");
      if (urls.hasOwnProperty(orig)) {
        $(this).attr("href", urls[orig]);
      } else {
        // other WikiEducator relative pages that are not in the outline
        if (orig && orig.indexOf('//') === -1) {
          $(this).attr("href", '//wikieducator.org' + orig);
        }
      }
    });

+5 −0
Original line number Diff line number Diff line
@@ -312,6 +312,11 @@ function processPage(pi) {
      var orig = $(this).attr("href");
      if (urls.hasOwnProperty(orig)) {
        $(this).attr("href", urls[orig]);
      } else {
        // other WikiEducator relative pages that are not in the outline
        if (orig && orig.indexOf('//') === -1) {
          $(this).attr("href", '//wikieducator.org' + orig);
        }
      }
    });

+0 −7
Original line number Diff line number Diff line
@@ -475,13 +475,6 @@ module.exports = {
      .addClass("img-responsive");
    // Template:Pdf has some special cases
    $(".pdfdown").each(function() {
      // site relative URLs
      $(this).find("a").each(function() {
        let url = $(this).attr("href");
        if (url && url.indexOf("//") === -1) {
          $(this).attr("href", "//wikieducator.org" + url);
        }
      });
      // override Bootstrap's img block
      $(this)
        .find('img[alt="PDF down.png"]')
+0 −7
Original line number Diff line number Diff line
@@ -435,13 +435,6 @@ ${idbody}
    });
    // Template:Pdf has some special cases
    $(".pdfdown").each(function() {
      // site relative URLs
      $(this).find("a").each(function() {
        let url = $(this).attr("href");
        if (url && url.indexOf("//") === -1) {
          $(this).attr("href", "//wikieducator.org" + url);
        }
      });
      // override Bootstrap's img block
      $(this)
        .find('img[alt="PDF down.png"]')