Jump to content


Injured Reserves Report - MFL Scripts

1 reply to this topic

#1 theeohiostate



  • Members
  • PipPipPip
  • 4,267 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 15 December 2020 - 08:52 PM

Please use this thread to post all questions related to the Injured Reserves Report script.


ATTENTION - ANY AND ALL SCRIPTS REQUIRE TO HAVE THIS GLOBAL CACHE SCRIPT PLACED AS THE FIRST ITEM IN YOUR HEADER MESSAGE !!! The script builds a cache for local storage and indexedDB storage in your browser to limit the API call to the MFL Server.

You only need a single copy of this  ,do not add multiple times if using multiple scripts.

<script src="https://www.mflscripts.com/mfl-apps/global/cache.js"></script>


See troubleshooting section at very bottom of this post before submitting a question.


Before installing any scripts - please review this video tutorial on how to prepare your MyFantasyLeague site for customizations.


Access ALL of MFLScripts here.




Most if not all of our custom scripts require the addition of a font awesome library to be loaded into a homepage message that is marked as a "Header"  OR you can import the font awesome stylesheet into your main css file , it must be the very first line in your css file. Its likely if your using any of our scripts you already have a copy loaded, so please disregard and move onto the main script installation section.



Example 1 - inserting font awesome js file into a header message

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"/>   



Example 2 - inserting font awesome into your main css file as first line in the stylesheet

@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"; 







Pace the following into any homepage message (Do not mark as a header or footer). You can place this within the tab content of your homepage or create a link and link directly to the message. We recommend linking to all scripts so they don't slow down the load time for your league mates accessing the homepage. 


The IR Report script creates a module you can place on your sites homepage. The report displays all players in your league that are on any teams IR. The report assigns each player to each team and shows details on dates and types of IR designations as well as a popup to display that players injury history. You will need to have font awesome installed. There are a few var settings you can adjust to fit your league settings for IR. Also the base CSS included can be changed to style to match your league

var irReport_qualifier = ({ "Q":false , "D":false , "O":true , "I": true , "C":true , "H":true , "S":false }); // Q=Questionable , D=Doubtful , O=Outful , I=Injured , C=Covid , H=Holdout , S=Suspended - set above to true or false for each designation you want to display
var irReport_byeWeekException = true;
var irReport_includeHistory = true;     // Set to false to remove the medical icon table cell with the popup for players injury history
var irReport_franchiseNameIconLogo = 1; // 0:name; 1:icon; 2:logo; 3:icon+name; 4:logo+name
var irReport_violationAfterPlayerLock = "Player is ineligible for IR and will be cut from roster";
var irReport_violationBeforePlayerLock = "WARNING: Player must be activated before kickoff or will be cut from roster";
var irReport_deactivationDate = false;  //Set to true to display date player was placed on IR
var irReport_activationDate = 0;        //If league uses minimum days on IR then set that here to display column; 0 disables column
var irReport_allInjuries = false;       //Display all injured players even those not on fantasy IR

<div class="mobile-wrap">
	<table align="center" cellspacing="1" class="homepagemodule report" id="irReport">
		<caption><span>IR Report</span></caption>
		<thead style="display:none"><tr><th class="eligible-wrapper" colspan="8"></th></tr></thead>
		<tbody id="IR_Report">
		<tfoot><tr><th class="eligible-wrapper" colspan="8"></th></tr></tfoot>

<script src="https://www.mflscripts.com/mfl-apps/injuredReserve/IRreport/script.js"></script>

<!-- IR REPORT CSS -->
/* style warning for IR violations if dump or lock player */

/* size icons and logos */
  #irReport .franchise_icon{height:auto;width:150px}
  #irReport .franchise_logo{height:auto;width:150px}

/* ir history popup box style to match light or dark sites */
  .ir-report-modal-content{background-color:#fff;box-shadow:0 0 25px rgba(0,0,0,1)}

/* ir history popup box "x" button to close */
  .ir-report-modal-header .close{position:absolute;z-index:1;cursor:pointer;border-radius:3px;text-align:center;font-weight:700;background:var(--accent,#B82601);border:2px solid var(--accent,#B82601);color:#fff;right:9px;top:10px;height:22px;width:22px;line-height:1.4;opacity:.6;font-size:13px}
  .ir-report-modal-header .close:hover,.ir-report-modal-header .close:focus{background:var(--accent,#B82601)!important;border-color:var(--accent,#B82601)!important;color:#fff!important;opacity:1}

/* ir history popup box player caption area - style to match your sites captions */
  .ir-report-modal-header h2{width:100%;border-left:0;border-right:0;border-top:0;display:inline-block;border-radius:0;font-weight:700;font-size:22px;background:none;padding:8px 5px;text-align:left;line-height:100%;text-transform:uppercase;color:var(--main-four,var(--main,#080e25));padding-bottom:0}







1. Make sure to review the help video to check your league settings are setup so customized scripts can be used.


2. Recopy the code above and try again. Be sure your advanced editor is turned off.


3. Right click mouse on your page where script displays and click "Inspect Element" . In the browsers new popup window that displays , click on the "Console" tab. Now click on the "Errors" section. Here you will find a list of any errors that have occurred. Many errors our self explanatory and you can address yourself. If your error is showing cross site  CORS has been blocked , then you need to check every CSS, JS and IMAGE file on your site and be sure they all are using https  url and not http. Another error that appears could be "too many requests" , this happens when you refresh your site many times and MFL blocks your IP for 15 minutes for submitting too many API request. If thats the case , just wait 15-20 minutes and try again.


4. Check out the MFL Menu > Help section. We have added a new link here called "Manage Cache". By default we are caching the API files for our script in the browsers local storage. If you script isn't updating , you can force an update by clicking "Clear Local Storage". The next link is called "Enable IndexedDB" , this link is only meant to be used for owner that are getting the "Too Many Requests" error because there are using several scripts on several different MFL leagues that use the same serverID. Click this if needed more storage.


5. If the above wasn't any help , then post a question and we will do our best to help when the time allows.

All the scripts I post were created by Habman , with some small contributions from myself. The man has done an outstanding job giving the community a variety of options to enhance the site. Thank you sir !!

#2 theeohiostate



  • Members
  • PipPipPip
  • 4,267 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 13 February 2021 - 09:28 AM

The IR Report will only be displayed when there are players listed on the MFL injury report , for 2021 season , there will be no players listed on the injury report , therefore the module will be hidden until the first NFL injury report is listed.

All the scripts I post were created by Habman , with some small contributions from myself. The man has done an outstanding job giving the community a variety of options to enhance the site. Thank you sir !!

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users