3 ms·
Can someone create a nifty JavaScript calculator for this?
by numair 18y ago
Can someone create a nifty JavaScript calculator for this?
- deleted 18y ago[deleted]
- deleted 18y ago[deleted]
- moe 18y agoSure. Copy to clipboard, then middle click in firefox: javascript:var%20si=prompt(%22how%20many%20of%20your%20small%20instances%20run%2024/7?%22);var%20sip=(si(0.1243653)/3/12).toFixed();var%20sip_1yr=(si(0.0324365+325)/12).toFixed();var%20sip_3yr=(si(0.03243653+500)/3/12).toFixed();var%20li=prompt(%22how%20many%20of%20your%20large%20instances%20run%2024/7?%22);var%20lip=(li(0.4243653)/3/12).toFixed();var%20lip_1yr=(li(0.1224365+1300)/12).toFixed();var%20lip_3yr=(li(0.12243653+2600)/3/12).toFixed();var%20xli=prompt(%22how%20many%20of%20your%20extra%20large%20instances%20run%2024/7?%22);var%20xlip=(xli(0.8243653)/3/12).toFixed();var%20xlip_1yr=(xli(0.2424365+2600)/12).toFixed();var%20xlip_3yr=(xli(0.2424365*3+4000)/3/12).toFixed();window.location.href=%22_blank%22;document.write(%22<h1>Potential%20savings</h1>%22);if(0<si){document.write(%22<h2>%22+si+%22%20Small%20instances</h2>%22);document.write(%22%22);document.write(%22<table%20border=1>%22);document.write(%22<tr>%22);document.write(%22%20<td> </td>%22);document.write(%22%20<td>Normal</td>%22);document.write(%22%20<td>1yr%20Reservation</td>%22);document.write(%22%20<td>3yr%20Reservation</td>%22);document.write(%22</tr>%22);document.write(%22<tr>%22);document.write(%22%20<td>Effective%20Monthly%20Fee</td>%22);document.write(%22%20<td>$%22+sip+%22</td>%22);document.write(%22%20<td>$%22+sip_1yr+%22</td>%22);document.write(%22%20<td>$%22+sip_3yr+%22</td>%22);document.write(%22</tr>%22);document.write(%22</table>%22)}if(0<li){document.write(%22<h2>%22+li+%22%20Large%20instances</h2>%22);document.write(%22%22);document.write(%22<table%20border=1>%22);document.write(%22<tr>%22);document.write(%22%20<td> </td>%22);document.write(%22%20<td>Normal</td>%22);document.write(%22%20<td>1yr%20Reservation</td>%22);document.write(%22%20<td>3yr%20Reservation</td>%22);document.write(%22</tr>%22);document.write(%22<tr>%22);document.write(%22%20<td>Effective%20Monthly%20Fee</td>%22);document.write(%22%20<td>$%22+lip+%22</td>%22);document.write(%22%20<td>$%22+lip_1yr+%22</td>%22);document.write(%22%20<td>$%22+lip_3yr+%22</td>%22);document.write(%22</tr>%22);document.write(%22</table>%22)}if(0<xli){document.write(%22<h2>%22+xli+%22%20Extra%20Large%20instances</h2>%22);document.write(%22%22);document.write(%22<table%20border=1>%22);document.write(%22<tr>%22);document.write(%22%20<td> </td>%22);document.write(%22%20<td>Normal</td>%22);document.write(%22%20<td>1yr%20Reservation</td>%22);document.write(%22%20<td>3yr%20Reservation</td>%22);document.write(%22</tr>%22);document.write(%22<tr>%22);document.write(%22%20<td>Effective%20Monthly%20Fee</td>%22);document.write(%22%20<td>$%22+xlip+%22</td>%22);document.write(%22%20<td>$%22+xlip_1yr+%22</td>%22);document.write(%22%20<td>$%22+xlip_3yr+%22</td>%22);document.write(%22</tr>%22);document.write(%22</table>%22)}void%20(0);
- numair 18y agoThat was really cool of you. Thanks!
- mdasen 18y agoCould you possibly put that on a site like dpaste.com so that the comments don't just all scroll to the left and then link to it.
- moe 18y agoSorry, can't edit it anymore and only now noticed the problem. Will do what you suggested next time.
- timf 18y ago"nuke anything" works: https://addons.mozilla.org/en-US/firefox/addon/951 https://addons.mozilla.org/en-US/firefox/addon/951
- pasbesoin 18y agoNever thought of it for that before. Thanks!
- throw_away 18y agoalso, firebug has a "delete element" function.
- sam_in_nyc 18y agoYou forgot "overflow: hidden"