JavaScript Expression Tracker

By ftbhrygvn Last update Nov 12, 2009 — Installed 28 times. Daily Installs: 2, 0, 0, 0, 1, 3, 2, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 4, 2, 1, 0, 1, 0, 0, 0
Script Summary:
Constantly track JS exprssions
Version: 1.2
License: Creative Commons Attribution-Share Alike 3.0 Hong Kong
Recently Updated TopicsPosts
facebook1

this script has 1 topic, 1 post

This script has no reviews.

Thumb Thumb Thumb Thumb
Note: This script is licensed under Creative Commons Attribution-Share Alike 3.0 Hong Kong.(http://creativecommons.org/licenses/by-sa/3.0/hk/)

Current Features

Evaluate and track: User can enter and evaluate JS expressions. Optionally re-evaluate expressions at regular intervals("Tracking").

Type display: Display the type of the result.

Multi tracking: Track multiple expressions at the same time. Click on an expression to remove it from the tracker.

Minimizing and closing: Minimize to a small 72x22 window. (Normally 788x108) Closing and re-opening is also possible. A window closed when minimized will re-open to a minimized window. Minimization and closure status are saved to preference.

Customizable color: Customize border color though option window ("Set option" menu command).

Tracking options: Enable/Disable tracking and set tracking interval though option window.

Draggable windows: Draggable tracker and optioin windows allows more flexible usage.

Usage Notes

Currently, the tracker can't escape HTML. Alert them instead of directly tracking them.

When tracking variables or functions of the document, use unsafeWindow.variable instead of variable and unsafeWindow.func() instead of func().

Tracking is temporarily disabled when the tracker window is closed and resumes when the window re-opens to prevent affecting performance of the computer. Minimize if you want to keep tracking expressions.

Tracking too many expressions or setting track interval to a small number may cause serious lagging.

Developers may add unsafeWindow.track = track at the end of the code. When developing JS in a web page, you can use track(expression1,expression2,...) to track expressions. However, as the name suggests, note that unsafeWindow is unsafe.

For questions, suggestions or bug reports, please send to ftbhrygvn@yahoo.com.hk or discussion area here.

Changelog

16 Oct - version 1.1
Bug fix: Expressions are no longer evaluated 3 times each track. This caused problems when tracking some expressions like i++

17 Oct - version 1.1.1
Minor bug fix: Appending the windows to the beginning of body originally. This may cause some issues. Changed to append to the end of body.

12 Nov - version 1.2
Optimization: Integrated 2 lines for hiding the windows into setAttribute line. I think this will have slight improvement on execution speed. Even if not, because the hiding is now done before the windows are appended, the problem of the windows appear for a brief moment before hiding is fixed.
Code amendment: This is for developers who uses track in unsafeWindow. The track function can now accpect multiple expressions as individual arguments to track multiple expression in one call.