Quarenon/Scripts/Compare
Discuss0on this wiki
< User:Quarenon | Scripts
The item compare script adds a link to an on-page overlay screen for easy comparison of different RuneScape items.
Installation
Edit
No installation is necessary, as this script is enabled by default for all RuneScape Wiki users.
Usage
Edit
To generate a link to the comparison screen, use the following code:
<div class="cioCompareLink"></div>
When the script is loaded, a link to the compare screen replaces the inner content of the <div> tag. By default, the link text is "Compare items," but this can be overwritten by using the title attribute of the <div> tag:
<div class="cioCompareLink" title="Check out my items!"></div>
By default, the overlay will try to pull bonus stats from the current article. However, the title attribute can also be used to override the default item or even specify multiple default items. To do this, use the vertical pipe (|) character. The first element in the list specifies the link title and each additional element adds a default item to the compare screen.
<div class="cioCompareLink" title="Dragon plate armour set (l)|Dragon full helm|Dragon platebody|Dragon platelegs"></div>
Note that the compare tool requires that the item article associated with each item contain a valid {{Infobox Bonuses}} template. If this template is missing or filled out incorrectly on the item article, then the tool will not be able to retrieve and display the stats for the item.
License
Edit
This script is released under the GNU General Public License. The source code is available at User:Quarenon/compare.js.
| Scripts |
Auto CVU • Auto Welcome • Custom Dropdowns • E-Z Hiscores • Recent Changes Revert • Smiley Toolbar • Templates Toolbar |
| Sitewide scripts |
Calculator • Item Compare |