Window resizer and others


Skip navigation.

Site search

Site navigation

Details and download

The resizer script

This script is different from the others because it will work in all JavaScript 1.2 browsers.

When writing web pages, I use a screen resolution of 1024 x 768 pixels, because it makes it easier for me to see all of the text in my text editor. However, many of my viewers (or customers) may use other screen resolutions when looking at my web sites. In order to check if the sites look correct in other resolutions, I must go through the hassle of changing my screen resolution to higher and lower values, or changing the size of my browser window so that it is approximately the same size as the desired screen resolution.

The second option is easier but it is very difficult to judge if you have got the window size correct. In order to solve this problem, I have produced a script to resize the browser window to exactly match certain standard screen sizes, even allowing for space taken up by the taskbar etc.

If using Internet Explorer 5.5 or above, it also allows you to choose the zoom factor for any page (works best with the context menu).

The resizer script is available for you to try here. Note that in the source, there are several JavaScript properties that are not a part of main JavaScript. They are a part of the Microsoft JScript subset of JavaScript, and are used to power the context menu interaction. However, the script will work in any JavaScript1.2 browser.

The context menu items - for Microsoft Internet Explorer on Windows

To see the script license and check details like browser compatibility, use the links on the navigation panel at the top of this page.

You can also download the items for your context menu here (15.1KB). This includes the resizer script.

If you enable these, the scripts can change the size of the window for whatever page you view, show you the structure for page framesets, show you the DOM structure for any page, highlight image map areas and search google for selected text anywhere, and they can be invoked simply by right clicking your mouse and selecting the appropriate item.

The window size script put up a window which allows you to select standard screen resolutions or input a custom size. It then resizes the browser window to the size it would be if your screen was set to that resolution (taking taskbar size into account etc.).

The DOM script analyses the DOM for the current document and outputs a page with an expandable tree of objects. When an object is clicked on, its attributes and values are displayed.

The frame tree script analyses the frameset structure for the current document and outputs a page with structured list of frames. Each frame gives document titles and URLs and window names and warns about possible name conflicts.

The image map script is an aid for authors who are editing an image map. Especially when re-editing an image map, it becomes very difficult to remember exactly where the areas were, and what the coordinates relate to, in particular when the relationship between areas becomes quite complicated. This script uses VML to overlay each area with a translucent shape corresponding to the coordinates. Each coordinate is shown as a dot, and the lines joining the dots are also shown, using random colours to help distinguish between shapes. Moving the mouse over the image map shows the coordinates in the status bar. It works in Microsoft Internet Explorer 5.5 and above (version 5 cannot render VML polylines). There is also a better UserJS+SVG version for Opera.

How it works

Microsoft Internet Explorer 5 and above come with some fancy built in features, one of which is the ability to allow you to add items into the context menu (the menu that pops up when you right-click your mouse or press the context menu button on your keyboard). When you select any of these items, a web page is opened separately to the page you were viewing. There are two options, the page can open without being displayed, so you would not even know it is there, or the page can be displayed as a window without any menus. If the window is used, the main page cannot be accessed until the window is closed. For more details about this feature, see

If you want to use this feature, I have created two .reg files for each menu item to install or uninstall the scripts. Many people will be frightened to hear that I am tampering around with the Windows registry so to put their minds at ease, I will talk you through what I have done.

The installer files are as follows:

This file will work with regedit 4 and above (Win 9x, ME, NT4, 2K, XP)
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt]
This is the key where user created context menu items are held - if it does not yet exist, this line will create it
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Resize &Window]
This creates a key called Resize Window. From now on, the context menu will have a new menu item called 'Resize Window'. The 'W' will be underlined and may be used as a keyboard shortcut
This tells Internet Explorer where to find the page it will use for that menu item. You will need to change this if you decide to put it somewhere else
This tells Internet Explorer to use a window to display the page, not to hide it
This tells Internet Explorer to only show the menu item if some text is selected

The uninstaller files are as follows:

This file will work with regedit 4 and above
[-HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Resize &Window]
This deletes the registry key so the menu item will no longer appear in the context menu. I will not delete the other key because there is a chance that you have other context menu items - I do - and deleting the parent key would also delete them

For your security

Editing the registry is a very powerful tool in Windows and if exploited could cause severe system failure. It is essential that you ensure your own security by checking the .reg files to see that they do only run the commands as I have stated above. I give you my personal assurance that these files will ONLY do what I have shown you but who am I? Do you trust me? It is always best for you to check the official documentation to prove that a .reg file only does what it says.

This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.