Movatterモバイル変換


[0]ホーム

URL:


Bookmarklets Home|Links|Forms|Text and Data |Zap |Web Development |Validation |Misc

Web Development Bookmarklets

These bookmarklets let you see how a web page is coded without digging through the source, debug problems in web pages quickly, and experiment with CSS or JS without editing the actual page.

(To keepbookmarklets in order to use them on other web pages, drag them to yourBookmarks Toolbar. Or,install them all at once.)

BookmarkletDescriptionWorks in
shellOpens aJavaScript Shell and allows it to access the current page.DetailsMoz
jsenvOpens aJavaScript Development Environment and allows it to access the current page.DetailsMoz
test stylesType in CSS rules to experiment or to create a temporary user style sheet.DetailsMozOp7
edit stylesExperiment with changes to the page's style sheet.DetailsMoz
ancestorsLists the ancestors of any element you hover over in the status bar.DetailsIEMoz
computed stylesLists the computed styles of an element and of its ancestors.DetailsMoz
zap style sheetsDisables all style sheets.DetailsIEMoz
zap presentational htmlRemoves most presentational attributes and tags while leaving style sheets intact.DetailsIEMozOp7
view style sheetsDisplays linked and embedded style sheets.DetailsMoz
view scriptsDisplays linked and embedded scripts.DetailsMoz
view variablesDisplays all JavaScript variables and functions.DetailsMozOp7
list classesLists classes used in the document.DetailsIEMozOp7
generated sourceDisplays the current DOM tree of the page as HTML.DetailsIEMoz
partial sourceDisplays the current DOM tree of the selection as HTML.DetailsMoz
serialize as xmlDisplays the current DOM tree of the page as XML.DetailsMozOp7
show blocksDraws borders to show tables (colors indicate nesting), paragraphs, and divs.DetailsIEMozOp7
topographic viewShows the nesting level of every element using shading.DetailsIEMozOp7
topo with bordersShows the nesting level of every element using shading and 3D borders.DetailsMozOp7
make linkCreates the HTML code to link to the current page.DetailsIEMozNS4Op7
make img tagCreates the XHTML code to include the current image.DetailsMozOp7
named anchorsMakes anchors visible, letting you link to or bookmark a section of a page.DetailsIEMozOp7
onerror statusWhen a JavaScript error occurs, shows the error message in the status bar.DetailsIEMozNS4
onerror alertWhen a JavaScript error occurs, shows the error message in a dialog.DetailsIEMozNS4

Browsers:IE isInternet Explorer for Windows,Moz isNetscape 7 orMozilla,NS4 isNetscape 4, andOp7 isOpera.


Details

shell(Moz)

Opens aJavaScript Shell and allows it to access the current page.

jsenv(Moz)

Opens aJavaScript Development Environment and allows it to access the current page.

test styles(Moz,Op7)

Type in CSS rules to experiment or to create a temporary user style sheet.

Creates a new window into which you can typeCSS rules for the original page. The rules are applied immediately. As long as you keep the style window open, the rules will still be applied if you reload the page or even go to another page on the same site. Seeexamples of user style rules andexamples of style rules for web developers.

edit styles(Moz)

Experiment with changes to the page's style sheet.

Similar to "test styles". Instead of starting blank, the window starts with all of the style sheets in the page.

This bookmarklet supports inline and linked style sheets, imports, and style sheets with data: URLs (such as those created by "test styles"). When style sheets cannot be loaded with XMLHttpRequest (out-of-domain or non-http URLs), it includes them with an @import rule.

ancestors(IE,Moz)

Lists the ancestors of any element you hover over in the status bar.

For example, a link in a table cell would appear as "BODY > table tbody tr TD > A".

