MediaWiki:Gadget-resign-calculator.js: Difference between revisions
Default the first season to the upcoming season |
Drop duplicated hint, add new-topic link |
||
| Line 9: | Line 9: | ||
// The league numbers a season by the year it ends in, so the season being | // The league numbers a season by the year it ends in, so the season being | ||
// signed for is always the next one up from the current calendar year. | // signed for is always the next one up from the current calendar year. | ||
var NEW_POST_URL = 'https://2teams1cup.com/forum/index.php?act=post&do=new_post&f=70'; | |||
var UPCOMING_SEASON = new Date().getFullYear() + 1, | var UPCOMING_SEASON = new Date().getFullYear() + 1, | ||
MAX = 11500000, | MAX = 11500000, | ||
| Line 66: | Line 68: | ||
} ); | } ); | ||
wrap.appendChild( btn ); | wrap.appendChild( btn ); | ||
return | |||
var actions = document.createElement( 'div' ); | |||
actions.className = 'tc-calc-actions'; | |||
var link = document.createElement( 'a' ); | |||
link.href = NEW_POST_URL; | |||
link.target = '_blank'; | |||
link.rel = 'noopener'; | |||
link.textContent = 'Start a new topic in NBA: Re-Signing'; | |||
actions.appendChild( link ); | |||
var outer = document.createElement( 'div' ); | |||
outer.appendChild( wrap ); | |||
outer.appendChild( actions ); | |||
return outer; | |||
} | } | ||
| Line 101: | Line 116: | ||
form.appendChild( scoreRow ); | form.appendChild( scoreRow ); | ||
// --- term --- | // --- term --- | ||
| Line 229: | Line 239: | ||
var note = document.createElement( 'div' ); | var note = document.createElement( 'div' ); | ||
note.className = 'tc-calc-note'; | note.className = 'tc-calc-note'; | ||
note.textContent = years + ' years, ' + first + ' through ' + endYear + | note.textContent = years + ' years, ' + first + ' through ' + endYear + '.'; | ||
out.appendChild( note ); | out.appendChild( note ); | ||
} | } | ||