Changes

Jump to navigation Jump to search
718 bytes added ,  06:52, 13 June 2021
no edit summary
Line 77: Line 77:     
api.get(newparams).done(function(data){
 
api.get(newparams).done(function(data){
console.log(data.parse.text['*']);
+
if (!data.error)
 +
        {
 +
            var markup = data.parse.text["*"];
 +
            if (typeof markup !== "undefined")
 +
            {
 +
                $("#entry").text(entry).show();
 +
                var blurb = $('<div id="articleText"></div>').html(markup);
 +
 
 +
                // remove links as they will not work
 +
                blurb.find('a').each(function() { $(this).replaceWith($(this).html()); });
 +
 
 +
                // remove any references
 +
                blurb.find('sup').remove();
 +
 
 +
                // remove cite error
 +
                blurb.find('.mw-ext-cite-error').remove();
 +
                $('#article').html($(blurb).find('p'));
 +
 
 +
                $("#article").append(link);
 +
                // console.log(markup);
 +
            }
 +
        }
 
});
 
});
 
});
 
});

Navigation menu