Also shows classes (e.g. SPAN.newsItemLink) and ids (e.g. DIV#content) when present. The idea of showing classes and ids comes frompixy's "List computed styles" bookmarklet.

computed styles(Moz)

Lists the computed styles of an element and of its ancestors.

Features:

Suggested bySimon Willison. (Simonactually wanted a bookmarklet that would show the stylerules that apply to an element, like the DOM Inspector does, but I don't think that can be done in a bookmarklet.)

zap style sheets(IE,Moz)

Disables all style sheets.

zap presentational html(IE,Moz,Op7)

Removes most presentational attributes and tags while leaving style sheets intact.

Removes the following attributes: bgcolor, background, color, align, text, alink, vlink.

Removes the following tags (and any attributes on them): FONT, CENTER.

view style sheets(Moz)

Displays linked and embedded style sheets.

Tip: since the style sheets are all in one window, you can quickly search them using your browser's Find feature.

Loosely based onSamrod Shenassa's "document info" bookmarklet.

view scripts(Moz)

Displays linked and embedded scripts.

view variables(Moz,Op7)

Displays all JavaScript variables and functions.

list classes(IE,Moz,Op7)

Lists classes used in the document.

generated source(IE,Moz)

Displays the current DOM tree of the page as HTML.

This bookmarklet is especially useful on pages created by javascript, because these pages have no original source.

The generated source is usually similar to the original source, but may have small changes such as collapsed whitespace between tag attributes.

partial source(Moz)

Displays the current DOM tree of the selection as HTML.

If you haven't selected anything, this bookmarklet will show the generated source of the entire page.

serialize as xml(Moz,Op7)

Displays the current DOM tree of the page as XML.

After using this bookmarklet, you can save the result as .xml, .xhtml, .svg, etc. Tested with XHTML+MathML and SVG. Not for converting HTML to XHTML.

Thanks toWeirdAl for helping me write this bookmarklet.

show blocks(IE,Moz,Op7)

Draws borders to show tables (colors indicate nesting), paragraphs, and divs.

Paragraphs get a light gray border and divs get a black border. The colors of table borders depend on nesting: outer tables are blue, second-level tables are green, and third-level and deeper tables are red.

The bookmarklet works by applyingthis style sheet to the page.

Suggested byPaul McGarry.

topographic view(IE,Moz,Op7)

Shows the nesting level of every element using shading.

Shades the BODY element black, children of the body dark gray, and so on for up to fifteen layers of nesting. Beyond sixteen layers of nesting, shades every element pink (instead of white).

Since each element is slightly lighter than its parent, it is easy to see the extent of each element at a glance. The overall brightness of a page can give you an idea of how complex a page's markup is. Since this bookmarklet doesn't add borders, it preserves layout to the pixel.

Based on abookmarklet byJoseph Pearson. Joseph's version works by recursing through the document, and works with more browsers (including Safari). This version works by adding a CSS style sheet, and is faster in IE and Mozilla.

topo with borders(Moz,Op7)

Shows the nesting level of every element using shading and 3D borders.

Like "topographic view", but sacrifices perfect layout preservation for a more 3D look.

make link(IE,Moz,NS4,Op7)

Creates the HTML code to link to the current page.

make img tag(Moz,Op7)

Creates the XHTML code to include the current image.

named anchors(IE,Moz,Op7)

Makes anchors visible, letting you link to or bookmark a section of a page.

This is useful if a long page has named anchors but no table of contents linking to those anchors, and you want to make a link to the middle of the page.

Problems: Some pages have unclosed named anchors, which will cause a large portion of the page to be marked by this bookmarklet. HTML 3.2 and 4.0 both require end tags for the <a> element, but many browsers silently recover when pages leave out these end tags on named anchors, so many pages leave off the end tags anyway.

onerror status(IE,Moz,NS4)

When a JavaScript error occurs, shows the error message in the status bar.

Sets an onerror handler so that when a javascript error occurs, the error appears in the status bar. To test,make an error occur.

onerror alert(IE,Moz,NS4)

When a JavaScript error occurs, shows the error message in a dialog.

Sets an onerror handler so that when a javascript error occurs, the error appears in a dialog. To test,make an error occur.


© 2000-2007Jesse Ruderman (jruderman@gmail.com). Feedback is welcome.
Last modified November 1, 2006.


[8]ページ先頭

©2009-2025 Movatter.jp