Commit c334001e authored by Dave Lane's avatar Dave Lane
Browse files

attempts to find anchor link problem, where wikieducator link isn't replace by WP link.

parent 57dfb715
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
/* jshint node: true, multistr: true, trailing: true, esnext: true */
"use strict";

const VERSION = "1.1.0",
const VERSION = "1.1.1",
  JQUERY = "http://code.jquery.com/jquery-2.1.1.min.js",
  FILEPATH = "/home/www/www";

@@ -30,7 +30,7 @@ var pages = [], // list of page URLs to be processed
  urls = {}, // map of original URLs to course URLs
  parent_ids = {}, // map from URL to wp page id
  pi = 0, // process index
  base_url = "http://wikieducator.org", // no trailing slash
  base_url = "https://wikieducator.org", // no trailing slash
  wp,
  opt,
  options = {};
+4 −1
Original line number Diff line number Diff line
@@ -119,7 +119,10 @@ $(function() {
  }

  // activate the current location in the SCAN page
  loc = window.location.href.replace('http://wikieducator.org', '');
  //loc = window.location.href.replace('http://wikieducator.org', '');
  old = window.location.href;
  loc = window.location.href.replace('wikieducator.org', '');
  console.log('************* old:'+old+'->loc:'+loc);
  $('#scanpage a[href="' + loc + '"]').addClass('active')
      .addClass('btn-success')
      .removeClass('btn-primary')
+6 −6
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ module.exports = {
      .attr("src")
      .replace("/icons/", "/buttons/");
    var footerlogo = "",
      contentURL = `http://WikiEducator.org${outlineItem.wkpage}`;
      contentURL = `https://wikieducator.org${outlineItem.wkpage}`;
    if (opt["--logo"]) {
      footerlogo = `<img src="${opt[
        "--logo"
@@ -59,8 +59,8 @@ module.exports = {
<footer>
[oeru_advanced_footer content='${footerlogo}
<a href="${contentURL}" title="original content in WikiEducator" target="WikiEducator">Content</a> is available under the
<a rel="license" href="http://WikiEducator.org/WikiEducator:Copyrights" title="WikiEducator:Copyrights">Creative Commons Attribution Share Alike License</a>.
<a href="http://wikieducator.org/WikiEducator:Privacy_policy">Privacy Policy</a> | <a href="http://wikieducator.org${outlineItem.wkpage}?action=history">Authors</a><a href="http://creativecommons.org/licenses/by-sa/3.0/"><img class="cc" src="${iconsrc}" alt="Creative Commons Attribution Share-Alike License"></a>']
<a rel="license" href="https://wikieducator.org/WikiEducator:Copyrights" title="WikiEducator:Copyrights">Creative Commons Attribution Share Alike License</a>.
<a href="https://wikieducator.org/WikiEducator:Privacy_policy">Privacy Policy</a> | <a href="https://wikieducator.org${outlineItem.wkpage}?action=history">Authors</a><a href="http://creativecommons.org/licenses/by-sa/3.0/"><img class="cc" src="${iconsrc}" alt="Creative Commons Attribution Share-Alike License"></a>']
</footer>`);
    $("footer img.cc").attr("src", iconsrc);
  },
@@ -393,7 +393,7 @@ ${idbody}
      $("a.image").each(function() {
        var dst = $(this).attr("href");
        if (dst.indexOf("/File:") === 0) {
          $(this).attr("href", "http://WikiEducator.org" + dst);
          $(this).attr("href", "https://wikieducator.org" + dst);
        }
      });
      // FIXME images should be uploaded to Wordpress rather than hotlinked
@@ -413,7 +413,7 @@ ${idbody}
          dst.charAt(0) === "/" &&
          dst.charAt(1) !== "/"
        ) {
          dst = "//WikiEducator.org" + dst;
          dst = "//wikieducator.org" + dst;
          $(this).attr("src", dst);
          // FIXME rewrite sourceset srcs rather than removing them
          $(this).removeAttr("srcset");
@@ -431,7 +431,7 @@ ${idbody}
    );
    // Special: pages link directly to the wiki
    $('a[href^="/Special"]').each(function() {
      $(this).attr("href", "http://WikiEducator.org" + $(this).attr("href"));
      $(this).attr("href", "https://wikieducator.org" + $(this).attr("href"));
    });
    // override Bootstrap's img block in Template:Pdf
    $('.pdfdown img[alt="PDF down.png"]').css("display", "inline-block");