User:Whiteknight/Tester Gadget

From Wikibooks, open books for an open world
Jump to: navigation, search
Page Tester Gadget (Version 2.01)
Type in the name of a book to gather information about the page.
You must install User:Whiteknight/pagetester.js to interact with this element. Installation instructions located at User:Whiteknight/Javascripts

Contents

[edit] How to Install

To install, add these lines to your personal javascript:

import_script('User:Whiteknight/gadgetscore.js');
import_script('User:Whiteknight/pagetester.js');

Your personal Javascript page is most likely located at "User:<YOUR USER NAME>/monobook.js" Go to that page and copy+paste the above line of code and click Save Page.

Once you save your javascript, you will need to perform a hard reset, typically by pressing Ctrl + F5, or some other key combination.

  • This script is tested to work with Internet Explorer 7
  • This script is tested to work with Internet Explorer 6
  • This script is tested to work with Fire Fox
  • This script is not tested in Safari
  • This script is not tested in Opera
Browsers not listed here have not been tested or are known not to work

[edit] About This Gadget

This gadget displays information about the target page. It can determine:

  1. Whether the page exists or not
  2. Whether the page is a redirect, and if so, to where

It counts:

  1. The number of characters in the page
  2. the number of "words" in the page (words are non-space chunks of text, such as numbers or symbols)
  3. The number of templates used
  4. The number of categories used (but not categories used through template inclusion)
  5. The number of links used

It lists:

  1. Templates used in the page
  2. Categories used in the page (but not transcluded)
  3. Links on the page

[edit] To Do:

  1. Handle nested templates correctly (currently does not)
  2. Determine if the page has been tagged with specific templates (delete, vfd, merge, query, etc)
  3. sort links and remove duplicates (sort of works)
  4. Make sure that categories arent counted as links (they are sometimes)

[edit] Version History

  • 2.01 Added support for IE
  • 2.00 Rewrote using new gadgetscore.js
  • 1.30 Added link to book in the results, added word count, added list of links
  • 1.20 Added list of categories, fixed redirect handling
  • 1.10 Added list of templates
  • 1.01 refactored template and javascript
  • 1.00 First stable version
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export