tris0020 / MNPals Mod

// ==UserScript==
// @name        MNPals Mod
// @namespace   mnpals-mod
// @description Inserts rules into MNPals
// @include     https://mplus.mnpals.net/*
// @version     1.1
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @author      Kyle Triska
// @copyright   2015, Kyle Triska
// @grant		GM_xmlhttpRequest
// @grant       GM_addStyle
// @updateURL   https://openuserjs.org/src/scripts/tris0020/MNPals_Mod.user.js
// ==/UserScript==


var locations = new Array();

$('[id^="record"]').each(function(){
   var location = $(this);
   if (location.attr("id").indexOf("result") == -1) locations.push(location); 
});

for (var i=0; i<locations.length; i++)
{
  	var location = locations[i];        
    var id = location.attr('id').replace("record", "");
    var url = "https://mplus.mnpals.net/vufind/Record/" + id;
    
    appendHtml(id, url);
}

function appendHtml(id, url) {
    
    GM_xmlhttpRequest({
        method: "GET",
        url: url,
        synchronous: true,
        onload: function(response) {
            result = response.responseText;
            
            var record = $(result).find(".record").text();
            var recordsubcontent = $(result).find(".recordsubcontent");

            $("#record" + id).append(recordsubcontent);             
        }
    });
}

GM_addStyle ( "                                     \
.recordsubcontent { float: left !important; }\
" );

/*GM_addStyle ( "                                     \
.citation { margin-left: 100px !important; }\
.citation th { border-bottom: 0px !important; }\
.citation td { border-bottom: 0px !important; }\
" );*/