home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Browsers, Managers & Extensions / Web Developer Toolbar 1.14 / web-developer.xpi / chrome / webdeveloper.jar
PKZip Archive  |  2007-05-10  |  1.1 MB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: PKZip Archive (archive/zip).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert PKZip Archive (archive/zip) magic Supported
66% dexvert JAR Archive (archive/jar) ext Supported
100% file Zip archive data, made by v2.0 UNIX, extract using at least v1.0, last modified, last modified Sun, May 10 2007 14:40:26, uncompressed size 0, method=store default
99% file Zip archive, with extra data prepended default
98% file data default
63% TrID Mozilla Archive Format (gen) default (weak)
36% TrID ZIP compressed archive default
100% dexmagic PrintFox/Pagefox WEAK default
100% siegfried x-fmt/263 ZIP Format default
100% lsar Zip default
100% gt2 ZIP Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: Zip(1.0)[100.0%,193 files,31 dirs] default
100% binwalkID Zip archive data, at least v1.0 to extract, name: content/ default
100% xdgMime application/zip default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 4b 03 04 0a 00 00 00 | 00 00 0d 75 aa 36 00 00 |PK......|...u.6..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 08 00 00 00 63 6f |........|......co|
|00000020| 6e 74 65 6e 74 2f 50 4b | 03 04 0a 00 00 00 00 00 |ntent/PK|........|
|00000030| 0f 75 aa 36 00 00 00 00 | 00 00 00 00 00 00 00 00 |.u.6....|........|
|00000040| 15 00 00 00 63 6f 6e 74 | 65 6e 74 2f 77 65 62 64 |....cont|ent/webd|
|00000050| 65 76 65 6c 6f 70 65 72 | 2f 50 4b 03 04 0a 00 00 |eveloper|/PK.....|
|00000060| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|00000070| 00 00 00 1b 00 00 00 63 | 6f 6e 74 65 6e 74 2f 77 |.......c|ontent/w|
|00000080| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 61 62 6f 75 |ebdevelo|per/abou|
|00000090| 74 2f 50 4b 03 04 0a 00 | 00 00 00 00 0f 75 aa 36 |t/PK....|.....u.6|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 1c 00 00 00 |........|........|
|000000b0| 63 6f 6e 74 65 6e 74 2f | 77 65 62 64 65 76 65 6c |content/|webdevel|
|000000c0| 6f 70 65 72 2f 63 6f 6d | 6d 6f 6e 2f 50 4b 03 04 |oper/com|mon/PK..|
|000000d0| 0a 00 00 00 00 00 0f 75 | aa 36 00 00 00 00 00 00 |.......u|.6......|
|000000e0| 00 00 00 00 00 00 27 00 | 00 00 63 6f 6e 74 65 6e |......'.|..conten|
|000000f0| 74 2f 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2f 63 |t/webdev|eloper/c|
|00000100| 6f 6d 6d 6f 6e 2f 76 61 | 6c 69 64 61 74 69 6f 6e |ommon/va|lidation|
|00000110| 2f 50 4b 03 04 0a 00 00 | 00 00 00 0e 75 aa 36 00 |/PK.....|....u.6.|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 1f 00 00 00 63 |........|.......c|
|00000130| 6f 6e 74 65 6e 74 2f 77 | 65 62 64 65 76 65 6c 6f |ontent/w|ebdevelo|
|00000140| 70 65 72 2f 64 61 73 68 | 62 6f 61 72 64 2f 50 4b |per/dash|board/PK|
|00000150| 03 04 0a 00 00 00 00 00 | 0f 75 aa 36 00 00 00 00 |........|.u.6....|
|00000160| 00 00 00 00 00 00 00 00 | 1d 00 00 00 63 6f 6e 74 |........|....cont|
|00000170| 65 6e 74 2f 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |ent/webd|eveloper|
|00000180| 2f 64 69 61 6c 6f 67 73 | 2f 50 4b 03 04 0a 00 00 |/dialogs|/PK.....|
|00000190| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|000001a0| 00 00 00 1e 00 00 00 63 | 6f 6e 74 65 6e 74 2f 77 |.......c|ontent/w|
|000001b0| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 66 65 61 74 |ebdevelo|per/feat|
|000001c0| 75 72 65 73 2f 50 4b 03 | 04 0a 00 00 00 00 00 0f |ures/PK.|........|
|000001d0| 75 aa 36 00 00 00 00 00 | 00 00 00 00 00 00 00 1f |u.6.....|........|
|000001e0| 00 00 00 63 6f 6e 74 65 | 6e 74 2f 77 65 62 64 65 |...conte|nt/webde|
|000001f0| 76 65 6c 6f 70 65 72 2f | 67 65 6e 65 72 61 74 65 |veloper/|generate|
|00000200| 64 2f 50 4b 03 04 0a 00 | 00 00 00 00 0f 75 aa 36 |d/PK....|.....u.6|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 1c 00 00 00 |........|........|
|00000220| 63 6f 6e 74 65 6e 74 2f | 77 65 62 64 65 76 65 6c |content/|webdevel|
|00000230| 6f 70 65 72 2f 69 6d 61 | 67 65 73 2f 50 4b 03 04 |oper/ima|ges/PK..|
|00000240| 0a 00 00 00 00 00 0f 75 | aa 36 00 00 00 00 00 00 |.......u|.6......|
|00000250| 00 00 00 00 00 00 24 00 | 00 00 63 6f 6e 74 65 6e |......$.|..conten|
|00000260| 74 2f 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2f 69 |t/webdev|eloper/i|
|00000270| 6d 61 67 65 73 2f 63 6f | 6e 74 65 6e 74 2f 50 4b |mages/co|ntent/PK|
|00000280| 03 04 0a 00 00 00 00 00 | 0f 75 aa 36 00 00 00 00 |........|.u.6....|
|00000290| 00 00 00 00 00 00 00 00 | 25 00 00 00 63 6f 6e 74 |........|%...cont|
|000002a0| 65 6e 74 2f 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |ent/webd|eveloper|
|000002b0| 2f 69 6d 61 67 65 73 2f | 66 65 61 74 75 72 65 73 |/images/|features|
|000002c0| 2f 50 4b 03 04 0a 00 00 | 00 00 00 0f 75 aa 36 00 |/PK.....|....u.6.|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 21 00 00 00 63 |........|...!...c|
|000002e0| 6f 6e 74 65 6e 74 2f 77 | 65 62 64 65 76 65 6c 6f |ontent/w|ebdevelo|
|000002f0| 70 65 72 2f 69 6d 61 67 | 65 73 2f 6c 6f 67 6f 2f |per/imag|es/logo/|
|00000300| 50 4b 03 04 0a 00 00 00 | 00 00 0f 75 aa 36 00 00 |PK......|...u.6..|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 1d 00 00 00 63 6f |........|......co|
|00000320| 6e 74 65 6e 74 2f 77 65 | 62 64 65 76 65 6c 6f 70 |ntent/we|bdevelop|
|00000330| 65 72 2f 6d 65 73 73 61 | 67 65 2f 50 4b 03 04 0a |er/messa|ge/PK...|
|00000340| 00 00 00 00 00 0f 75 aa | 36 00 00 00 00 00 00 00 |......u.|6.......|
|00000350| 00 00 00 00 00 1d 00 00 | 00 63 6f 6e 74 65 6e 74 |........|.content|
|00000360| 2f 77 65 62 64 65 76 65 | 6c 6f 70 65 72 2f 6f 70 |/webdeve|loper/op|
|00000370| 74 69 6f 6e 73 2f 50 4b | 03 04 0a 00 00 00 00 00 |tions/PK|........|
|00000380| 0f 75 aa 36 00 00 00 00 | 00 00 00 00 00 00 00 00 |.u.6....|........|
|00000390| 25 00 00 00 63 6f 6e 74 | 65 6e 74 2f 77 65 62 64 |%...cont|ent/webd|
|000003a0| 65 76 65 6c 6f 70 65 72 | 2f 6f 70 74 69 6f 6e 73 |eveloper|/options|
|000003b0| 2f 64 69 61 6c 6f 67 73 | 2f 50 4b 03 04 0a 00 00 |/dialogs|/PK.....|
|000003c0| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|000003d0| 00 00 00 23 00 00 00 63 | 6f 6e 74 65 6e 74 2f 77 |...#...c|ontent/w|
|000003e0| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 6f 70 74 69 |ebdevelo|per/opti|
|000003f0| 6f 6e 73 2f 70 61 67 65 | 73 2f 50 4b 03 04 0a 00 |ons/page|s/PK....|
|00000400| 00 00 00 00 0f 75 aa 36 | 00 00 00 00 00 00 00 00 |.....u.6|........|
|00000410| 00 00 00 00 21 00 00 00 | 63 6f 6e 74 65 6e 74 2f |....!...|content/|
|00000420| 77 65 62 64 65 76 65 6c | 6f 70 65 72 2f 73 74 79 |webdevel|oper/sty|
|00000430| 6c 65 73 68 65 65 74 73 | 2f 50 4b 03 04 0a 00 00 |lesheets|/PK.....|
|00000440| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|00000450| 00 00 00 2b 00 00 00 63 | 6f 6e 74 65 6e 74 2f 77 |...+...c|ontent/w|
|00000460| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 73 74 79 6c |ebdevelo|per/styl|
|00000470| 65 73 68 65 65 74 73 2f | 67 65 6e 65 72 61 74 65 |esheets/|generate|
|00000480| 64 2f 50 4b 03 04 0a 00 | 00 00 00 00 0f 75 aa 36 |d/PK....|.....u.6|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 29 00 00 00 |........|....)...|
|000004a0| 63 6f 6e 74 65 6e 74 2f | 77 65 62 64 65 76 65 6c |content/|webdevel|
|000004b0| 6f 70 65 72 2f 73 74 79 | 6c 65 73 68 65 65 74 73 |oper/sty|lesheets|
|000004c0| 2f 69 6d 70 6f 72 74 73 | 2f 50 4b 03 04 0a 00 00 |/imports|/PK.....|
|000004d0| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|000004e0| 00 00 00 07 00 00 00 6c | 6f 63 61 6c 65 2f 50 4b |.......l|ocale/PK|
|000004f0| 03 04 0a 00 00 00 00 00 | 0f 75 aa 36 00 00 00 00 |........|.u.6....|
|00000500| 00 00 00 00 00 00 00 00 | 0d 00 00 00 6c 6f 63 61 |........|....loca|
|00000510| 6c 65 2f 65 6e 2d 55 53 | 2f 50 4b 03 04 0a 00 00 |le/en-US|/PK.....|
|00000520| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|00000530| 00 00 00 1a 00 00 00 6c | 6f 63 61 6c 65 2f 65 6e |.......l|ocale/en|
|00000540| 2d 55 53 2f 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |-US/webd|eveloper|
|00000550| 2f 50 4b 03 04 0a 00 00 | 00 00 00 0f 75 aa 36 00 |/PK.....|....u.6.|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 05 00 00 00 73 |........|.......s|
|00000570| 6b 69 6e 2f 50 4b 03 04 | 0a 00 00 00 00 00 0f 75 |kin/PK..|.......u|
|00000580| aa 36 00 00 00 00 00 00 | 00 00 00 00 00 00 0d 00 |.6......|........|
|00000590| 00 00 73 6b 69 6e 2f 63 | 6c 61 73 73 69 63 2f 50 |..skin/c|lassic/P|
|000005a0| 4b 03 04 0a 00 00 00 00 | 00 0f 75 aa 36 00 00 00 |K.......|..u.6...|
|000005b0| 00 00 00 00 00 00 00 00 | 00 1a 00 00 00 73 6b 69 |........|.....ski|
|000005c0| 6e 2f 63 6c 61 73 73 69 | 63 2f 77 65 62 64 65 76 |n/classi|c/webdev|
|000005d0| 65 6c 6f 70 65 72 2f 50 | 4b 03 04 0a 00 00 00 00 |eloper/P|K.......|
|000005e0| 00 0f 75 aa 36 00 00 00 | 00 00 00 00 00 00 00 00 |..u.6...|........|
|000005f0| 00 24 00 00 00 73 6b 69 | 6e 2f 63 6c 61 73 73 69 |.$...ski|n/classi|
|00000600| 63 2f 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2f 64 |c/webdev|eloper/d|
|00000610| 61 73 68 62 6f 61 72 64 | 2f 50 4b 03 04 0a 00 00 |ashboard|/PK.....|
|00000620| 00 00 00 0f 75 aa 36 00 | 00 00 00 00 00 00 00 00 |....u.6.|........|
|00000630| 00 00 00 1f 00 00 00 73 | 6b 69 6e 2f 63 6c 61 73 |.......s|kin/clas|
|00000640| 73 69 63 2f 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |sic/webd|eveloper|
|00000650| 2f 6d 65 6e 75 2f 50 4b | 03 04 0a 00 00 00 00 00 |/menu/PK|........|
|00000660| 0f 75 aa 36 00 00 00 00 | 00 00 00 00 00 00 00 00 |.u.6....|........|
|00000670| 22 00 00 00 73 6b 69 6e | 2f 63 6c 61 73 73 69 63 |"...skin|/classic|
|00000680| 2f 77 65 62 64 65 76 65 | 6c 6f 70 65 72 2f 6f 70 |/webdeve|loper/op|
|00000690| 74 69 6f 6e 73 2f 50 4b | 03 04 0a 00 00 00 00 00 |tions/PK|........|
|000006a0| 0f 75 aa 36 00 00 00 00 | 00 00 00 00 00 00 00 00 |.u.6....|........|
|000006b0| 24 00 00 00 73 6b 69 6e | 2f 63 6c 61 73 73 69 63 |$...skin|/classic|
|000006c0| 2f 77 65 62 64 65 76 65 | 6c 6f 70 65 72 2f 73 74 |/webdeve|loper/st|
|000006d0| 61 74 75 73 62 61 72 2f | 50 4b 03 04 0a 00 00 00 |atusbar/|PK......|
|000006e0| 00 00 0f 75 aa 36 00 00 | 00 00 00 00 00 00 00 00 |...u.6..|........|
|000006f0| 00 00 22 00 00 00 73 6b | 69 6e 2f 63 6c 61 73 73 |.."...sk|in/class|
|00000700| 69 63 2f 77 65 62 64 65 | 76 65 6c 6f 70 65 72 2f |ic/webde|veloper/|
|00000710| 74 6f 6f 6c 62 61 72 2f | 50 4b 03 04 0a 00 00 00 |toolbar/|PK......|
|00000720| 00 00 0f 75 aa 36 bf d6 | 88 e3 38 04 00 00 38 04 |...u.6..|..8...8.|
|00000730| 00 00 24 00 00 00 63 6f | 6e 74 65 6e 74 2f 77 65 |..$...co|ntent/we|
|00000740| 62 64 65 76 65 6c 6f 70 | 65 72 2f 61 62 6f 75 74 |bdevelop|er/about|
|00000750| 2f 61 62 6f 75 74 2e 63 | 73 73 40 69 6d 70 6f 72 |/about.c|ss@impor|
|00000760| 74 20 75 72 6c 28 22 63 | 68 72 6f 6d 65 3a 2f 2f |t url("c|hrome://|
|00000770| 67 6c 6f 62 61 6c 2f 73 | 6b 69 6e 2f 22 29 3b 0a |global/s|kin/");.|
|00000780| 40 6e 61 6d 65 73 70 61 | 63 65 20 75 72 6c 28 22 |@namespa|ce url("|
|00000790| 68 74 74 70 3a 2f 2f 77 | 77 77 2e 6d 6f 7a 69 6c |http://w|ww.mozil|
|000007a0| 6c 61 2e 6f 72 67 2f 6b | 65 79 6d 61 73 74 65 72 |la.org/k|eymaster|
|000007b0| 2f 67 61 74 65 6b 65 65 | 70 65 72 2f 74 68 65 72 |/gatekee|per/ther|
|000007c0| 65 2e 69 73 2e 6f 6e 6c | 79 2e 78 75 6c 22 29 3b |e.is.onl|y.xul");|
|000007d0| 0a 0a 64 65 73 63 72 69 | 70 74 69 6f 6e 0a 7b 0a |..descri|ption.{.|
|000007e0| 20 20 20 20 6d 61 72 67 | 69 6e 2d 6c 65 66 74 3a | marg|in-left:|
|000007f0| 20 30 20 21 69 6d 70 6f | 72 74 61 6e 74 3b 0a 7d | 0 !impo|rtant;.}|
|00000800| 0a 0a 73 65 70 61 72 61 | 74 6f 72 2c 20 23 77 65 |..separa|tor, #we|
|00000810| 62 64 65 76 65 6c 6f 70 | 65 72 2d 61 62 6f 75 74 |bdevelop|er-about|
|00000820| 2d 64 69 61 6c 6f 67 0a | 7b 0a 20 20 20 20 6d 61 |-dialog.|{. ma|
|00000830| 72 67 69 6e 3a 20 30 20 | 21 69 6d 70 6f 72 74 61 |rgin: 0 |!importa|
|00000840| 6e 74 3b 0a 20 20 20 20 | 70 61 64 64 69 6e 67 3a |nt;. |padding:|
|00000850| 20 30 20 21 69 6d 70 6f | 72 74 61 6e 74 3b 0a 7d | 0 !impo|rtant;.}|
|00000860| 0a 0a 23 77 65 62 64 65 | 76 65 6c 6f 70 65 72 2d |..#webde|veloper-|
|00000870| 61 62 6f 75 74 2d 64 65 | 74 61 69 6c 73 0a 7b 0a |about-de|tails.{.|
|00000880| 20 20 20 20 62 61 63 6b | 67 72 6f 75 6e 64 2d 63 | back|ground-c|
|00000890| 6f 6c 6f 72 3a 20 23 66 | 66 66 66 66 66 20 21 69 |olor: #f|fffff !i|
|000008a0| 6d 70 6f 72 74 61 6e 74 | 3b 0a 20 20 20 20 63 6f |mportant|;. co|
|000008b0| 6c 6f 72 3a 20 23 30 30 | 30 30 30 30 20 21 69 6d |lor: #00|0000 !im|
|000008c0| 70 6f 72 74 61 6e 74 3b | 0a 20 20 20 20 70 61 64 |portant;|. pad|
|000008d0| 64 69 6e 67 3a 20 30 2e | 35 65 6d 20 21 69 6d 70 |ding: 0.|5em !imp|
|000008e0| 6f 72 74 61 6e 74 3b 0a | 7d 0a 0a 23 77 65 62 64 |ortant;.|}..#webd|
|000008f0| 65 76 65 6c 6f 70 65 72 | 2d 61 62 6f 75 74 2d 64 |eveloper|-about-d|
|00000900| 65 74 61 69 6c 73 20 68 | 62 6f 78 0a 7b 0a 20 20 |etails h|box.{. |
|00000910| 20 20 62 61 63 6b 67 72 | 6f 75 6e 64 2d 69 6d 61 | backgr|ound-ima|
|00000920| 67 65 3a 20 75 72 6c 28 | 22 63 68 72 6f 6d 65 3a |ge: url(|"chrome:|
|00000930| 2f 2f 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2f 63 |//webdev|eloper/c|
|00000940| 6f 6e 74 65 6e 74 2f 69 | 6d 61 67 65 73 2f 6c 6f |ontent/i|mages/lo|
|00000950| 67 6f 2f 6c 61 72 67 65 | 2e 70 6e 67 22 29 20 21 |go/large|.png") !|
|00000960| 69 6d 70 6f 72 74 61 6e | 74 3b 0a 20 20 20 20 62 |importan|t;. b|
|00000970| 61 63 6b 67 72 6f 75 6e | 64 2d 70 6f 73 69 74 69 |ackgroun|d-positi|
|00000980| 6f 6e 3a 20 74 6f 70 20 | 72 69 67 68 74 20 21 69 |on: top |right !i|
|00000990| 6d 70 6f 72 74 61 6e 74 | 3b 0a 20 20 20 20 62 61 |mportant|;. ba|
|000009a0| 63 6b 67 72 6f 75 6e 64 | 2d 72 65 70 65 61 74 3a |ckground|-repeat:|
|000009b0| 20 6e 6f 2d 72 65 70 65 | 61 74 20 21 69 6d 70 6f | no-repe|at !impo|
|000009c0| 72 74 61 6e 74 3b 0a 20 | 20 20 20 6d 69 6e 2d 68 |rtant;. | min-h|
|000009d0| 65 69 67 68 74 3a 20 33 | 35 70 78 20 21 69 6d 70 |eight: 3|5px !imp|
|000009e0| 6f 72 74 61 6e 74 3b 0a | 20 20 20 20 70 61 64 64 |ortant;.| padd|
|000009f0| 69 6e 67 2d 72 69 67 68 | 74 3a 20 33 35 70 78 20 |ing-righ|t: 35px |
|00000a00| 21 69 6d 70 6f 72 74 61 | 6e 74 3b 0a 7d 0a 0a 2e |!importa|nt;.}...|
|00000a10| 64 61 74 65 0a 7b 0a 20 | 20 20 20 63 6f 6c 6f 72 |date.{. | color|
|00000a20| 3a 20 23 39 39 39 39 39 | 39 20 21 69 6d 70 6f 72 |: #99999|9 !impor|
|00000a30| 74 61 6e 74 3b 0a 7d 0a | 0a 2e 6e 61 6d 65 0a 7b |tant;.}.|..name.{|
|00000a40| 0a 20 20 20 20 66 6f 6e | 74 2d 73 69 7a 65 3a 20 |. fon|t-size: |
|00000a50| 78 2d 6c 61 72 67 65 20 | 21 69 6d 70 6f 72 74 61 |x-large |!importa|
|00000a60| 6e 74 3b 0a 20 20 20 20 | 70 61 64 64 69 6e 67 2d |nt;. |padding-|
|00000a70| 72 69 67 68 74 3a 20 30 | 2e 32 35 65 6d 20 21 69 |right: 0|.25em !i|
|00000a80| 6d 70 6f 72 74 61 6e 74 | 3b 0a 7d 0a 0a 2e 6e 61 |mportant|;.}...na|
|00000a90| 6d 65 2c 20 2e 74 69 74 | 6c 65 0a 7b 0a 20 20 20 |me, .tit|le.{. |
|00000aa0| 20 66 6f 6e 74 2d 77 65 | 69 67 68 74 3a 20 62 6f | font-we|ight: bo|
|00000ab0| 6c 64 20 21 69 6d 70 6f | 72 74 61 6e 74 3b 0a 7d |ld !impo|rtant;.}|
|00000ac0| 0a 0a 2e 74 69 74 6c 65 | 0a 7b 0a 20 20 20 20 70 |...title|.{. p|
|00000ad0| 61 64 64 69 6e 67 2d 74 | 6f 70 3a 20 30 2e 32 35 |adding-t|op: 0.25|
|00000ae0| 65 6d 20 21 69 6d 70 6f | 72 74 61 6e 74 3b 0a 7d |em !impo|rtant;.}|
|00000af0| 0a 0a 2e 75 72 6c 0a 7b | 0a 20 20 20 20 63 6f 6c |...url.{|. col|
|00000b00| 6f 72 3a 20 23 30 30 30 | 30 66 66 20 21 69 6d 70 |or: #000|0ff !imp|
|00000b10| 6f 72 74 61 6e 74 3b 0a | 20 20 20 20 63 75 72 73 |ortant;.| curs|
|00000b20| 6f 72 3a 20 70 6f 69 6e | 74 65 72 20 21 69 6d 70 |or: poin|ter !imp|
|00000b30| 6f 72 74 61 6e 74 3b 0a | 20 20 20 20 74 65 78 74 |ortant;.| text|
|00000b40| 2d 64 65 63 6f 72 61 74 | 69 6f 6e 3a 20 75 6e 64 |-decorat|ion: und|
|00000b50| 65 72 6c 69 6e 65 20 21 | 69 6d 70 6f 72 74 61 6e |erline !|importan|
|00000b60| 74 3b 0a 7d 0a 2e 75 72 | 6c 3a 68 6f 76 65 72 0a |t;.}..ur|l:hover.|
|00000b70| 7b 0a 20 20 20 20 63 6f | 6c 6f 72 3a 20 23 66 66 |{. co|lor: #ff|
|00000b80| 30 30 30 30 20 21 69 6d | 70 6f 72 74 61 6e 74 3b |0000 !im|portant;|
|00000b90| 0a 7d 50 4b 03 04 0a 00 | 00 00 00 00 0f 75 aa 36 |.}PK....|.....u.6|
|00000ba0| 8d c5 08 59 59 04 00 00 | 59 04 00 00 23 00 00 00 |...YY...|Y...#...|
|00000bb0| 63 6f 6e 74 65 6e 74 2f | 77 65 62 64 65 76 65 6c |content/|webdevel|
|00000bc0| 6f 70 65 72 2f 61 62 6f | 75 74 2f 61 62 6f 75 74 |oper/abo|ut/about|
|00000bd0| 2e 6a 73 2f 2f 20 4f 70 | 65 6e 73 20 74 68 65 20 |.js// Op|ens the |
|00000be0| 55 52 4c 20 69 6e 20 61 | 20 6e 65 77 20 74 61 62 |URL in a| new tab|
|00000bf0| 0a 66 75 6e 63 74 69 6f | 6e 20 77 65 62 64 65 76 |.functio|n webdev|
|00000c00| 65 6c 6f 70 65 72 5f 6f | 70 65 6e 55 52 4c 28 75 |eloper_o|penURL(u|
|00000c10| 72 6c 45 6c 65 6d 65 6e | 74 29 0a 7b 0a 20 20 20 |rlElemen|t).{. |
|00000c20| 20 76 61 72 20 70 61 72 | 65 6e 74 57 69 6e 64 6f | var par|entWindo|
|00000c30| 77 20 3d 20 6e 75 6c 6c | 3b 0a 20 20 20 20 76 61 |w = null|;. va|
|00000c40| 72 20 75 72 6c 20 20 20 | 20 20 20 20 20 20 20 3d |r url | =|
|00000c50| 20 75 72 6c 45 6c 65 6d | 65 6e 74 2e 66 69 72 73 | urlElem|ent.firs|
|00000c60| 74 43 68 69 6c 64 2e 6e | 6f 64 65 56 61 6c 75 65 |tChild.n|odeValue|
|00000c70| 3b 0a 0a 20 20 20 20 2f | 2f 20 49 66 20 74 68 65 |;.. /|/ If the|
|00000c80| 72 65 20 69 73 20 61 20 | 70 61 72 65 6e 74 20 77 |re is a |parent w|
|00000c90| 69 6e 64 6f 77 0a 20 20 | 20 20 69 66 28 77 69 6e |indow. | if(win|
|00000ca0| 64 6f 77 2e 6f 70 65 6e | 65 72 29 0a 20 20 20 20 |dow.open|er). |
|00000cb0| 7b 0a 20 20 20 20 20 20 | 20 20 2f 2f 20 49 66 20 |{. | // If |
|00000cc0| 74 68 65 72 65 20 69 73 | 20 61 20 67 72 61 6e 64 |there is| a grand|
|00000cd0| 20 70 61 72 65 6e 74 20 | 77 69 6e 64 6f 77 0a 20 | parent |window. |
|00000ce0| 20 20 20 20 20 20 20 69 | 66 28 77 69 6e 64 6f 77 | i|f(window|
|00000cf0| 2e 6f 70 65 6e 65 72 2e | 6f 70 65 6e 65 72 29 0a |.opener.|opener).|
|00000d00| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|00000d10| 20 20 20 20 20 20 70 61 | 72 65 6e 74 57 69 6e 64 | pa|rentWind|
|00000d20| 6f 77 20 3d 20 77 69 6e | 64 6f 77 2e 6f 70 65 6e |ow = win|dow.open|
|00000d30| 65 72 2e 6f 70 65 6e 65 | 72 3b 0a 20 20 20 20 20 |er.opene|r;. |
|00000d40| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 65 6c 73 | }. | els|
|00000d50| 65 0a 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 |e. | {. |
|00000d60| 20 20 20 20 20 20 20 20 | 70 61 72 65 6e 74 57 69 | |parentWi|
|00000d70| 6e 64 6f 77 20 3d 20 77 | 69 6e 64 6f 77 2e 6f 70 |ndow = w|indow.op|
|00000d80| 65 6e 65 72 3b 0a 20 20 | 20 20 20 20 20 20 7d 0a |ener;. | }.|
|00000d90| 20 20 20 20 7d 0a 0a 20 | 20 20 20 2f 2f 20 49 66 | }.. | // If|
|00000da0| 20 61 20 70 61 72 65 6e | 74 20 77 69 6e 64 6f 77 | a paren|t window|
|00000db0| 20 77 61 73 20 66 6f 75 | 6e 64 0a 20 20 20 20 69 | was fou|nd. i|
|00000dc0| 66 28 70 61 72 65 6e 74 | 57 69 6e 64 6f 77 29 0a |f(parent|Window).|
|00000dd0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 2f 2f | {. | //|
|00000de0| 20 49 66 20 74 68 65 20 | 6f 70 65 6e 20 69 6e 20 | If the |open in |
|00000df0| 77 69 6e 64 6f 77 73 20 | 70 72 65 66 65 72 65 6e |windows |preferen|
|00000e00| 63 65 20 69 73 20 73 65 | 74 20 74 6f 20 74 72 75 |ce is se|t to tru|
|00000e10| 65 0a 20 20 20 20 20 20 | 20 20 69 66 28 77 65 62 |e. | if(web|
|00000e20| 64 65 76 65 6c 6f 70 65 | 72 5f 67 65 74 42 6f 6f |develope|r_getBoo|
|00000e30| 6c 65 61 6e 50 72 65 66 | 65 72 65 6e 63 65 28 22 |leanPref|erence("|
|00000e40| 77 65 62 64 65 76 65 6c | 6f 70 65 72 2e 6f 70 65 |webdevel|oper.ope|
|00000e50| 6e 2e 74 61 62 73 22 2c | 20 74 72 75 65 29 29 0a |n.tabs",| true)).|
|00000e60| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|00000e70| 20 20 20 20 20 20 76 61 | 72 20 6e 65 77 54 61 62 | va|r newTab|
|00000e80| 20 3d 20 70 61 72 65 6e | 74 57 69 6e 64 6f 77 2e | = paren|tWindow.|
|00000e90| 67 65 74 42 72 6f 77 73 | 65 72 28 29 2e 61 64 64 |getBrows|er().add|
|00000ea0| 54 61 62 28 75 72 6c 29 | 3b 0a 0a 20 20 20 20 20 |Tab(url)|;.. |
|00000eb0| 20 20 20 20 20 20 20 2f | 2f 20 49 66 20 74 68 65 | /|/ If the|
|00000ec0| 20 6f 70 65 6e 20 74 61 | 62 73 20 69 6e 20 62 61 | open ta|bs in ba|
|00000ed0| 63 6b 67 72 6f 75 6e 64 | 20 70 72 65 66 65 72 65 |ckground| prefere|
|00000ee0| 6e 63 65 20 69 73 20 6e | 6f 74 20 73 65 74 20 6f |nce is n|ot set o|
|00000ef0| 72 20 69 73 20 73 65 74 | 20 74 6f 20 66 61 6c 73 |r is set| to fals|
|00000f00| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 |e. | if|
|00000f10| 28 21 77 65 62 64 65 76 | 65 6c 6f 70 65 72 5f 67 |(!webdev|eloper_g|
|00000f20| 65 74 42 6f 6f 6c 65 61 | 6e 50 72 65 66 65 72 65 |etBoolea|nPrefere|
|00000f30| 6e 63 65 28 22 77 65 62 | 64 65 76 65 6c 6f 70 65 |nce("web|develope|
|00000f40| 72 2e 6f 70 65 6e 2e 74 | 61 62 73 2e 62 61 63 6b |r.open.t|abs.back|
|00000f50| 67 72 6f 75 6e 64 22 2c | 20 74 72 75 65 29 29 0a |ground",| true)).|
|00000f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0a 20 20 | | {. |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 61 | | pa|
|00000f80| 72 65 6e 74 57 69 6e 64 | 6f 77 2e 67 65 74 42 72 |rentWind|ow.getBr|
|00000f90| 6f 77 73 65 72 28 29 2e | 73 65 6c 65 63 74 65 64 |owser().|selected|
|00000fa0| 54 61 62 20 3d 20 6e 65 | 77 54 61 62 3b 0a 20 20 |Tab = ne|wTab;. |
|00000fb0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 20 20 20 20 | | }. |
|00000fc0| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 20 20 65 6c | }. | el|
|00000fd0| 73 65 0a 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 |se. | {. |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 70 61 72 65 6e 74 57 | | parentW|
|00000ff0| 69 6e 64 6f 77 2e 6f 70 | 65 6e 28 75 72 6c 29 3b |indow.op|en(url);|
|00001000| 0a 20 20 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 |. | }.. |
|00001010| 20 20 20 20 77 69 6e 64 | 6f 77 2e 63 6c 6f 73 65 | wind|ow.close|
|00001020| 28 29 3b 0a 20 20 20 20 | 7d 0a 7d 0a 50 4b 03 04 |();. |}.}.PK..|
|00001030| 0a 00 00 00 00 00 0f 75 | aa 36 03 a8 56 a9 ba 04 |.......u|.6..V...|
|00001040| 00 00 ba 04 00 00 24 00 | 00 00 63 6f 6e 74 65 6e |......$.|..conten|
|00001050| 74 2f 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2f 61 |t/webdev|eloper/a|
|00001060| 62 6f 75 74 2f 61 62 6f | 75 74 2e 78 75 6c 3c 3f |bout/abo|ut.xul<?|
|00001070| 78 6d 6c 20 76 65 72 73 | 69 6f 6e 3d 22 31 2e 30 |xml vers|ion="1.0|
|00001080| 22 3f 3e 0a 3c 3f 78 6d | 6c 2d 73 74 79 6c 65 73 |"?>.<?xm|l-styles|
|00001090| 68 65 65 74 20 68 72 65 | 66 3d 22 63 68 72 6f 6d |heet hre|f="chrom|
|000010a0| 65 3a 2f 2f 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |e://webd|eveloper|
|000010b0| 2f 63 6f 6e 74 65 6e 74 | 2f 61 62 6f 75 74 2f 61 |/content|/about/a|
|000010c0| 62 6f 75 74 2e 63 73 73 | 22 20 74 79 70 65 3d 22 |bout.css|" type="|
|000010d0| 74 65 78 74 2f 63 73 73 | 22 3f 3e 0a 0a 3c 21 44 |text/css|"?>..<!D|
|000010e0| 4f 43 54 59 50 45 20 64 | 69 61 6c 6f 67 20 53 59 |OCTYPE d|ialog SY|
|000010f0| 53 54 45 4d 20 22 63 68 | 72 6f 6d 65 3a 2f 2f 77 |STEM "ch|rome://w|
|00001100| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 6c 6f 63 61 |ebdevelo|per/loca|
|00001110| 6c 65 2f 64 69 61 6c 6f | 67 73 2e 64 74 64 22 3e |le/dialo|gs.dtd">|
|00001120| 0a 0a 3c 64 69 61 6c 6f | 67 20 62 75 74 74 6f 6e |..<dialo|g button|
|00001130| 73 3d 22 61 63 63 65 70 | 74 22 0a 20 20 20 20 20 |s="accep|t". |
|00001140| 20 20 20 69 64 3d 22 77 | 65 62 64 65 76 65 6c 6f | id="w|ebdevelo|
|00001150| 70 65 72 2d 61 62 6f 75 | 74 2d 64 69 61 6c 6f 67 |per-abou|t-dialog|
|00001160| 22 0a 20 20 20 20 20 20 | 20 20 74 69 74 6c 65 3d |". | title=|
|00001170| 22 26 77 65 62 64 65 76 | 65 6c 6f 70 65 72 2e 61 |"&webdev|eloper.a|
|00001180| 62 6f 75 74 2e 74 69 74 | 6c 65 3b 22 0a 20 20 20 |bout.tit|le;". |
|00001190| 20 20 20 20 20 78 6d 6c | 6e 73 3d 22 68 74 74 70 | xml|ns="http|
|000011a0| 3a 2f 2f 77 77 77 2e 6d | 6f 7a 69 6c 6c 61 2e 6f |://www.m|ozilla.o|
|000011b0| 72 67 2f 6b 65 79 6d 61 | 73 74 65 72 2f 67 61 74 |rg/keyma|ster/gat|
|000011c0| 65 6b 65 65 70 65 72 2f | 74 68 65 72 65 2e 69 73 |ekeeper/|there.is|
|000011d0| 2e 6f 6e 6c 79 2e 78 75 | 6c 22 3e 0a 0a 20 20 20 |.only.xu|l">.. |
|000011e0| 20 3c 73 63 72 69 70 74 | 20 74 79 70 65 3d 22 61 | <script| type="a|
|000011f0| 70 70 6c 69 63 61 74 69 | 6f 6e 2f 78 2d 6a 61 76 |pplicati|on/x-jav|
|00001200| 61 73 63 72 69 70 74 22 | 20 73 72 63 3d 22 63 68 |ascript"| src="ch|
|00001210| 72 6f 6d 65 3a 2f 2f 77 | 65 62 64 65 76 65 6c 6f |rome://w|ebdevelo|
|00001220| 70 65 72 2f 63 6f 6e 74 | 65 6e 74 2f 63 6f 6d 6d |per/cont|ent/comm|
|00001230| 6f 6e 2f 70 72 65 66 65 | 72 65 6e 63 65 73 2e 6a |on/prefe|rences.j|
|00001240| 73 22 2f 3e 0a 20 20 20 | 20 3c 73 63 72 69 70 74 |s"/>. | <script|
|00001250| 20 74 79 70 65 3d 22 61 | 70 70 6c 69 63 61 74 69 | type="a|pplicati|
|00001260| 6f 6e 2f 78 2d 6a 61 76 | 61 73 63 72 69 70 74 22 |on/x-jav|ascript"|
|00001270| 20 73 72 63 3d 22 63 68 | 72 6f 6d 65 3a 2f 2f 77 | src="ch|rome://w|
|00001280| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 63 6f 6e 74 |ebdevelo|per/cont|
|00001290| 65 6e 74 2f 61 62 6f 75 | 74 2f 61 62 6f 75 74 2e |ent/abou|t/about.|
|000012a0| 6a 73 22 2f 3e 0a 0a 20 | 20 20 20 3c 76 62 6f 78 |js"/>.. | <vbox|
|000012b0| 20 69 64 3d 22 77 65 62 | 64 65 76 65 6c 6f 70 65 | id="web|develope|
|000012c0| 72 2d 61 62 6f 75 74 2d | 64 65 74 61 69 6c 73 22 |r-about-|details"|
|000012d0| 3e 0a 20 20 20 20 20 20 | 20 20 3c 68 62 6f 78 3e |>. | <hbox>|
|000012e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 3c 64 65 |. | <de|
|000012f0| 73 63 72 69 70 74 69 6f | 6e 20 63 6c 61 73 73 3d |scriptio|n class=|
|00001300| 22 6e 61 6d 65 22 3e 57 | 65 62 20 44 65 76 65 6c |"name">W|eb Devel|
|00001310| 6f 70 65 72 3c 2f 64 65 | 73 63 72 69 70 74 69 6f |oper</de|scriptio|
|00001320| 6e 3e 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 3c |n>. | <|
|00001330| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 63 6c 61 73 |descript|ion clas|
|00001340| 73 3d 22 6e 61 6d 65 22 | 3e 31 2e 31 2e 34 3c 2f |s="name"|>1.1.4</|
|00001350| 64 65 73 63 72 69 70 74 | 69 6f 6e 3e 0a 20 20 20 |descript|ion>. |
|00001360| 20 20 20 20 20 3c 2f 68 | 62 6f 78 3e 0a 20 20 20 | </h|box>. |
|00001370| 20 20 20 20 20 3c 64 65 | 73 63 72 69 70 74 69 6f | <de|scriptio|
|00001380| 6e 20 76 61 6c 75 65 3d | 22 26 77 65 62 64 65 76 |n value=|"&webdev|
|00001390| 65 6c 6f 70 65 72 2e 61 | 62 6f 75 74 2e 62 75 69 |eloper.a|bout.bui|
|000013a0| 6c 64 2e 64 61 74 65 3b | 22 20 63 6c 61 73 73 3d |ld.date;|" class=|
|000013b0| 22 74 69 74 6c 65 22 2f | 3e 0a 20 20 20 20 20 20 |"title"/|>. |
|000013c0| 20 20 3c 64 65 73 63 72 | 69 70 74 69 6f 6e 20 63 | <descr|iption c|
|000013d0| 6c 61 73 73 3d 22 64 61 | 74 65 22 3e 4d 61 79 20 |lass="da|te">May |
|000013e0| 31 30 2c 20 32 30 30 37 | 3c 2f 64 65 73 63 72 69 |10, 2007|</descri|
|000013f0| 70 74 69 6f 6e 3e 0a 20 | 20 20 20 20 20 20 20 3c |ption>. | <|
|00001400| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 76 61 6c 75 |descript|ion valu|
|00001410| 65 3d 22 26 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |e="&webd|eveloper|
|00001420| 2e 61 62 6f 75 74 2e 61 | 75 74 68 6f 72 3b 22 20 |.about.a|uthor;" |
|00001430| 63 6c 61 73 73 3d 22 74 | 69 74 6c 65 22 2f 3e 0a |class="t|itle"/>.|
|00001440| 20 20 20 20 20 20 20 20 | 3c 64 65 73 63 72 69 70 | |<descrip|
|00001450| 74 69 6f 6e 3e 43 68 72 | 69 73 20 50 65 64 65 72 |tion>Chr|is Peder|
|00001460| 69 63 6b 3c 2f 64 65 73 | 63 72 69 70 74 69 6f 6e |ick</des|cription|
|00001470| 3e 0a 20 20 20 20 20 20 | 20 20 3c 64 65 73 63 72 |>. | <descr|
|00001480| 69 70 74 69 6f 6e 20 6f | 6e 63 6c 69 63 6b 3d 22 |iption o|nclick="|
|00001490| 77 65 62 64 65 76 65 6c | 6f 70 65 72 5f 6f 70 65 |webdevel|oper_ope|
|000014a0| 6e 55 52 4c 28 74 68 69 | 73 29 22 20 63 6c 61 73 |nURL(thi|s)" clas|
|000014b0| 73 3d 22 75 72 6c 22 3e | 68 74 74 70 3a 2f 2f 63 |s="url">|http://c|
|000014c0| 68 72 69 73 70 65 64 65 | 72 69 63 6b 2e 63 6f 6d |hrispede|rick.com|
|000014d0| 2f 77 6f 72 6b 2f 77 65 | 62 2d 64 65 76 65 6c 6f |/work/we|b-develo|
|000014e0| 70 65 72 2f 3c 2f 64 65 | 73 63 72 69 70 74 69 6f |per/</de|scriptio|
|000014f0| 6e 3e 0a 20 20 20 20 3c | 2f 76 62 6f 78 3e 0a 20 |n>. <|/vbox>. |
|00001500| 20 20 20 3c 73 65 70 61 | 72 61 74 6f 72 20 63 6c | <sepa|rator cl|
|00001510| 61 73 73 3d 22 67 72 6f | 6f 76 65 22 2f 3e 0a 3c |ass="gro|ove"/>.<|
|00001520| 2f 64 69 61 6c 6f 67 3e | 50 4b 03 04 0a 00 00 00 |/dialog>|PK......|
|00001530| 00 00 0e 75 aa 36 f1 19 | ab 43 a4 19 00 00 a4 19 |...u.6..|.C......|
|00001540| 00 00 2a 00 00 00 63 6f | 6e 74 65 6e 74 2f 77 65 |..*...co|ntent/we|
|00001550| 62 64 65 76 65 6c 6f 70 | 65 72 2f 63 6f 6d 6d 6f |bdevelop|er/commo|
|00001560| 6e 2f 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 6a 73 |n/applic|ation.js|
|00001570| 2f 2f 20 43 6f 6e 73 74 | 72 75 63 74 73 20 61 6e |// Const|ructs an|
|00001580| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6f 62 6a | applica|tion obj|
|00001590| 65 63 74 0a 66 75 6e 63 | 74 69 6f 6e 20 57 65 62 |ect.func|tion Web|
|000015a0| 44 65 76 65 6c 6f 70 65 | 72 41 70 70 6c 69 63 61 |Develope|rApplica|
|000015b0| 74 69 6f 6e 28 61 70 70 | 6c 69 63 61 74 69 6f 6e |tion(app|lication|
|000015c0| 50 61 74 68 29 0a 7b 0a | 20 20 20 20 74 68 69 73 |Path).{.| this|
|000015d0| 2e 61 70 70 6c 69 63 61 | 74 69 6f 6e 50 61 74 68 |.applica|tionPath|
|000015e0| 20 3d 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 50 61 | = appli|cationPa|
|000015f0| 74 68 3b 0a 20 20 20 20 | 74 68 69 73 2e 65 78 65 |th;. |this.exe|
|00001600| 63 75 74 61 62 6c 65 20 | 20 20 20 20 20 3d 20 74 |cutable | = t|
|00001610| 68 69 73 2e 67 65 74 45 | 78 65 63 75 74 61 62 6c |his.getE|xecutabl|
|00001620| 65 28 29 3b 0a 20 20 20 | 20 74 68 69 73 2e 66 69 |e();. | this.fi|
|00001630| 6c 65 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 20 |le | = |
|00001640| 6e 75 6c 6c 3b 0a 7d 0a | 0a 2f 2f 20 43 72 65 61 |null;.}.|.// Crea|
|00001650| 74 65 73 20 61 20 73 6f | 75 72 63 65 20 66 69 6c |tes a so|urce fil|
|00001660| 65 0a 57 65 62 44 65 76 | 65 6c 6f 70 65 72 41 70 |e.WebDev|eloperAp|
|00001670| 70 6c 69 63 61 74 69 6f | 6e 2e 70 72 6f 74 6f 74 |plicatio|n.protot|
|00001680| 79 70 65 2e 63 72 65 61 | 74 65 53 6f 75 72 63 65 |ype.crea|teSource|
|00001690| 46 69 6c 65 20 3d 20 66 | 75 6e 63 74 69 6f 6e 28 |File = f|unction(|
|000016a0| 74 65 6d 70 6f 72 61 72 | 79 44 69 72 65 63 74 6f |temporar|yDirecto|
|000016b0| 72 79 2c 20 75 72 69 29 | 0a 7b 0a 20 20 20 20 76 |ry, uri)|.{. v|
|000016c0| 61 72 20 73 6f 75 72 63 | 65 46 69 6c 65 20 3d 20 |ar sourc|eFile = |
|000016d0| 6e 75 6c 6c 3b 0a 0a 20 | 20 20 20 2f 2f 20 49 66 |null;.. | // If|
|000016e0| 20 74 68 65 20 55 52 49 | 20 68 61 73 20 61 20 66 | the URI| has a f|
|000016f0| 69 6c 65 20 73 63 68 65 | 6d 65 0a 20 20 20 20 69 |ile sche|me. i|
|00001700| 66 28 75 72 69 2e 73 63 | 68 65 6d 65 20 3d 3d 20 |f(uri.sc|heme == |
|00001710| 22 66 69 6c 65 22 29 0a | 20 20 20 20 7b 0a 20 20 |"file").| {. |
|00001720| 20 20 20 20 20 20 76 61 | 72 20 66 69 6c 65 50 72 | va|r filePr|
|00001730| 6f 74 6f 63 6f 6c 48 61 | 6e 64 6c 65 72 20 3d 20 |otocolHa|ndler = |
|00001740| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00001750| 65 73 5b 22 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 |es["@moz|illa.org|
|00001760| 2f 6e 65 74 77 6f 72 6b | 2f 70 72 6f 74 6f 63 6f |/network|/protoco|
|00001770| 6c 3b 31 3f 6e 61 6d 65 | 3d 66 69 6c 65 22 5d 2e |l;1?name|=file"].|
|00001780| 63 72 65 61 74 65 49 6e | 73 74 61 6e 63 65 28 43 |createIn|stance(C|
|00001790| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 69 6e 74 65 72 66 |omponent|s.interf|
|000017a0| 61 63 65 73 2e 6e 73 49 | 46 69 6c 65 50 72 6f 74 |aces.nsI|FileProt|
|000017b0| 6f 63 6f 6c 48 61 6e 64 | 6c 65 72 29 3b 0a 0a 20 |ocolHand|ler);.. |
|000017c0| 20 20 20 20 20 20 20 73 | 6f 75 72 63 65 46 69 6c | s|ourceFil|
|000017d0| 65 20 3d 20 66 69 6c 65 | 50 72 6f 74 6f 63 6f 6c |e = file|Protocol|
|000017e0| 48 61 6e 64 6c 65 72 2e | 67 65 74 46 69 6c 65 46 |Handler.|getFileF|
|000017f0| 72 6f 6d 55 52 4c 53 70 | 65 63 28 75 72 69 2e 73 |romURLSp|ec(uri.s|
|00001800| 70 65 63 29 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |pec);. | }.. |
|00001810| 20 2f 2f 20 49 66 20 74 | 68 65 20 73 6f 75 72 63 | // If t|he sourc|
|00001820| 65 20 66 69 6c 65 20 69 | 73 20 6e 6f 74 20 73 65 |e file i|s not se|
|00001830| 74 0a 20 20 20 20 69 66 | 28 21 73 6f 75 72 63 65 |t. if|(!source|
|00001840| 46 69 6c 65 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |File). | {. |
|00001850| 20 20 20 20 76 61 72 20 | 66 69 6c 65 45 78 74 65 | var |fileExte|
|00001860| 6e 73 69 6f 6e 20 3d 20 | 22 68 74 6d 6c 22 3b 0a |nsion = |"html";.|
|00001870| 20 20 20 20 20 20 20 20 | 76 61 72 20 66 69 6c 65 | |var file|
|00001880| 4e 61 6d 65 20 20 20 20 | 20 20 3d 20 75 72 69 2e |Name | = uri.|
|00001890| 68 6f 73 74 3b 0a 20 20 | 20 20 20 20 20 20 76 61 |host;. | va|
|000018a0| 72 20 75 72 6c 20 20 20 | 20 20 20 20 20 20 20 20 |r url | |
|000018b0| 3d 20 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 63 6c 61 |= Compon|ents.cla|
|000018c0| 73 73 65 73 5b 22 40 6d | 6f 7a 69 6c 6c 61 2e 6f |sses["@m|ozilla.o|
|000018d0| 72 67 2f 6e 65 74 77 6f | 72 6b 2f 73 74 61 6e 64 |rg/netwo|rk/stand|
|000018e0| 61 72 64 2d 75 72 6c 3b | 31 22 5d 2e 63 72 65 61 |ard-url;|1"].crea|
|000018f0| 74 65 49 6e 73 74 61 6e | 63 65 28 43 6f 6d 70 6f |teInstan|ce(Compo|
|00001900| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|00001910| 2e 6e 73 49 55 52 4c 29 | 3b 0a 0a 20 20 20 20 20 |.nsIURL)|;.. |
|00001920| 20 20 20 73 6f 75 72 63 | 65 46 69 6c 65 20 3d 20 | sourc|eFile = |
|00001930| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 63 6c 61 73 73 |Componen|ts.class|
|00001940| 65 73 5b 22 40 6d 6f 7a | 69 6c 6c 61 2e 6f 72 67 |es["@moz|illa.org|
|00001950| 2f 66 69 6c 65 2f 6c 6f | 63 61 6c 3b 31 22 5d 2e |/file/lo|cal;1"].|
|00001960| 63 72 65 61 74 65 49 6e | 73 74 61 6e 63 65 28 43 |createIn|stance(C|
|00001970| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 69 6e 74 65 72 66 |omponent|s.interf|
|00001980| 61 63 65 73 2e 6e 73 49 | 4c 6f 63 61 6c 46 69 6c |aces.nsI|LocalFil|
|00001990| 65 29 3b 0a 20 20 20 20 | 20 20 20 20 75 72 6c 2e |e);. | url.|
|000019a0| 73 70 65 63 20 20 20 3d | 20 75 72 69 2e 73 70 65 |spec =| uri.spe|
|000019b0| 63 3b 0a 0a 20 20 20 20 | 20 20 20 20 2f 2f 20 49 |c;.. | // I|
|000019c0| 66 20 74 68 65 20 55 52 | 4c 20 68 61 73 20 61 20 |f the UR|L has a |
|000019d0| 66 69 6c 65 20 65 78 74 | 65 6e 73 69 6f 6e 0a 20 |file ext|ension. |
|000019e0| 20 20 20 20 20 20 20 69 | 66 28 75 72 6c 2e 66 69 | i|f(url.fi|
|000019f0| 6c 65 45 78 74 65 6e 73 | 69 6f 6e 29 0a 20 20 20 |leExtens|ion). |
|00001a00| 20 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 20 | {. | |
|00001a10| 20 20 20 66 69 6c 65 45 | 78 74 65 6e 73 69 6f 6e | fileE|xtension|
|00001a20| 20 3d 20 75 72 6c 2e 66 | 69 6c 65 45 78 74 65 6e | = url.f|ileExten|
|00001a30| 73 69 6f 6e 3b 0a 20 20 | 20 20 20 20 20 20 7d 0a |sion;. | }.|
|00001a40| 0a 20 20 20 20 20 20 20 | 20 74 65 6d 70 6f 72 61 |. | tempora|
|00001a50| 72 79 44 69 72 65 63 74 | 6f 72 79 2e 61 70 70 65 |ryDirect|ory.appe|
|00001a60| 6e 64 28 22 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |nd("webd|eveloper|
|00001a70| 5f 22 20 2b 20 66 69 6c | 65 4e 61 6d 65 20 2b 20 |_" + fil|eName + |
|00001a80| 22 5f 22 20 2b 20 6e 65 | 77 20 44 61 74 65 28 29 |"_" + ne|w Date()|
|00001a90| 2e 67 65 74 54 69 6d 65 | 28 29 20 2b 20 22 2e 22 |.getTime|() + "."|
|00001aa0| 20 2b 20 66 69 6c 65 45 | 78 74 65 6e 73 69 6f 6e | + fileE|xtension|
|00001ab0| 29 3b 0a 20 20 20 20 20 | 20 20 20 73 6f 75 72 63 |);. | sourc|
|00001ac0| 65 46 69 6c 65 2e 69 6e | 69 74 57 69 74 68 50 61 |eFile.in|itWithPa|
|00001ad0| 74 68 28 74 65 6d 70 6f | 72 61 72 79 44 69 72 65 |th(tempo|raryDire|
|00001ae0| 63 74 6f 72 79 2e 70 61 | 74 68 29 3b 0a 20 20 20 |ctory.pa|th);. |
|00001af0| 20 7d 0a 0a 20 20 20 20 | 72 65 74 75 72 6e 20 73 | }.. |return s|
|00001b00| 6f 75 72 63 65 46 69 6c | 65 3b 0a 7d 0a 0a 2f 2f |ourceFil|e;.}..//|
|00001b10| 20 52 65 74 75 72 6e 73 | 20 61 6e 20 65 78 65 63 | Returns| an exec|
|00001b20| 75 74 61 62 6c 65 20 66 | 6f 72 20 74 68 65 20 61 |utable f|or the a|
|00001b30| 70 70 6c 69 63 61 74 69 | 6f 6e 0a 57 65 62 44 65 |pplicati|on.WebDe|
|00001b40| 76 65 6c 6f 70 65 72 41 | 70 70 6c 69 63 61 74 69 |veloperA|pplicati|
|00001b50| 6f 6e 2e 70 72 6f 74 6f | 74 79 70 65 2e 67 65 74 |on.proto|type.get|
|00001b60| 45 78 65 63 75 74 61 62 | 6c 65 20 3d 20 66 75 6e |Executab|le = fun|
|00001b70| 63 74 69 6f 6e 28 29 0a | 7b 0a 20 20 20 20 76 61 |ction().|{. va|
|00001b80| 72 20 65 78 65 63 75 74 | 61 62 6c 65 20 3d 20 43 |r execut|able = C|
|00001b90| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 63 6c 61 73 73 65 |omponent|s.classe|
|00001ba0| 73 5b 22 40 6d 6f 7a 69 | 6c 6c 61 2e 6f 72 67 2f |s["@mozi|lla.org/|
|00001bb0| 66 69 6c 65 2f 6c 6f 63 | 61 6c 3b 31 22 5d 2e 63 |file/loc|al;1"].c|
|00001bc0| 72 65 61 74 65 49 6e 73 | 74 61 6e 63 65 28 43 6f |reateIns|tance(Co|
|00001bd0| 6d 70 6f 6e 65 6e 74 73 | 2e 69 6e 74 65 72 66 61 |mponents|.interfa|
|00001be0| 63 65 73 2e 6e 73 49 4c | 6f 63 61 6c 46 69 6c 65 |ces.nsIL|ocalFile|
|00001bf0| 29 3b 0a 0a 20 20 20 20 | 65 78 65 63 75 74 61 62 |);.. |executab|
|00001c00| 6c 65 2e 69 6e 69 74 57 | 69 74 68 50 61 74 68 28 |le.initW|ithPath(|
|00001c10| 74 68 69 73 2e 61 70 70 | 6c 69 63 61 74 69 6f 6e |this.app|lication|
|00001c20| 50 61 74 68 29 3b 0a 0a | 20 20 20 20 72 65 74 75 |Path);..| retu|
|00001c30| 72 6e 20 65 78 65 63 75 | 74 61 62 6c 65 3b 0a 7d |rn execu|table;.}|
|00001c40| 0a 0a 2f 2f 20 52 65 74 | 75 72 6e 73 20 74 68 65 |..// Ret|urns the|
|00001c50| 20 70 6f 73 74 20 64 61 | 74 61 0a 57 65 62 44 65 | post da|ta.WebDe|
|00001c60| 76 65 6c 6f 70 65 72 41 | 70 70 6c 69 63 61 74 69 |veloperA|pplicati|
|00001c70| 6f 6e 2e 70 72 6f 74 6f | 74 79 70 65 2e 67 65 74 |on.proto|type.get|
|00001c80| 50 6f 73 74 44 61 74 61 | 20 3d 20 66 75 6e 63 74 |PostData| = funct|
|00001c90| 69 6f 6e 28 29 0a 7b 0a | 20 20 20 20 2f 2f 20 54 |ion().{.| // T|
|00001ca0| 72 79 20 74 6f 20 67 65 | 74 20 74 68 65 20 70 6f |ry to ge|t the po|
|00001cb0| 73 74 20 64 61 74 61 0a | 20 20 20 20 74 72 79 0a |st data.| try.|
|00001cc0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 76 61 | {. | va|
|00001cd0| 72 20 73 65 73 73 69 6f | 6e 48 69 73 74 6f 72 79 |r sessio|nHistory|
|00001ce0| 20 3d 20 67 65 74 57 65 | 62 4e 61 76 69 67 61 74 | = getWe|bNavigat|
|00001cf0| 69 6f 6e 28 29 2e 73 65 | 73 73 69 6f 6e 48 69 73 |ion().se|ssionHis|
|00001d00| 74 6f 72 79 3b 0a 20 20 | 20 20 20 20 20 20 76 61 |tory;. | va|
|00001d10| 72 20 65 6e 74 72 79 20 | 20 20 20 20 20 20 20 20 |r entry | |
|00001d20| 20 3d 20 73 65 73 73 69 | 6f 6e 48 69 73 74 6f 72 | = sessi|onHistor|
|00001d30| 79 2e 67 65 74 45 6e 74 | 72 79 41 74 49 6e 64 65 |y.getEnt|ryAtInde|
|00001d40| 78 28 73 65 73 73 69 6f | 6e 48 69 73 74 6f 72 79 |x(sessio|nHistory|
|00001d50| 2e 69 6e 64 65 78 2c 20 | 66 61 6c 73 65 29 2e 51 |.index, |false).Q|
|00001d60| 75 65 72 79 49 6e 74 65 | 72 66 61 63 65 28 43 6f |ueryInte|rface(Co|
|00001d70| 6d 70 6f 6e 65 6e 74 73 | 2e 69 6e 74 65 72 66 61 |mponents|.interfa|
|00001d80| 63 65 73 2e 6e 73 49 53 | 48 45 6e 74 72 79 29 3b |ces.nsIS|HEntry);|
|00001d90| 0a 0a 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |.. | return|
|00001da0| 20 65 6e 74 72 79 2e 70 | 6f 73 74 44 61 74 61 3b | entry.p|ostData;|
|00001db0| 0a 20 20 20 20 7d 0a 20 | 20 20 20 63 61 74 63 68 |. }. | catch|
|00001dc0| 28 65 78 63 65 70 74 69 | 6f 6e 29 0a 20 20 20 20 |(excepti|on). |
|00001dd0| 7b 0a 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |{. | return|
|00001de0| 20 6e 75 6c 6c 3b 0a 20 | 20 20 20 7d 0a 7d 0a 0a | null;. | }.}..|
|00001df0| 2f 2f 20 4c 61 75 6e 63 | 68 20 74 68 65 20 61 70 |// Launc|h the ap|
|00001e00| 70 6c 69 63 61 74 69 6f | 6e 20 77 69 74 68 20 74 |plicatio|n with t|
|00001e10| 68 65 20 67 69 76 65 6e | 20 66 69 6c 65 0a 57 65 |he given| file.We|
|00001e20| 62 44 65 76 65 6c 6f 70 | 65 72 41 70 70 6c 69 63 |bDevelop|erApplic|
|00001e30| 61 74 69 6f 6e 2e 70 72 | 6f 74 6f 74 79 70 65 2e |ation.pr|ototype.|
|00001e40| 6c 61 75 6e 63 68 57 69 | 74 68 46 69 6c 65 20 3d |launchWi|thFile =|
|00001e50| 20 66 75 6e 63 74 69 6f | 6e 28 29 0a 7b 0a 20 20 | functio|n().{. |
|00001e60| 20 20 76 61 72 20 6d 69 | 6d 65 53 65 72 76 69 63 | var mi|meServic|
|00001e70| 65 20 3d 20 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 63 |e = Comp|onents.c|
|00001e80| 6c 61 73 73 65 73 5b 22 | 40 6d 6f 7a 69 6c 6c 61 |lasses["|@mozilla|
|00001e90| 2e 6f 72 67 2f 75 72 69 | 6c 6f 61 64 65 72 2f 65 |.org/uri|loader/e|
|00001ea0| 78 74 65 72 6e 61 6c 2d | 68 65 6c 70 65 72 2d 61 |xternal-|helper-a|
|00001eb0| 70 70 2d 73 65 72 76 69 | 63 65 3b 31 22 5d 2e 67 |pp-servi|ce;1"].g|
|00001ec0| 65 74 53 65 72 76 69 63 | 65 28 43 6f 6d 70 6f 6e |etServic|e(Compon|
|00001ed0| 65 6e 74 73 2e 69 6e 74 | 65 72 66 61 63 65 73 2e |ents.int|erfaces.|
|00001ee0| 6e 73 49 4d 49 4d 45 53 | 65 72 76 69 63 65 29 3b |nsIMIMES|ervice);|
|00001ef0| 0a 20 20 20 20 76 61 72 | 20 6d 69 6d 65 49 6e 66 |. var| mimeInf|
|00001f00| 6f 20 20 20 20 3d 20 6d | 69 6d 65 53 65 72 76 69 |o = m|imeServi|
|00001f10| 63 65 2e 67 65 74 46 72 | 6f 6d 54 79 70 65 41 6e |ce.getFr|omTypeAn|
|00001f20| 64 45 78 74 65 6e 73 69 | 6f 6e 28 74 68 69 73 2e |dExtensi|on(this.|
|00001f30| 66 69 6c 65 2e 70 61 74 | 68 2c 20 6e 75 6c 6c 29 |file.pat|h, null)|
|00001f40| 3b 0a 0a 20 20 20 20 6d | 69 6d 65 49 6e 66 6f 2e |;.. m|imeInfo.|
|00001f50| 61 6c 77 61 79 73 41 73 | 6b 42 65 66 6f 72 65 48 |alwaysAs|kBeforeH|
|00001f60| 61 6e 64 6c 69 6e 67 20 | 20 20 20 20 3d 20 66 61 |andling | = fa|
|00001f70| 6c 73 65 3b 0a 20 20 20 | 20 6d 69 6d 65 49 6e 66 |lse;. | mimeInf|
|00001f80| 6f 2e 70 72 65 66 65 72 | 72 65 64 41 63 74 69 6f |o.prefer|redActio|
|00001f90| 6e 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 20 |n | = |
|00001fa0| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 69 6e 74 65 72 |Componen|ts.inter|
|00001fb0| 66 61 63 65 73 2e 6e 73 | 49 4d 49 4d 45 49 6e 66 |faces.ns|IMIMEInf|
|00001fc0| 6f 2e 75 73 65 48 65 6c | 70 65 72 41 70 70 3b 0a |o.useHel|perApp;.|
|00001fd0| 20 20 20 20 6d 69 6d 65 | 49 6e 66 6f 2e 70 72 65 | mime|Info.pre|
|00001fe0| 66 65 72 72 65 64 41 70 | 70 6c 69 63 61 74 69 6f |ferredAp|plicatio|
|00001ff0| 6e 48 61 6e 64 6c 65 72 | 20 3d 20 74 68 69 73 2e |nHandler| = this.|
|00002000| 65 78 65 63 75 74 61 62 | 6c 65 3b 0a 0a 20 20 20 |executab|le;.. |
|00002010| 20 6d 69 6d 65 49 6e 66 | 6f 2e 6c 61 75 6e 63 68 | mimeInf|o.launch|
|00002020| 57 69 74 68 46 69 6c 65 | 28 74 68 69 73 2e 66 69 |WithFile|(this.fi|
|00002030| 6c 65 29 3b 0a 7d 0a 0a | 2f 2f 20 4c 61 75 6e 63 |le);.}..|// Launc|
|00002040| 68 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |h the ap|plicatio|
|00002050| 6e 20 77 69 74 68 20 74 | 68 65 20 73 6f 75 72 63 |n with t|he sourc|
|00002060| 65 20 66 72 6f 6d 20 74 | 68 65 20 67 69 76 65 6e |e from t|he given|
|00002070| 20 55 52 49 0a 57 65 62 | 44 65 76 65 6c 6f 70 65 | URI.Web|Develope|
|00002080| 72 41 70 70 6c 69 63 61 | 74 69 6f 6e 2e 70 72 6f |rApplica|tion.pro|
|00002090| 74 6f 74 79 70 65 2e 6c | 61 75 6e 63 68 57 69 74 |totype.l|aunchWit|
|000020a0| 68 53 6f 75 72 63 65 20 | 3d 20 66 75 6e 63 74 69 |hSource |= functi|
|000020b0| 6f 6e 28 75 72 69 29 0a | 7b 0a 20 20 20 20 76 61 |on(uri).|{. va|
|000020c0| 72 20 73 74 72 69 6e 67 | 42 75 6e 64 6c 65 20 20 |r string|Bundle |
|000020d0| 20 20 20 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e | = d|ocument.|
|000020e0| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|000020f0| 77 65 62 64 65 76 65 6c | 6f 70 65 72 2d 73 74 72 |webdevel|oper-str|
|00002100| 69 6e 67 2d 62 75 6e 64 | 6c 65 22 29 3b 0a 20 20 |ing-bund|le");. |
|00002110| 20 20 76 61 72 20 74 65 | 6d 70 6f 72 61 72 79 44 | var te|mporaryD|
|00002120| 69 72 65 63 74 6f 72 79 | 20 3d 20 43 6f 6d 70 6f |irectory| = Compo|
|00002130| 6e 65 6e 74 73 2e 63 6c | 61 73 73 65 73 5b 22 40 |nents.cl|asses["@|
|00002140| 6d 6f 7a 69 6c 6c 61 2e | 6f 72 67 2f 66 69 6c 65 |mozilla.|org/file|
|00002150| 2f 64 69 72 65 63 74 6f | 72 79 5f 73 65 72 76 69 |/directo|ry_servi|
|00002160| 63 65 3b 31 22 5d 2e 67 | 65 74 53 65 72 76 69 63 |ce;1"].g|etServic|
|00002170| 65 28 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 69 6e 74 |e(Compon|ents.int|
|00002180| 65 72 66 61 63 65 73 2e | 6e 73 49 50 72 6f 70 65 |erfaces.|nsIPrope|
|00002190| 72 74 69 65 73 29 2e 67 | 65 74 28 22 54 6d 70 44 |rties).g|et("TmpD|
|000021a0| 22 2c 20 43 6f 6d 70 6f | 6e 65 6e 74 73 2e 69 6e |", Compo|nents.in|
|000021b0| 74 65 72 66 61 63 65 73 | 2e 6e 73 49 46 69 6c 65 |terfaces|.nsIFile|
|000021c0| 29 3b 0a 0a 20 20 20 20 | 2f 2f 20 49 66 20 74 68 |);.. |// If th|
|000021d0| 65 20 74 65 6d 70 6f 72 | 61 72 79 20 64 69 72 65 |e tempor|ary dire|
|000021e0| 63 74 6f 72 79 20 65 78 | 69 73 74 73 2c 20 69 73 |ctory ex|ists, is|
|000021f0| 20 61 20 64 69 72 65 63 | 74 6f 72 79 20 61 6e 64 | a direc|tory and|
|00002200| 20 69 73 20 77 72 69 74 | 61 62 6c 65 0a 20 20 20 | is writ|able. |
|00002210| 20 69 66 28 74 65 6d 70 | 6f 72 61 72 79 44 69 72 | if(temp|oraryDir|
|00002220| 65 63 74 6f 72 79 2e 65 | 78 69 73 74 73 28 29 20 |ectory.e|xists() |
|00002230| 26 26 20 74 65 6d 70 6f | 72 61 72 79 44 69 72 65 |&& tempo|raryDire|
|00002240| 63 74 6f 72 79 2e 69 73 | 44 69 72 65 63 74 6f 72 |ctory.is|Director|
|00002250| 79 28 29 20 26 26 20 74 | 65 6d 70 6f 72 61 72 79 |y() && t|emporary|
|00002260| 44 69 72 65 63 74 6f 72 | 79 2e 69 73 57 72 69 74 |Director|y.isWrit|
|00002270| 61 62 6c 65 28 29 29 0a | 20 20 20 20 7b 0a 20 20 |able()).| {. |
|00002280| 20 20 20 20 20 20 2f 2f | 20 49 66 20 74 68 65 20 | //| If the |
|00002290| 65 78 65 63 75 74 61 62 | 6c 65 20 65 78 69 73 74 |executab|le exist|
|000022a0| 73 0a 20 20 20 20 20 20 | 20 20 69 66 28 74 68 69 |s. | if(thi|
|000022b0| 73 2e 65 78 65 63 75 74 | 61 62 6c 65 2e 65 78 69 |s.execut|able.exi|
|000022c0| 73 74 73 28 29 29 0a 20 | 20 20 20 20 20 20 20 7b |sts()). | {|
|000022d0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 74 68 69 |. | thi|
|000022e0| 73 2e 66 69 6c 65 20 3d | 20 74 68 69 73 2e 63 72 |s.file =| this.cr|
|000022f0| 65 61 74 65 53 6f 75 72 | 63 65 46 69 6c 65 28 74 |eateSour|ceFile(t|
|00002300| 65 6d 70 6f 72 61 72 79 | 44 69 72 65 63 74 6f 72 |emporary|Director|
|00002310| 79 2c 20 75 72 69 29 3b | 0a 0a 20 20 20 20 20 20 |y, uri);|.. |
|00002320| 20 20 20 20 20 20 69 66 | 28 75 72 69 2e 73 63 68 | if|(uri.sch|
|00002330| 65 6d 65 20 3d 3d 20 22 | 66 69 6c 65 22 29 0a 20 |eme == "|file"). |
|00002340| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|00002350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 68 69 | | thi|
|00002360| 73 2e 6c 61 75 6e 63 68 | 57 69 74 68 46 69 6c 65 |s.launch|WithFile|
|00002370| 28 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |();. | |
|00002380| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6c |}. | el|
|00002390| 73 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7b |se. | {|
|000023a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000023b0| 20 76 61 72 20 77 65 62 | 42 72 6f 77 73 65 72 50 | var web|BrowserP|
|000023c0| 65 72 73 69 73 74 49 6e | 74 65 72 66 61 63 65 20 |ersistIn|terface |
|000023d0| 3d 20 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 69 6e 74 |= Compon|ents.int|
|000023e0| 65 72 66 61 63 65 73 2e | 6e 73 49 57 65 62 42 72 |erfaces.|nsIWebBr|
|000023f0| 6f 77 73 65 72 50 65 72 | 73 69 73 74 3b 0a 20 20 |owserPer|sist;. |
|00002400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 76 61 | | va|
|00002410| 72 20 77 65 62 42 72 6f | 77 73 65 72 50 65 72 73 |r webBro|wserPers|
|00002420| 69 73 74 20 20 20 20 20 | 20 20 20 20 20 3d 20 43 |ist | = C|
|00002430| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 63 6c 61 73 73 65 |omponent|s.classe|
|00002440| 73 5b 22 40 6d 6f 7a 69 | 6c 6c 61 2e 6f 72 67 2f |s["@mozi|lla.org/|
|00002450| 65 6d 62 65 64 64 69 6e | 67 2f 62 72 6f 77 73 65 |embeddin|g/browse|
|00002460| 72 2f 6e 73 57 65 62 42 | 72 6f 77 73 65 72 50 65 |r/nsWebB|rowserPe|
|00002470| 72 73 69 73 74 3b 31 22 | 5d 2e 63 72 65 61 74 65 |rsist;1"|].create|
|00002480| 49 6e 73 74 61 6e 63 65 | 28 77 65 62 42 72 6f 77 |Instance|(webBrow|
|00002490| 73 65 72 50 65 72 73 69 | 73 74 49 6e 74 65 72 66 |serPersi|stInterf|
|000024a0| 61 63 65 29 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |ace);.. | |
|000024b0| 20 20 20 20 20 20 20 77 | 65 62 42 72 6f 77 73 65 | w|ebBrowse|
|000024c0| 72 50 65 72 73 69 73 74 | 2e 70 65 72 73 69 73 74 |rPersist|.persist|
|000024d0| 46 6c 61 67 73 20 20 20 | 20 20 3d 20 77 65 62 42 |Flags | = webB|
|000024e0| 72 6f 77 73 65 72 50 65 | 72 73 69 73 74 49 6e 74 |rowserPe|rsistInt|
|000024f0| 65 72 66 61 63 65 2e 50 | 45 52 53 49 53 54 5f 46 |erface.P|ERSIST_F|
|00002500| 4c 41 47 53 5f 41 55 54 | 4f 44 45 54 45 43 54 5f |LAGS_AUT|ODETECT_|
|00002510| 41 50 50 4c 59 5f 43 4f | 4e 56 45 52 53 49 4f 4e |APPLY_CO|NVERSION|
|00002520| 20 7c 20 77 65 62 42 72 | 6f 77 73 65 72 50 65 72 | | webBr|owserPer|
|00002530| 73 69 73 74 49 6e 74 65 | 72 66 61 63 65 2e 50 45 |sistInte|rface.PE|
|00002540| 52 53 49 53 54 5f 46 4c | 41 47 53 5f 46 52 4f 4d |RSIST_FL|AGS_FROM|
|00002550| 5f 43 41 43 48 45 20 7c | 20 77 65 62 42 72 6f 77 |_CACHE || webBrow|
|00002560| 73 65 72 50 65 72 73 69 | 73 74 49 6e 74 65 72 66 |serPersi|stInterf|
|00002570| 61 63 65 2e 50 45 52 53 | 49 53 54 5f 46 4c 41 47 |ace.PERS|IST_FLAG|
|00002580| 53 5f 52 45 50 4c 41 43 | 45 5f 45 58 49 53 54 49 |S_REPLAC|E_EXISTI|
|00002590| 4e 47 5f 46 49 4c 45 53 | 3b 0a 20 20 20 20 20 20 |NG_FILES|;. |
|000025a0| 20 20 20 20 20 20 20 20 | 20 20 77 65 62 42 72 6f | | webBro|
|000025b0| 77 73 65 72 50 65 72 73 | 69 73 74 2e 70 72 6f 67 |wserPers|ist.prog|
|000025c0| 72 65 73 73 4c 69 73 74 | 65 6e 65 72 20 3d 20 74 |ressList|ener = t|
|000025d0| 68 69 73 3b 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |his;.. | |
|000025e0| 20 20 20 20 20 20 77 65 | 62 42 72 6f 77 73 65 72 | we|bBrowser|
|000025f0| 50 65 72 73 69 73 74 2e | 73 61 76 65 55 52 49 28 |Persist.|saveURI(|
|00002600| 75 72 69 2c 20 6e 75 6c | 6c 2c 20 75 72 69 2c 20 |uri, nul|l, uri, |
|00002610| 74 68 69 73 2e 67 65 74 | 50 6f 73 74 44 61 74 61 |this.get|PostData|
|00002620| 28 29 2c 20 6e 75 6c 6c | 2c 20 74 68 69 73 2e 66 |(), null|, this.f|
|00002630| 69 6c 65 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ile);. | |
|00002640| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | }. | }. |
|00002650| 20 20 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 | el|se. |
|00002660| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00002670| 20 77 65 62 64 65 76 65 | 6c 6f 70 65 72 5f 65 72 | webdeve|loper_er|
|00002680| 72 6f 72 28 73 74 72 69 | 6e 67 42 75 6e 64 6c 65 |ror(stri|ngBundle|
|00002690| 2e 67 65 74 46 6f 72 6d | 61 74 74 65 64 53 74 72 |.getForm|attedStr|
|000026a0| 69 6e 67 28 22 77 65 62 | 64 65 76 65 6c 6f 70 65 |ing("web|develope|
|000026b0| 72 5f 6c 61 75 6e 63 68 | 41 70 70 6c 69 63 61 74 |r_launch|Applicat|
|000026c0| 69 6f 6e 46 61 69 6c 65 | 64 22 2c 20 5b 74 68 69 |ionFaile|d", [thi|
|000026d0| 73 2e 61 70 70 6c 69 63 | 61 74 69 6f 6e 50 61 74 |s.applic|ationPat|
|000026e0| 68 5d 29 29 3b 0a 20 20 | 20 20 20 20 20 20 7d 0a |h]));. | }.|
|000026f0| 20 20 20 20 7d 0a 20 20 | 20 20 65 6c 73 65 0a 20 | }. | else. |
|00002700| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 77 65 62 | {. | web|
|00002710| 64 65 76 65 6c 6f 70 65 | 72 5f 65 72 72 6f 72 28 |develope|r_error(|
|00002720| 73 74 72 69 6e 67 42 75 | 6e 64 6c 65 2e 67 65 74 |stringBu|ndle.get|
|00002730| 46 6f 72 6d 61 74 74 65 | 64 53 74 72 69 6e 67 28 |Formatte|dString(|
|00002740| 22 77 65 62 64 65 76 65 | 6c 6f 70 65 72 5f 74 65 |"webdeve|loper_te|
|00002750| 6d 70 44 69 72 65 63 74 | 6f 72 79 46 61 69 6c 65 |mpDirect|oryFaile|
|00002760| 64 22 2c 20 5b 74 65 6d | 70 6f 72 61 72 79 44 69 |d", [tem|poraryDi|
|00002770| 72 65 63 74 6f 72 79 2e | 70 61 74 68 5d 29 29 3b |rectory.|path]));|
|00002780| 0a 20 20 20 20 7d 0a 7d | 0a 0a 2f 2f 20 4c 61 75 |. }.}|..// Lau|
|00002790| 6e 63 68 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |nch the |applicat|
|000027a0| 69 6f 6e 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |ion with| the giv|
|000027b0| 65 6e 20 55 52 4c 0a 57 | 65 62 44 65 76 65 6c 6f |en URL.W|ebDevelo|
|000027c0| 70 65 72 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 70 |perAppli|cation.p|
|000027d0| 72 6f 74 6f 74 79 70 65 | 2e 6c 61 75 6e 63 68 57 |rototype|.launchW|
|000027e0| 69 74 68 55 52 4c 20 3d | 20 66 75 6e 63 74 69 6f |ithURL =| functio|
|000027f0| 6e 28 75 72 6c 29 0a 7b | 0a 20 20 20 20 2f 2f 20 |n(url).{|. // |
|00002800| 49 66 20 74 68 65 20 65 | 78 65 63 75 74 61 62 6c |If the e|xecutabl|
|00002810| 65 20 65 78 69 73 74 73 | 2c 20 69 73 20 61 20 66 |e exists|, is a f|
|00002820| 69 6c 65 20 61 6e 64 20 | 69 73 20 65 78 65 63 75 |ile and |is execu|
|00002830| 74 61 62 6c 65 0a 20 20 | 20 20 69 66 28 74 68 69 |table. | if(thi|
|00002840| 73 2e 65 78 65 63 75 74 | 61 62 6c 65 2e 65 78 69 |s.execut|able.exi|
|00002850| 73 74 73 28 29 20 26 26 | 20 74 68 69 73 2e 65 78 |sts() &&| this.ex|
|00002860| 65 63 75 74 61 62 6c 65 | 2e 69 73 46 69 6c 65 28 |ecutable|.isFile(|
|00002870| 29 20 26 26 20 74 68 69 | 73 2e 65 78 65 63 75 74 |) && thi|s.execut|
|00002880| 61 62 6c 65 2e 69 73 45 | 78 65 63 75 74 61 62 6c |able.isE|xecutabl|
|00002890| 65 28 29 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |e()). | {. |
|000028a0| 20 20 20 76 61 72 20 70 | 72 6f 63 65 73 73 20 20 | var p|rocess |
|000028b0| 20 20 20 20 20 20 20 20 | 3d 20 43 6f 6d 70 6f 6e | |= Compon|
|000028c0| 65 6e 74 73 2e 63 6c 61 | 73 73 65 73 5b 22 40 6d |ents.cla|sses["@m|
|000028d0| 6f 7a 69 6c 6c 61 2e 6f | 72 67 2f 70 72 6f 63 65 |ozilla.o|rg/proce|
|000028e0| 73 73 2f 75 74 69 6c 3b | 31 22 5d 2e 63 72 65 61 |ss/util;|1"].crea|
|000028f0| 74 65 49 6e 73 74 61 6e | 63 65 28 43 6f 6d 70 6f |teInstan|ce(Compo|
|00002900| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|00002910| 2e 6e 73 49 50 72 6f 63 | 65 73 73 29 3b 0a 20 20 |.nsIProc|ess);. |
|00002920| 20 20 20 20 20 20 76 61 | 72 20 70 72 6f 63 65 73 | va|r proces|
|00002930| 73 41 72 67 75 6d 65 6e | 74 73 20 3d 20 6e 65 77 |sArgumen|ts = new|
|00002940| 20 41 72 72 61 79 28 75 | 72 6c 29 3b 0a 0a 20 20 | Array(u|rl);.. |
|00002950| 20 20 20 20 20 20 70 72 | 6f 63 65 73 73 2e 69 6e | pr|ocess.in|
|00002960| 69 74 28 74 68 69 73 2e | 65 78 65 63 75 74 61 62 |it(this.|executab|
|00002970| 6c 65 29 3b 0a 20 20 20 | 20 20 20 20 20 70 72 6f |le);. | pro|
|00002980| 63 65 73 73 2e 72 75 6e | 28 66 61 6c 73 65 2c 20 |cess.run|(false, |
|00002990| 70 72 6f 63 65 73 73 41 | 72 67 75 6d 65 6e 74 73 |processA|rguments|
|000029a0| 2c 20 70 72 6f 63 65 73 | 73 41 72 67 75 6d 65 6e |, proces|sArgumen|
|000029b0| 74 73 2e 6c 65 6e 67 74 | 68 29 3b 0a 20 20 20 20 |ts.lengt|h);. |
|000029c0| 7d 0a 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 7b |}. el|se. {|
|000029d0| 0a 20 20 20 20 20 20 20 | 20 77 65 62 64 65 76 65 |. | webdeve|
|000029e0| 6c 6f 70 65 72 5f 65 72 | 72 6f 72 28 64 6f 63 75 |loper_er|ror(docu|
|000029f0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00002a00| 79 49 64 28 22 77 65 62 | 64 65 76 65 6c 6f 70 65 |yId("web|develope|
|00002a10| 72 2d 73 74 72 69 6e 67 | 2d 62 75 6e 64 6c 65 22 |r-string|-bundle"|
|00002a20| 29 2e 67 65 74 46 6f 72 | 6d 61 74 74 65 64 53 74 |).getFor|mattedSt|
|00002a30| 72 69 6e 67 28 22 77 65 | 62 64 65 76 65 6c 6f 70 |ring("we|bdevelop|
|00002a40| 65 72 5f 6c 61 75 6e 63 | 68 41 70 70 6c 69 63 61 |er_launc|hApplica|
|00002a50| 74 69 6f 6e 46 61 69 6c | 65 64 22 2c 20 5b 74 68 |tionFail|ed", [th|
|00002a60| 69 73 2e 61 70 70 6c 69 | 63 61 74 69 6f 6e 50 61 |is.appli|cationPa|
|00002a70| 74 68 5d 29 29 3b 0a 20 | 20 20 20 7d 0a 7d 0a 0a |th]));. | }.}..|
|00002a80| 2f 2f 20 43 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |// Calle|d when t|
|00002a90| 68 65 20 70 72 6f 67 72 | 65 73 73 20 73 74 61 74 |he progr|ess stat|
|00002aa0| 65 20 63 68 61 6e 67 65 | 73 0a 57 65 62 44 65 76 |e change|s.WebDev|
|00002ab0| 65 6c 6f 70 65 72 41 70 | 70 6c 69 63 61 74 69 6f |eloperAp|plicatio|
|00002ac0| 6e 2e 70 72 6f 74 6f 74 | 79 70 65 2e 6f 6e 53 74 |n.protot|ype.onSt|
|00002ad0| 61 74 65 43 68 61 6e 67 | 65 20 3d 20 66 75 6e 63 |ateChang|e = func|
|00002ae0| 74 69 6f 6e 28 77 65 62 | 50 72 6f 67 72 65 73 73 |tion(web|Progress|
|00002af0| 2c 20 72 65 71 75 65 73 | 74 2c 20 73 74 61 74 65 |, reques|t, state|
|00002b00| 46 6c 61 67 73 2c 20 73 | 74 61 74 75 73 29 0a 7b |Flags, s|tatus).{|
|00002b10| 0a 20 20 20 20 2f 2f 20 | 49 66 20 74 68 65 20 70 |. // |If the p|
|00002b20| 72 6f 67 72 65 73 73 20 | 68 61 73 20 73 74 6f 70 |rogress |has stop|
|00002b30| 70 65 64 0a 20 20 20 20 | 69 66 28 73 74 61 74 65 |ped. |if(state|
|00002b40| 46 6c 61 67 73 20 26 20 | 43 6f 6d 70 6f 6e 65 6e |Flags & |Componen|
|00002b50| 74 73 2e 69 6e 74 65 72 | 66 61 63 65 73 2e 6e 73 |ts.inter|faces.ns|
|00002b60| 49 57 65 62 50 72 6f 67 | 72 65 73 73 4c 69 73 74 |IWebProg|ressList|
|00002b70| 65 6e 65 72 2e 53 54 41 | 54 45 5f 53 54 4f 50 29 |ener.STA|TE_STOP)|
|00002b80| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 74 |. {. | t|
|00002b90| 68 69 73 2e 6c 61 75 6e | 63 68 57 69 74 68 46 69 |his.laun|chWithFi|
|00002ba0| 6c 65 28 29 3b 0a 20 20 | 20 20 7d 0a 7d 0a 0a 2f |le();. | }.}../|
|00002bb0| 2f 20 49 6e 64 69 63 61 | 74 65 73 20 74 68 65 20 |/ Indica|tes the |
|00002bc0| 69 6e 74 65 72 66 61 63 | 65 73 20 74 68 69 73 20 |interfac|es this |
|00002bd0| 6f 62 6a 65 63 74 20 73 | 75 70 70 6f 72 74 73 0a |object s|upports.|
|00002be0| 57 65 62 44 65 76 65 6c | 6f 70 65 72 41 70 70 6c |WebDevel|operAppl|
|00002bf0| 69 63 61 74 69 6f 6e 2e | 70 72 6f 74 6f 74 79 70 |ication.|prototyp|
|00002c00| 65 2e 51 75 65 72 79 49 | 6e 74 65 72 66 61 63 65 |e.QueryI|nterface|
|00002c10| 20 3d 20 66 75 6e 63 74 | 69 6f 6e 28 69 64 29 0a | = funct|ion(id).|
|00002c20| 7b 0a 20 20 20 20 2f 2f | 20 49 66 20 74 68 65 20 |{. //| If the |
|00002c30| 71 75 65 72 79 20 69 73 | 20 66 6f 72 20 61 20 73 |query is| for a s|
|00002c40| 75 70 70 6f 72 74 65 64 | 20 69 6e 74 65 72 66 61 |upported| interfa|
|00002c50| 63 65 0a 20 20 20 20 69 | 66 28 69 64 2e 65 71 75 |ce. i|f(id.equ|
|00002c60| 61 6c 73 28 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 69 |als(Comp|onents.i|
|00002c70| 6e 74 65 72 66 61 63 65 | 73 2e 6e 73 49 53 75 70 |nterface|s.nsISup|
|00002c80| 70 6f 72 74 73 29 20 7c | 7c 20 69 64 2e 65 71 75 |ports) ||| id.equ|
|00002c90| 61 6c 73 28 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 69 |als(Comp|onents.i|
|00002ca0| 6e 74 65 72 66 61 63 65 | 73 2e 6e 73 49 57 65 62 |nterface|s.nsIWeb|
|00002cb0| 50 72 6f 67 72 65 73 73 | 4c 69 73 74 65 6e 65 72 |Progress|Listener|
|00002cc0| 29 29 0a 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 |)). {|. |
|00002cd0| 20 72 65 74 75 72 6e 20 | 74 68 69 73 3b 0a 20 20 | return |this;. |
|00002ce0| 20 20 7d 0a 0a 20 20 20 | 20 74 68 72 6f 77 20 43 | }.. | throw C|
|00002cf0| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 72 65 73 75 6c 74 |omponent|s.result|
|00002d00| 73 2e 4e 53 5f 4e 4f 49 | 4e 54 45 52 46 41 43 45 |s.NS_NOI|NTERFACE|
|00002d10| 3b 0a 7d 0a 0a 2f 2f 20 | 44 75 6d 6d 79 20 6d 65 |;.}..// |Dummy me|
|00002d20| 74 68 6f 64 73 20 72 65 | 71 75 69 72 69 6e 67 20 |thods re|quiring |
|00002d30| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 73 0a |implemen|tations.|
|00002d40| 57 65 62 44 65 76 65 6c | 6f 70 65 72 41 70 70 6c |WebDevel|operAppl|
|00002d50| 69 63 61 74 69 6f 6e 2e | 70 72 6f 74 6f 74 79 70 |ication.|prototyp|
|00002d60| 65 2e 6f 6e 4c 6f 63 61 | 74 69 6f 6e 43 68 61 6e |e.onLoca|tionChan|
|00002d70| 67 65 20 3d 20 66 75 6e | 63 74 69 6f 6e 28 77 65 |ge = fun|ction(we|
|00002d80| 62 50 72 6f 67 72 65 73 | 73 2c 20 72 65 71 75 65 |bProgres|s, reque|
|00002d90| 73 74 2c 20 6c 6f 63 61 | 74 69 6f 6e 29 20 7b 7d |st, loca|tion) {}|
|00002da0| 0a 57 65 62 44 65 76 65 | 6c 6f 70 65 72 41 70 70 |.WebDeve|loperApp|
|00002db0| 6c 69 63 61 74 69 6f 6e | 2e 70 72 6f 74 6f 74 79 |lication|.prototy|
|00002dc0| 70 65 2e 6f 6e 50 72 6f | 67 72 65 73 73 43 68 61 |pe.onPro|gressCha|
|00002dd0| 6e 67 65 20 3d 20 66 75 | 6e 63 74 69 6f 6e 28 77 |nge = fu|nction(w|
|00002de0| 65 62 50 72 6f 67 72 65 | 73 73 2c 20 72 65 71 75 |ebProgre|ss, requ|
|00002df0| 65 73 74 2c 20 63 75 72 | 72 65 6e 74 53 65 6c 66 |est, cur|rentSelf|
|00002e00| 50 72 6f 67 72 65 73 73 | 2c 20 6d 61 78 69 6d 75 |Progress|, maximu|
|00002e10| 6d 53 65 6c 66 50 72 6f | 67 72 65 73 73 2c 20 63 |mSelfPro|gress, c|
|00002e20| 75 72 72 65 6e 74 54 6f | 74 61 6c 50 72 6f 67 72 |urrentTo|talProgr|
|00002e30| 65 73 73 2c 20 6d 61 78 | 69 6d 75 6d 54 6f 74 61 |ess, max|imumTota|
|00002e40| 6c 50 72 6f 67 72 65 73 | 73 29 20 7b 7d 0a 57 65 |lProgres|s) {}.We|
|00002e50| 62 44 65 76 65 6c 6f 70 | 65 72 41 70 70 6c 69 63 |bDevelop|erApplic|
|00002e60| 61 74 69 6f 6e 2e 70 72 | 6f 74 6f 74 79 70 65 2e |ation.pr|ototype.|
|00002e70| 6f 6e 53 65 63 75 72 69 | 74 79 43 68 61 6e 67 65 |onSecuri|tyChange|
|00002e80| 20 3d 20 66 75 6e 63 74 | 69 6f 6e 28 77 65 62 50 | = funct|ion(webP|
|00002e90| 72 6f 67 72 65 73 73 2c | 20 72 65 71 75 65 73 74 |rogress,| request|
|00002ea0| 2c 20 73 74 61 74 65 29 | 20 7b 7d 0a 57 65 62 44 |, state)| {}.WebD|
|00002eb0| 65 76 65 6c 6f 70 65 72 | 41 70 70 6c 69 63 61 74 |eveloper|Applicat|
|00002ec0| 69 6f 6e 2e 70 72 6f 74 | 6f 74 79 70 65 2e 6f 6e |ion.prot|otype.on|
|00002ed0| 53 74 61 74 75 73 43 68 | 61 6e 67 65 20 20 20 3d |StatusCh|ange =|
|00002ee0| 20 66 75 6e 63 74 69 6f | 6e 28 77 65 62 50 72 6f | functio|n(webPro|
|00002ef0| 67 72 65 73 73 2c 20 72 | 65 71 75 65 73 74 2c 20 |gress, r|equest, |
|00002f00| 73 74 61 74 75 73 2c 20 | 6d 65 73 73 61 67 65 29 |status, |message)|
|00002f10| 20 7b 7d 0a 50 4b 03 04 | 0a 00 00 00 00 00 0f 75 | {}.PK..|.......u|
|00002f20| aa 36 04 5b ec bc 23 05 | 00 00 23 05 00 00 24 00 |.6.[..#.|..#...$.|
|00002f30| 00 00 63 6f 6e 74 65 6e | 74 2f 77 65 62 64 65 76 |..conten|t/webdev|
|00002f40| 65 6c 6f 70 65 72 2f 63 | 6f 6d 6d 6f 6e 2f 61 72 |eloper/c|ommon/ar|
|00002f50| 72 61 79 2e 6a 73 2f 2f | 20 52 65 74 75 72 6e 73 |ray.js//| Returns|
|00002f60| 20 74 72 75 65 20 69 66 | 20 74 68 65 20 61 72 72 | true if| the arr|
|00002f70| 61 79 20 63 6f 6e 74 61 | 69 6e 73 20 74 68 65 20 |ay conta|ins the |
|00002f80| 65 6c 65 6d 65 6e 74 0a | 66 75 6e 63 74 69 6f 6e |element.|function|
|00002f90| 20 77 65 62 64 65 76 65 | 6c 6f 70 65 72 5f 63 6f | webdeve|loper_co|
|00002fa0| 6e 74 61 69 6e 73 28 61 | 72 72 61 79 2c 20 65 6c |ntains(a|rray, el|
|00002fb0| 65 6d 65 6e 74 29 0a 7b | 0a 20 20 20 20 2f 2f 20 |ement).{|. // |
|00002fc0| 49 66 20 74 68 65 20 61 | 72 72 61 79 20 61 6e 64 |If the a|rray and|
|00002fd0| 20 65 6c 65 6d 65 6e 74 | 20 61 72 65 20 73 65 74 | element| are set|
|00002fe0| 0a 20 20 20 20 69 66 28 | 61 72 72 61 79 20 26 26 |. if(|array &&|
|00002ff0| 20 65 6c 65 6d 65 6e 74 | 29 0a 20 20 20 20 7b 0a | element|). {.|
|00003000| 20 20 20 20 20 20 20 20 | 74 72 79 0a 20 20 20 20 | |try. |
|00003010| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00003020| 20 20 2f 2f 20 49 66 20 | 74 68 65 20 65 6c 65 6d | // If |the elem|
|00003030| 65 6e 74 20 64 6f 65 73 | 20 6e 6f 74 20 65 78 69 |ent does| not exi|
|00003040| 73 74 20 69 6e 20 74 68 | 65 20 61 72 72 61 79 0a |st in th|e array.|
|00003050| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 28 61 | | if(a|
|00003060| 72 72 61 79 2e 69 6e 64 | 65 78 4f 66 28 65 6c 65 |rray.ind|exOf(ele|
|00003070| 6d 65 6e 74 29 20 3d 3d | 20 2d 31 29 0a 20 20 20 |ment) ==| -1). |
|00003080| 20 20 20 20 20 20 20 20 | 20 7b 0a 20 20 20 20 20 | | {. |
|00003090| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 | | retur|
|000030a0| 6e 20 66 61 6c 73 65 3b | 0a 20 20 20 20 20 20 20 |n false;|. |
|000030b0| 20 20 20 20 20 7d 0a 20 | 20 20 20 20 20 20 20 20 | }. | |
|000030c0| 20 20 20 65 6c 73 65 0a | 20 20 20 20 20 20 20 20 | else.| |
|000030d0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000030e0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 74 72 75 | re|turn tru|
|000030f0| 65 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7d |e;. | }|
|00003100| 0a 20 20 20 20 20 20 20 | 20 7d 0a 20 20 20 20 20 |. | }. |
|00003110| 20 20 20 63 61 74 63 68 | 28 65 78 63 65 70 74 69 | catch|(excepti|
|00003120| 6f 6e 29 0a 20 20 20 20 | 20 20 20 20 7b 0a 20 20 |on). | {. |
|00003130| 20 20 20 20 20 20 20 20 | 20 20 76 61 72 20 61 72 | | var ar|
|00003140| 72 61 79 4c 65 6e 67 74 | 68 20 3d 20 61 72 72 61 |rayLengt|h = arra|
|00003150| 79 2e 6c 65 6e 67 74 68 | 3b 0a 0a 20 20 20 20 20 |y.length|;.. |
|00003160| 20 20 20 20 20 20 20 2f | 2f 20 4c 6f 6f 70 20 74 | /|/ Loop t|
|00003170| 68 72 6f 75 67 68 20 74 | 68 65 20 61 72 72 61 79 |hrough t|he array|
|00003180| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 66 6f 72 |. | for|
|00003190| 28 76 61 72 20 69 20 3d | 20 30 3b 20 69 20 3c 20 |(var i =| 0; i < |
|000031a0| 61 72 72 61 79 4c 65 6e | 67 74 68 3b 20 69 2b 2b |arrayLen|gth; i++|
|000031b0| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0a |). | {.|
|000031c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031d0| 2f 2f 20 49 66 20 74 68 | 65 20 65 6c 65 6d 65 6e |// If th|e elemen|
|000031e0| 74 20 69 73 20 66 6f 75 | 6e 64 0a 20 20 20 20 20 |t is fou|nd. |
|000031f0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 28 61 72 | | if(ar|
|00003200| 72 61 79 5b 69 5d 20 3d | 3d 20 65 6c 65 6d 65 6e |ray[i] =|= elemen|
|00003210| 74 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t). | |
|00003220| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00003230| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00003240| 74 72 75 65 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |true;. | |
|00003250| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00003260| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 20 20 7d 0a | }. | }.|
|00003270| 20 20 20 20 7d 0a 0a 20 | 20 20 20 72 65 74 75 72 | }.. | retur|
|00003280| 6e 20 66 61 6c 73 65 3b | 0a 7d 0a 0a 2f 2f 20 52 |n false;|.}..// R|
|00003290| 65 74 75 72 6e 73 20 74 | 72 75 65 20 69 66 20 74 |eturns t|rue if t|
|000032a0| 68 65 20 61 72 72 61 79 | 20 63 6f 6e 74 61 69 6e |he array| contain|
|000032b0| 73 20 6d 65 64 69 61 20 | 77 69 74 68 20 74 68 65 |s media |with the|
|000032c0| 20 67 69 76 65 6e 20 55 | 52 4c 0a 66 75 6e 63 74 | given U|RL.funct|
|000032d0| 69 6f 6e 20 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |ion webd|eveloper|
|000032e0| 5f 6d 65 64 69 61 41 72 | 72 61 79 43 6f 6e 74 61 |_mediaAr|rayConta|
|000032f0| 69 6e 73 28 61 72 72 61 | 79 2c 20 75 72 6c 29 0a |ins(arra|y, url).|
|00003300| 7b 0a 20 20 20 20 2f 2f | 20 49 66 20 74 68 65 20 |{. //| If the |
|00003310| 61 72 72 61 79 20 61 6e | 64 20 75 72 6c 20 61 72 |array an|d url ar|
|00003320| 65 20 73 65 74 0a 20 20 | 20 20 69 66 28 61 72 72 |e set. | if(arr|
|00003330| 61 79 20 26 26 20 75 72 | 6c 29 0a 20 20 20 20 7b |ay && ur|l). {|
|00003340| 0a 20 20 20 20 20 20 20 | 20 76 61 72 20 61 72 72 |. | var arr|
|00003350| 61 79 4c 65 6e 67 74 68 | 20 3d 20 61 72 72 61 79 |ayLength| = array|
|00003360| 2e 6c 65 6e 67 74 68 3b | 0a 0a 20 20 20 20 20 20 |.length;|.. |
|00003370| 20 20 2f 2f 20 4c 6f 6f | 70 20 74 68 72 6f 75 67 | // Loo|p throug|
|00003380| 68 20 74 68 65 20 61 72 | 72 61 79 0a 20 20 20 20 |h the ar|ray. |
|00003390| 20 20 20 20 66 6f 72 28 | 76 61 72 20 69 20 3d 20 | for(|var i = |
|000033a0| 30 3b 20 69 20 3c 20 61 | 72 72 61 79 4c 65 6e 67 |0; i < a|rrayLeng|
|000033b0| 74 68 3b 20 69 2b 2b 29 | 0a 20 20 20 20 20 20 20 |th; i++)|. |
|000033c0| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | {. | /|
|000033d0| 2f 20 49 66 20 6d 65 64 | 69 61 20 77 69 74 68 20 |/ If med|ia with |
|000033e0| 74 68 65 20 67 69 76 65 | 6e 20 55 52 4c 20 69 73 |the give|n URL is|
|000033f0| 20 66 6f 75 6e 64 0a 20 | 20 20 20 20 20 20 20 20 | found. | |
|00003400| 20 20 20 69 66 28 61 72 | 72 61 79 5b 69 5d 2e 73 | if(ar|ray[i].s|
|00003410| 72 63 20 3d 3d 20 75 72 | 6c 29 0a 20 20 20 20 20 |rc == ur|l). |
|00003420| 20 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 | {|. |
|00003430| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00003440| 74 72 75 65 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |true;. | |
|00003450| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | }. | }. |
|00003460| 20 20 7d 0a 0a 20 20 20 | 20 72 65 74 75 72 6e 20 | }.. | return |
|00003470| 66 61 6c 73 65 3b 0a 7d | 0a 50 4b 03 04 0a 00 00 |false;.}|.PK.....|
|00003480| 00 00 00 0e 75 aa 36 e4 | 48 9c b7 57 08 00 00 57 |....u.6.|H..W...W|
|00003490| 08 00 00 25 00 00 00 63 | 6f 6e 74 65 6e 74 2f 77 |...%...c|ontent/w|
|000034a0| 65 62 64 65 76 65 6c 6f | 70 65 72 2f 63 6f 6d 6d |ebdevelo|per/comm|
|000034b0| 6f 6e 2f 63 6f 6f 6b 69 | 65 2e 6a 73 2f 2f 20 47 |on/cooki|e.js// G|
|000034c0| 65 74 20 74 68 65 20 63 | 6f 6f 6b 69 65 73 0a 66 |et the c|ookies.f|
|000034d0| 75 6e 63 74 69 6f 6e 20 | 77 65 62 64 65 76 65 6c |unction |webdevel|
|000034e0| 6f 70 65 72 5f 67 65 74 | 43 6f 6f 6b 69 65 73 28 |oper_get|Cookies(|
|000034f0| 68 6f 73 74 2c 20 70 61 | 74 68 2c 20 73 6f 72 74 |host, pa|th, sort|
|00003500| 29 0a 7b 0a 20 20 20 20 | 76 61 72 20 63 6f 6f 6b |).{. |var cook|
|00003510| 69 65 73 20 3d 20 6e 65 | 77 20 41 72 72 61 79 28 |ies = ne|w Array(|
|00003520| 29 3b 0a 0a 20 20 20 20 | 2f 2f 20 49 66 20 74 68 |);.. |// If th|
|00003530| 65 20 68 6f 73 74 20 69 | 73 20 73 65 74 0a 20 20 |e host i|s set. |
|00003540| 20 20 69 66 28 68 6f 73 | 74 29 0a 20 20 20 20 7b | if(hos|t). {|
|00003550| 0a 20 20 20 20 20 20 20 | 20 76 61 72 20 63 6f 6f |. | var coo|
|00003560| 6b 69 65 20 20 20 20 20 | 20 20 20 20 20 20 20 3d |kie | =|
|00003570| 20 6e 75 6c 6c 3b 0a 20 | 20 20 20 20 20 20 20 76 | null;. | v|
|00003580| 61 72 20 63 6f 6f 6b 69 | 65 45 6e 75 6d 65 72 61 |ar cooki|eEnumera|
|00003590| 74 69 6f 6e 20 3d 20 43 | 6f 6d 70 6f 6e 65 6e 74 |tion = C|omponent|
|000035a0| 73 2e 63 6c 61 73 73 65 | 73 5b 22 40 6d 6f 7a 69 |s.classe|s["@mozi|
|000035b0| 6c 6c 61 2e 6f 72 67 2f | 63 6f 6f 6b 69 65 6d 61 |lla.org/|cookiema|
|000035c0| 6e 61 67 65 72 3b 31 22 | 5d 2e 67 65 74 53 65 72 |nager;1"|].getSer|
|000035d0| 76 69 63 65 28 43 6f 6d | 70 6f 6e 65 6e 74 73 2e |vice(Com|ponents.|
|000035e0| 69 6e 74 65 72 66 61 63 | 65 73 2e 6e 73 49 43 6f |interfac|es.nsICo|
|000035f0| 6f 6b 69 65 4d 61 6e 61 | 67 65 72 29 2e 65 6e 75 |okieMana|ger).enu|
|00003600| 6d 65 72 61 74 6f 72 3b | 0a 20 20 20 20 20 20 20 |merator;|. |
|00003610| 20 76 61 72 20 63 6f 6f | 6b 69 65 48 6f 73 74 20 | var coo|kieHost |
|00003620| 20 20 20 20 20 20 20 3d | 20 6e 75 6c 6c 3b 0a 20 | =| null;. |
|00003630| 20 20 20 20 20 20 20 76 | 61 72 20 63 6f 6f 6b 69 | v|ar cooki|
|00003640| 65 50 61 74 68 20 20 20 | 20 20 20 20 20 3d 20 6e |ePath | = n|
|00003650| 75 6c 6c 3b 0a 0a 20 20 | 20 20 20 20 20 20 2f 2f |ull;.. | //|
|00003660| 20 4c 6f 6f 70 20 74 68 | 72 6f 75 67 68 20 74 68 | Loop th|rough th|
|00003670| 65 20 63 6f 6f 6b 69 65 | 73 0a 20 20 20 20 20 20 |e cookie|s. |
|00003680| 20 20 77 68 69 6c 65 28 | 63 6f 6f 6b 69 65 45 6e | while(|cookieEn|
|00003690| 75 6d 65 72 61 74 69 6f | 6e 2e 68 61 73 4d 6f 72 |umeratio|n.hasMor|
|000036a0| 65 45 6c 65 6d 65 6e 74 | 73 28 29 29 0a 20 20 20 |eElement|s()). |
|000036b0| 20 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 20 | {. | |
|000036c0| 20 20 20 63 6f 6f 6b 69 | 65 20 3d 20 63 6f 6f 6b | cooki|e = cook|
|000036d0| 69 65 45 6e 75 6d 65 72 | 61 74 69 6f 6e 2e 67 65 |ieEnumer|ation.ge|
|000036e0| 74 4e 65 78 74 28 29 2e | 51 75 65 72 79 49 6e 74 |tNext().|QueryInt|
|000036f0| 65 72 66 61 63 65 28 43 | 6f 6d 70 6f 6e 65 6e 74 |erface(C|omponent|
|00003700| 73 2e 69 6e 74 65 72 66 | 61 63 65 73 2e 6e 73 49 |s.interf|aces.nsI|
|00003710| 43 6f 6f 6b 69 65 29 3b | 0a 0a 20 20 20 20 20 20 |Cookie);|.. |
|00003720| 20 20 20 20 20 20 63 6f | 6f 6b 69 65 48 6f 73 74 | co|okieHost|
|00003730| 20 3d 20 63 6f 6f 6b 69 | 65 2e 68 6f 73 74 3b 0a | = cooki|e.host;.|
|00003740| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6f 6f 6b | | cook|
|00003750| 69 65 50 61 74 68 20 3d | 20 63 6f 6f 6b 69 65 2e |iePath =| cookie.|
|00003760| 70 61 74 68 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |path;.. | |
|00003770| 20 20 20 2f 2f 20 49 66 | 20 74 68 65 72 65 20 69 | // If| there i|
|00003780| 73 20 61 20 68 6f 73 74 | 20 61 6e 64 20 70 61 74 |s a host| and pat|
|00003790| 68 20 66 6f 72 20 74 68 | 69 73 20 63 6f 6f 6b 69 |h for th|is cooki|
|000037a0| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 |e. | if|
|000037b0| 28 63 6f 6f 6b 69 65 48 | 6f 73 74 20 26 26 20 63 |(cookieH|ost && c|
|000037c0| 6f 6f 6b 69 65 50 61 74 | 68 29 0a 20 20 20 20 20 |ookiePat|h). |
|000037d0| 20 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 | {|. |
|000037e0| 20 20 20 20 20 20 20 20 | 20 2f 2f 20 49 66 20 74 | | // If t|
|000037f0| 68 65 20 63 6f 6f 6b 69 | 65 20 68 6f 73 74 20 73 |he cooki|e host s|
|00003800| 74 61 72 74 73 20 77 69 | 74 68 20 27 2e 27 0a 20 |tarts wi|th '.'. |
|00003810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00003820| 66 28 63 6f 6f 6b 69 65 | 48 6f 73 74 2e 63 68 61 |f(cookie|Host.cha|
|00003830| 72 41 74 28 30 29 20 3d | 3d 20 22 2e 22 29 0a 20 |rAt(0) =|= "."). |
|00003840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00003850| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003860| 20 20 20 20 20 63 6f 6f | 6b 69 65 48 6f 73 74 20 | coo|kieHost |
|00003870| 3d 20 63 6f 6f 6b 69 65 | 48 6f 73 74 2e 73 75 62 |= cookie|Host.sub|
|00003880| 73 74 72 69 6e 67 28 31 | 29 3b 0a 20 20 20 20 20 |string(1|);. |
|00003890| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 0a 20 20 | | }.. |
|000038a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2f | | //|
|000038b0| 20 49 66 20 74 68 65 20 | 68 6f 73 74 20 61 6e 64 | If the |host and|
|000038c0| 20 63 6f 6f 6b 69 65 20 | 68 6f 73 74 20 61 6e 64 | cookie |host and|
|000038d0| 20 70 61 74 68 20 61 6e | 64 20 63 6f 6f 6b 69 65 | path an|d cookie|
|000038e0| 20 70 61 74 68 20 6d 61 | 74 63 68 0a 20 20 20 20 | path ma|tch. |
|000038f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 28 28 | | if((|
|00003900| 68 6f 73 74 20 3d 3d 20 | 63 6f 6f 6b 69 65 48 6f |host == |cookieHo|
|00003910| 73 74 20 7c 7c 20 68 6f | 73 74 2e 69 6e 64 65 78 |st || ho|st.index|
|00003920| 4f 66 28 22 2e 22 20 2b | 20 63 6f 6f 6b 69 65 48 |Of("." +| cookieH|
|00003930| 6f 73 74 29 20 21 3d 20 | 2d 31 29 20 26 26 20 28 |ost) != |-1) && (|
|00003940| 70 61 74 68 20 3d 3d 20 | 63 6f 6f 6b 69 65 50 61 |path == |cookiePa|
|00003950| 74 68 20 7c 7c 20 70 61 | 74 68 2e 69 6e 64 65 78 |th || pa|th.index|
|00003960| 4f 66 28 63 6f 6f 6b 69 | 65 50 61 74 68 29 20 3d |Of(cooki|ePath) =|
|00003970| 3d 20 30 29 29 0a 20 20 | 20 20 20 20 20 20 20 20 |= 0)). | |
|00003980| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00003990| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6f 6f 6b | | cook|
|000039a0| 69 65 73 2e 70 75 73 68 | 28 63 6f 6f 6b 69 65 29 |ies.push|(cookie)|
|000039b0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000039c0| 20 20 7d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|000039d0| 7d 0a 20 20 20 20 20 20 | 20 20 7d 0a 0a 20 20 20 |}. | }.. |
|000039e0| 20 20 20 20 20 2f 2f 20 | 49 66 20 73 6f 72 74 69 | // |If sorti|
|000039f0| 6e 67 20 63 6f 6f 6b 69 | 65 73 0a 20 20 20 20 20 |ng cooki|es. |
|00003a00| 20 20 20 69 66 28 73 6f | 72 74 29 0a 20 20 20 20 | if(so|rt). |
|00003a10| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00003a20| 20 20 63 6f 6f 6b 69 65 | 73 2e 73 6f 72 74 28 77 | cookie|s.sort(w|
|00003a30| 65 62 64 65 76 65 6c 6f | 70 65 72 5f 73 6f 72 74 |ebdevelo|per_sort|
|00003a40| 43 6f 6f 6b 69 65 73 29 | 3b 0a 20 20 20 20 20 20 |Cookies)|;. |
|00003a50| 20 20 7d 0a 20 20 20 20 | 7d 0a 0a 20 20 20 20 72 | }. |}.. r|
|00003a60| 65 74 75 72 6e 20 63 6f | 6f 6b 69 65 73 3b 0a 7d |eturn co|okies;.}|
|00003a70| 0a 0a 2f 2f 20 53 6f 72 | 74 73 20 74 77 6f 20 63 |..// Sor|ts two c|
|00003a80| 6f 6f 6b 69 65 73 0a 66 | 75 6e 63 74 69 6f 6e 20 |ookies.f|unction |
|00003a90| 77 65 62 64 65 76 65 6c | 6f 70 65 72 5f 73 6f 72 |webdevel|oper_sor|
|00003aa0| 74 43 6f 6f 6b 69 65 73 | 28 63 6f 6f 6b 69 65 4f |tCookies|(cookieO|
|00003ab0| 6e 65 2c 20 63 6f 6f 6b | 69 65 54 77 6f 29 0a 7b |ne, cook|ieTwo).{|
|00003ac0| 0a 20 20 20 20 2f 2f 20 | 49 66 20 63 6f 6f 6b 69 |. // |If cooki|
|00003ad0| 65 20 6f 6e 65 20 61 6e | 64 20 63 6f 6f 6b 69 65 |e one an|d cookie|
|00003ae0| 20 74 77 6f 20 61 72 65 | 20 73 65 74 0a 20 20 20 | two are| set. |
|00003af0| 20 69 66 28 63 6f 6f 6b | 69 65 4f 6e 65 20 26 26 | if(cook|ieOne &&|
|00003b00| 20 63 6f 6f 6b 69 65 54 | 77 6f 29 0a 20 20 20 20 | cookieT|wo). |
|00003b10| 7b 0a 20 20 20 20 20 20 | 20 20 76 61 72 20 63 6f |{. | var co|
|00003b20| 6f 6b 69 65 4f 6e 65 48 | 6f 73 74 20 3d 20 63 6f |okieOneH|ost = co|
|00003b30| 6f 6b 69 65 4f 6e 65 2e | 68 6f 73 74 3b 0a 20 20 |okieOne.|host;. |
|00003b40| 20 20 20 20 20 20 76 61 | 72 20 63 6f 6f 6b 69 65 | va|r cookie|
|00003b50| 4f 6e 65 4e 61 6d 65 20 | 3d 20 63 6f 6f 6b 69 65 |OneName |= cookie|
|00003b60| 4f 6e 65 2e 6e 61 6d 65 | 3b 0a 20 20 20 20 20 20 |One.name|;. |
|00003b70| 20 20 76 61 72 20 63 6f | 6f 6b 69 65 54 77 6f 48 | var co|okieTwoH|
|00003b80| 6f 73 74 20 3d 20 63 6f | 6f 6b 69 65 54 77 6f 2e |ost = co|okieTwo.|
|00003b90| 68 6f 73 74 3b 0a 20 20 | 20 20 20 20 20 20 76 61 |host;. | va|
|00003ba0| 72 20 63 6f 6f 6b 69 65 | 54 77 6f 4e 61 6d 65 20 |r cookie|TwoName |
|00003bb0| 3d 20 63 6f 6f 6b 69 65 | 54 77 6f 2e 6e 61 6d 65 |= cookie|Two.name|
|00003bc0| 3b 0a 0a 20 20 20 20 20 | 20 20 20 2f 2f 20 49 66 |;.. | // If|
|00003bd0| 20 74 68 65 20 63 6f 6f | 6b 69 65 73 20 61 72 65 | the coo|kies are|
|00003be0| 20 65 71 75 61 6c 0a 20 | 20 20 20 20 20 20 20 69 | equal. | i|
|00003bf0| 66 28 63 6f 6f 6b 69 65 | 4f 6e 65 48 6f 73 74 20 |f(cookie|OneHost |
|00003c00| 3d 3d 20 63 6f 6f 6b 69 | 65 54 77 6f 48 6f 73 74 |== cooki|eTwoHost|
|00003c10| 20 26 26 20 63 6f 6f 6b | 69 65 4f 6e 65 4e 61 6d | && cook|ieOneNam|
|00003c20| 65 20 3d 3d 20 63 6f 6f | 6b 69 65 54 77 6f 4e 61 |e == coo|kieTwoNa|
|00003c30| 6d 65 29 0a 20 20 20 20 | 20 20 20 20 7b 0a 20 20 |me). | {. |
|00003c40| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00003c50| 20 30 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | 0;. | }. |
|00003c60| 20 20 20 20 20 20 65 6c | 73 65 20 69 66 28 63 6f | el|se if(co|
|00003c70| 6f 6b 69 65 4f 6e 65 48 | 6f 73 74 20 3c 20 63 6f |okieOneH|ost < co|
|00003c80| 6f 6b 69 65 54 77 6f 48 | 6f 73 74 20 7c 7c 20 28 |okieTwoH|ost || (|
|00003c90| 63 6f 6f 6b 69 65 4f 6e | 65 48 6f 73 74 20 3d 3d |cookieOn|eHost ==|
|00003ca0| 20 63 6f 6f 6b 69 65 54 | 77 6f 48 6f 73 74 20 26 | cookieT|woHost &|
|00003cb0| 26 20 63 6f 6f 6b 69 65 | 4f 6e 65 4e 61 6d 65 20 |& cookie|OneName |
|00003cc0| 3c 20 63 6f 6f 6b 69 65 | 54 77 6f 4e 61 6d 65 29 |< cookie|TwoName)|
|00003cd0| 29 0a 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 |). | {. |
|00003ce0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 2d | |return -|
|00003cf0| 31 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 |1;. | }. |
|00003d00| 20 7d 0a 0a 20 20 20 20 | 72 65 74 75 72 6e 20 31 | }.. |return 1|
|00003d10| 3b 0a 7d 50 4b 03 04 0a | 00 00 00 00 00 0e 75 aa |;.}PK...|......u.|
|00003d20| 36 2f 9c 81 b2 5f 22 00 | 00 5f 22 00 00 22 00 00 |6/..._".|._".."..|
|00003d30| 00 63 6f 6e 74 65 6e 74 | 2f 77 65 62 64 65 76 65 |.content|/webdeve|
|00003d40| 6c 6f 70 65 72 2f 63 6f | 6d 6d 6f 6e 2f 63 73 73 |loper/co|mmon/css|
|00003d50| 2e 6a 73 2f 2f 20 46 6f | 72 6d 61 74 73 20 61 20 |.js// Fo|rmats a |
|00003d60| 73 74 79 6c 65 20 72 75 | 6c 65 20 70 72 6f 70 65 |style ru|le prope|
|00003d70| 72 74 79 0a 66 75 6e 63 | 74 69 6f 6e 20 77 65 62 |rty.func|tion web|
|00003d80| 64 65 76 65 6c 6f 70 65 | 72 5f 66 6f 72 6d 61 74 |develope|r_format|
|00003d90| 53 74 79 6c 65 52 75 6c | 65 50 72 6f 70 65 72 74 |StyleRul|ePropert|
|00003da0| 79 28 73 74 79 6c 65 52 | 75 6c 65 50 72 6f 70 65 |y(styleR|ulePrope|
|00003db0| 72 74 79 29 0a 7b 0a 20 | 20 20 20 2f 2f 20 53 77 |rty).{. | // Sw|
|00003dc0| 69 74 63 68 20 6f 6e 20 | 74 68 65 20 73 74 79 6c |itch on |the styl|
|00003dd0| 65 20 72 75 6c 65 20 70 | 72 6f 70 65 72 74 79 0a |e rule p|roperty.|
|00003de0| 20 20 20 20 73 77 69 74 | 63 68 28 73 74 79 6c 65 | swit|ch(style|
|00003df0| 52 75 6c 65 50 72 6f 70 | 65 72 74 79 29 0a 20 20 |RuleProp|erty). |
|00003e00| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 63 61 73 65 | {. | case|
|00003e10| 20 22 6d 61 72 67 69 6e | 2d 62 6f 74 74 6f 6d 2d | "margin|-bottom-|
|00003e20| 76 61 6c 75 65 22 3a 0a | 20 20 20 20 20 20 20 20 |value":.| |
|00003e30| 20 20 20 20 72 65 74 75 | 72 6e 20 22 6d 61 72 67 | retu|rn "marg|
|00003e40| 69 6e 2d 62 6f 74 74 6f | 6d 22 3b 0a 20 20 20 20 |in-botto|m";. |
|00003e50| 20 20 20 20 63 61 73 65 | 20 22 6d 61 72 67 69 6e | case| "margin|
|00003e60| 2d 6c 65 66 74 2d 76 61 | 6c 75 65 22 3a 0a 20 20 |-left-va|lue":. |
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00003e80| 20 22 6d 61 72 67 69 6e | 2d 6c 65 66 74 22 3b 0a | "margin|-left";.|
|00003e90| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 22 6d 61 | |case "ma|
|00003ea0| 72 67 69 6e 2d 72 69 67 | 68 74 2d 76 61 6c 75 65 |rgin-rig|ht-value|
|00003eb0| 22 3a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 72 |":. | r|
|00003ec0| 65 74 75 72 6e 20 22 6d | 61 72 67 69 6e 2d 72 69 |eturn "m|argin-ri|
|00003ed0| 67 68 74 22 3b 0a 20 20 | 20 20 20 20 20 20 63 61 |ght";. | ca|
|00003ee0| 73 65 20 22 6d 61 72 67 | 69 6e 2d 74 6f 70 2d 76 |se "marg|in-top-v|
|00003ef0| 61 6c 75 65 22 3a 0a 20 | 20 20 20 20 20 20 20 20 |alue":. | |
|00003f00| 20 20 20 72 65 74 75 72 | 6e 20 22 6d 61 72 67 69 | retur|n "margi|
|00003f10| 6e 2d 74 6f 70 22 3b 0a | 20 20 20 20 20 20 20 20 |n-top";.| |
|00003f20| 63 61 73 65 20 22 70 61 | 64 64 69 6e 67 2d 62 6f |case "pa|dding-bo|
|00003f30| 74 74 6f 6d 2d 76 61 6c | 75 65 22 3a 0a 20 20 20 |ttom-val|ue":. |
|00003f40| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00003f50| 22 70 61 64 64 69 6e 67 | 2d 62 6f 74 74 6f 6d 22 |"padding|-bottom"|
|00003f60| 3b 0a 20 20 20 20 20 20 | 20 20 63 61 73 65 20 22 |;. | case "|
|00003f70| 70 61 64 64 69 6e 67 2d | 6c 65 66 74 2d 76 61 6c |padding-|left-val|
|00003f80| 75 65 22 3a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ue":. | |
|00003f90| 20 72 65 74 75 72 6e 20 | 22 70 61 64 64 69 6e 67 | return |"padding|
|00003fa0| 2d 6c 65 66 74 22 3b 0a | 20 20 20 20 20 20 20 20 |-left";.| |
|00003fb0| 63 61 73 65 20 22 70 61 | 64 64 69 6e 67 2d 72 69 |case "pa|dding-ri|
|00003fc0| 67 68 74 2d 76 61 6c 75 | 65 22 3a 0a 20 20 20 20 |ght-valu|e":. |
|00003fd0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 20 22 | |return "|
|00003fe0| 70 61 64 64 69 6e 67 2d | 72 69 67 68 74 22 3b 0a |padding-|right";.|
|00003ff0| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 22 70 61 | |case "pa|
|00004000| 64 64 69 6e 67 2d 74 6f | 70 2d 76 61 6c 75 65 22 |dding-to|p-value"|
|00004010| 3a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 |:. | re|
|00004020| 74 75 72 6e 20 22 70 61 | 64 64 69 6e 67 2d 74 6f |turn "pa|dding-to|
|00004030| 70 22 3b 0a 20 20 20 20 | 20 20 20 20 63 61 73 65 |p";. | case|
|00004040| 20 22 2d 78 2d 62 61 63 | 6b 67 72 6f 75 6e 64 2d | "-x-bac|kground-|
|00004050| 78 2d 70 6f 73 69 74 69 | 6f 6e 22 3a 0a 20 20 20 |x-positi|on":. |
|00004060| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00004070| 22 62 61 63 6b 67 72 6f | 75 6e 64 2d 78 2d 70 6f |"backgro|und-x-po|
|00004080| 73 69 74 69 6f 6e 22 3b | 0a 20 20 20 20 20 20 20 |sition";|. |
|00004090| 20 63 61 73 65 20 22 2d | 78 2d 62 61 63 6b 67 72 | case "-|x-backgr|
|000040a0| 6f 75 6e 64 2d 79 2d 70 | 6f 73 69 74 69 6f 6e 22 |ound-y-p|osition"|
|000040b0| 3a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 |:. | re|
|000040c0| 74 75 72 6e 20 22 62 61 | 63 6b 67 72 6f 75 6e 64 |turn "ba|ckground|
|000040d0| 2d 79 2d 70 6f 73 69 74 | 69 6f 6e 22 3b 0a 20 20 |-y-posit|ion";. |
|000040e0| 20 20 20 20 20 20 64 65 | 66 61 75 6c 74 3a 0a 20 | de|fault:. |
|000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 | | retur|
|00004100| 6e 20 73 74 79 6c 65 52 | 75 6c 65 50 72 6f 70 65 |n styleR|ulePrope|
|00004110| 72 74 79 3b 0a 20 20 20 | 20 7d 0a 7d 0a 0a 2f 2f |rty;. | }.}..//|
|00004120| 20 46 6f 72 6d 61 74 73 | 20 61 20 73 74 79 6c 65 | Formats| a style|
|00004130| 20 72 75 6c 65 20 76 61 | 6c 75 65 0a 66 75 6e 63 | rule va|lue.func|
|00004140| 74 69 6f 6e 20 77 65 62 | 64 65 76 65 6c 6f 70 65 |tion web|develope|
|00004150| 72 5f 66 6f 72 6d 61 74 | 53 74 79 6c 65 52 75 6c |r_format|StyleRul|
|00004160| 65 56 61 6c 75 65 28 73 | 74 79 6c 65 52 75 6c 65 |eValue(s|tyleRule|
|00004170| 56 61 6c 75 65 29 0a 7b | 0a 20 20 20 20 2f 2f 20 |Value).{|. // |
|00004180| 49 66 20 74 68 65 20 73 | 74 79 6c 65 20 72 75 6c |If the s|tyle rul|
|00004190| 65 20 76 61 6c 75 65 20 | 69 73 20 73 65 74 0a 20 |e value |is set. |
|000041a0| 20 20 20 69 66 28 73 74 | 79 6c 65 52 75 6c 65 56 | if(st|yleRuleV|
|000041b0| 61 6c 75 65 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |alue). | {. |
|000041c0| 20 20 20 20 76 61 72 20 | 72 67 62 52 65 67 75 6c | var |rgbRegul|
|000041d0| 61 72 45 78 70 72 65 73 | 73 69 6f 6e 20 3d 20 6e |arExpres|sion = n|
|000041e0| 65 77 20 52 65 67 45 78 | 70 28 22 72 67 62 5c 5c |ew RegEx|p("rgb\\|
|000041f0| 28 28 5c 5c 64 7b 31 2c | 33 7d 29 2c 5c 5c 73 28 |((\\d{1,|3}),\\s(|
|00004200| 5c 5c 64 7b 31 2c 33 7d | 29 2c 5c 5c 73 28 5c 5c |\\d{1,3}|),\\s(\\|
|00004210| 64 7b 31 2c 33 7d 29 5c | 5c 29 22 2c 20 22 67 69 |d{1,3})\|\)", "gi|
|00004220| 22 29 3b 0a 20 20 20 20 | 20 20 20 20 76 61 72 20 |");. | var |
|00004230| 73 74 79 6c 65 52 75 6c | 65 56 61 6c 75 65 43 6f |styleRul|eValueCo|
|00004240| 6c 6f 72 20 20 3d 20 72 | 67 62 52 65 67 75 6c 61 |lor = r|gbRegula|
|00004250| 72 45 78 70 72 65 73 73 | 69 6f 6e 2e 65 78 65 63 |rExpress|ion.exec|
|00004260| 28 73 74 79 6c 65 52 75 | 6c 65 56 61 6c 75 65 29 |(styleRu|leValue)|
|00004270| 3b 0a 0a 20 20 20 20 20 | 20 20 20 2f 2f 20 49 66 |;.. | // If|
|00004280| 20 74 68 65 20 73 74 79 | 6c 65 20 72 75 6c 65 20 | the sty|le rule |
|00004290| 76 61 6c 75 65 20 69 73 | 20 61 20 63 6f 6c 6f 72 |value is| a color|
|000042a0| 0a 20 20 20 20 20 20 20 | 20 69 66 28 73 74 79 6c |. | if(styl|
|000042b0| 65 52 75 6c 65 56 61 6c | 75 65 43 6f 6c 6f 72 29 |eRuleVal|ueColor)|
|000042c0| 0a 20 20 20 20 20 20 20 | 20 7b 0a 20 20 20 20 20 |. | {. |
|000042d0| 20 20 20 20 20 20 20 76 | 61 72 20 62 6c 75 65 20 | v|ar blue |
|000042e0| 20 3d 20 70 61 72 73 65 | 49 6e 74 28 73 74 79 6c | = parse|Int(styl|
|000042f0| 65 52 75 6c 65 56 61 6c | 75 65 43 6f 6c 6f 72 5b |eRuleVal|ueColor[|
|00004300| 33 5d 29 2e 74 6f 53 74 | 72 69 6e 67 28 31 36 29 |3]).toSt|ring(16)|
|00004310| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 76 61 |;. | va|
|00004320| 72 20 67 72 65 65 6e 20 | 3d 20 70 61 72 73 65 49 |r green |= parseI|
|00004330| 6e 74 28 73 74 79 6c 65 | 52 75 6c 65 56 61 6c 75 |nt(style|RuleValu|
|00004340| 65 43 6f 6c 6f 72 5b 32 | 5d 29 2e 74 6f 53 74 72 |eColor[2|]).toStr|
|00004350| 69 6e 67 28 31 36 29 3b | 0a 20 20 20 20 20 20 20 |ing(16);|. |
|00004360| 20 20 20 20 20 76 61 72 | 20 72 65 64 20 20 20 3d | var| red =|
|00004370| 20 70 61 72 73 65 49 6e | 74 28 73 74 79 6c 65 52 | parseIn|t(styleR|
|00004380| 75 6c 65 56 61 6c 75 65 | 43 6f 6c 6f 72 5b 31 5d |uleValue|Color[1]|
|00004390| 29 2e 74 6f 53 74 72 69 | 6e 67 28 31 36 29 3b 0a |).toStri|ng(16);.|
|000043a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2f 20 |. | // |
|000043b0| 49 66 20 74 68 65 20 62 | 6c 75 65 20 63 6f 6c 6f |If the b|lue colo|
|000043c0| 72 20 69 73 20 6f 6e 6c | 79 20 31 20 63 68 61 72 |r is onl|y 1 char|
|000043d0| 61 63 74 65 72 20 6c 6f | 6e 67 0a 20 20 20 20 20 |acter lo|ng. |
|000043e0| 20 20 20 20 20 20 20 69 | 66 28 62 6c 75 65 2e 6c | i|f(blue.l|
|000043f0| 65 6e 67 74 68 20 3d 3d | 20 31 29 0a 20 20 20 20 |ength ==| 1). |
|00004400| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|00004410| 20 20 20 20 20 20 20 20 | 20 20 62 6c 75 65 20 3d | | blue =|
|00004420| 20 22 30 22 20 2b 20 62 | 6c 75 65 3b 0a 20 20 20 | "0" + b|lue;. |
|00004430| 20 20 20 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 | | }.. |
|00004440| 20 20 20 20 20 20 20 20 | 2f 2f 20 49 66 20 74 68 | |// If th|
|00004450| 65 20 67 72 65 65 6e 20 | 63 6f 6c 6f 72 20 69 73 |e green |color is|
|00004460| 20 6f 6e 6c 79 20 31 20 | 63 68 61 72 61 63 74 65 | only 1 |characte|
|00004470| 72 20 6c 6f 6e 67 0a 20 | 20 20 20 20 20 20 20 20 |r long. | |
|00004480| 20 20 20 69 66 28 67 72 | 65 65 6e 2e 6c 65 6e 67 | if(gr|een.leng|
|00004490| 74 68 20 3d 3d 20 31 29 | 0a 20 20 20 20 20 20 20 |th == 1)|. |
|000044a0| 20 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 20 | {. | |
|000044b0| 20 20 20 20 20 20 20 67 | 72 65 65 6e 20 3d 20 22 | g|reen = "|
|000044c0| 30 22 20 2b 20 67 72 65 | 65 6e 3b 0a 20 20 20 20 |0" + gre|en;. |
|000044d0| 20 20 20 20 20 20 20 20 | 7d 0a 0a 20 20 20 20 20 | |}.. |
|000044e0| 20 20 20 20 20 20 20 2f | 2f 20 49 66 20 74 68 65 | /|/ If the|
|000044f0| 20 72 65 64 20 63 6f 6c | 6f 72 20 69 73 20 6f 6e | red col|or is on|
|00004500| 6c 79 20 31 20 63 68 61 | 72 61 63 74 65 72 20 6c |ly 1 cha|racter l|
|00004510| 6f 6e 67 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ong. | |
|00004520| 69 66 28 72 65 64 2e 6c | 65 6e 67 74 68 20 3d 3d |if(red.l|ength ==|
|00004530| 20 31 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1). | |
|00004540| 7b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00004550| 20 20 72 65 64 20 3d 20 | 22 30 22 20 2b 20 72 65 | red = |"0" + re|
|00004560| 64 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7d |d;. | }|
|00004570| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 |.. | re|
|00004580| 74 75 72 6e 20 22 23 22 | 20 2b 20 72 65 64 20 2b |turn "#"| + red +|
|00004590| 20 67 72 65 65 6e 20 2b | 20 62 6c 75 65 3b 0a 20 | green +| blue;. |
|000045a0| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 7d 0a 0a | }|. }..|
|000045b0| 20 20 20 20 72 65 74 75 | 72 6e 20 73 74 79 6c 65 | retu|rn style|
|000045c0| 52 75 6c 65 56 61 6c 75 | 65 3b 0a 7d 0a 0a 2f 2f |RuleValu|e;.}..//|
|000045d0| 20 52 65 74 75 72 6e 73 | 20 74 68 65 20 6c 69 73 | Returns| the lis|
|000045e0| 74 20 6f 66 20 74 68 65 | 20 73 74 79 6c 65 20 73 |t of the| style s|
|000045f0| 68 65 65 74 73 20 66 6f | 72 20 74 68 65 20 73 70 |heets fo|r the sp|
|00004600| 65 63 69 66 69 65 64 20 | 64 6f 63 75 6d 65 6e 74 |ecified |document|
|00004610| 0a 66 75 6e 63 74 69 6f | 6e 20 77 65 62 64 65 76 |.functio|n webdev|
|00004620| 65 6c 6f 70 65 72 5f 67 | 65 74 53 74 79 6c 65 53 |eloper_g|etStyleS|
|00004630| 68 65 65 74 73 46 6f 72 | 44 6f 63 75 6d 65 6e 74 |heetsFor|Document|
|00004640| 28 63 6f 6e 74 65 6e 74 | 44 6f 63 75 6d 65 6e 74 |(content|Document|
|00004650| 2c 20 69 6e 63 6c 75 64 | 65 49 6e 6c 69 6e 65 2c |, includ|eInline,|
|00004660| 20 69 6e 63 6c 75 64 65 | 41 6c 74 65 72 6e 61 74 | include|Alternat|
|00004670| 65 29 0a 7b 0a 20 20 20 | 20 76 61 72 20 73 74 79 |e).{. | var sty|
|00004680| 6c 65 53 68 65 65 74 73 | 20 3d 20 6e 65 77 20 41 |leSheets| = new A|
|00004690| 72 72 61 79 28 29 3b 0a | 0a 20 20 20 20 2f 2f 20 |rray();.|. // |
|000046a0| 49 66 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 20 64 |If the c|ontent d|
|000046b0| 6f 63 75 6d 65 6e 74 20 | 69 73 20 73 65 74 0a 20 |ocument |is set. |
|000046c0| 20 20 20 69 66 28 63 6f | 6e 74 65 6e 74 44 6f 63 | if(co|ntentDoc|
|000046d0| 75 6d 65 6e 74 29 0a 20 | 20 20 20 7b 0a 20 20 20 |ument). | {. |
|000046e0| 20 20 20 20 20 76 61 72 | 20 64 6f 63 75 6d 65 6e | var| documen|
|000046f0| 74 53 74 79 6c 65 53 68 | 65 65 74 73 20 20 20 20 |tStyleSh|eets |
|00004700| 20 20 20 3d 20 63 6f 6e | 74 65 6e 74 44 6f 63 75 | = con|tentDocu|
|00004710| 6d 65 6e 74 2e 73 74 79 | 6c 65 53 68 65 65 74 73 |ment.sty|leSheets|
|00004720| 3b 0a 20 20 20 20 20 20 | 20 20 76 61 72 20 64 6f |;. | var do|
|00004730| 63 75 6d 65 6e 74 53 74 | 79 6c 65 53 68 65 65 74 |cumentSt|yleSheet|
|00004740| 73 4c 65 6e 67 74 68 20 | 3d 20 64 6f 63 75 6d 65 |sLength |= docume|
|00004750| 6e 74 53 74 79 6c 65 53 | 68 65 65 74 73 2e 6c 65 |ntStyleS|heets.le|
|00004760| 6e 67 74 68 3b 0a 20 20 | 20 20 20 20 20 20 76 61 |ngth;. | va|
|00004770| 72 20 64 6f 63 75 6d 65 | 6e 74 55 52 4c 20 20 20 |r docume|ntURL |
|00004780| 20 20 20 20 20 20 20 20 | 20 20 20 20 3d 20 63 6f | | = co|
|00004790| 6e 74 65 6e 74 44 6f 63 | 75 6d 65 6e 74 2e 64 6f |ntentDoc|ument.do|
|000047a0| 63 75 6d 65 6e 74 55 52 | 49 3b 0a 20 20 20 20 20 |cumentUR|I;. |
|000047b0| 20 20 20 76 61 72 20 73 | 74 79 6c 65 53 68 65 65 | var s|tyleShee|
|000047c0| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t | |
|000047d0| 20 3d 20 6e 75 6c 6c 3b | 0a 0a 20 20 20 20 20 20 | = null;|.. |
|000047e0| 20 20 2f 2f 20 4c 6f 6f | 70 20 74 68 72 6f 75 67 | // Loo|p throug|
|000047f0| 68 20 74 68 65 20 73 74 | 79 6c 65 20 73 68 65 65 |h the st|yle shee|
|00004800| 74 73 0a 20 20 20 20 20 | 20 20 20 66 6f 72 28 76 |ts. | for(v|
|00004810| 61 72 20 69 20 3d 20 30 | 3b 20 69 20 3c 20 64 6f |ar i = 0|; i < do|
|00004820| 63 75 6d 65 6e 74 53 74 | 79 6c 65 53 68 65 65 74 |cumentSt|yleSheet|
|00004830| 73 4c 65 6e 67 74 68 3b | 20 69 2b 2b 29 0a 20 20 |sLength;| i++). |
|00004840| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00004850| 20 20 20 20 73 74 79 6c | 65 53 68 65 65 74 20 3d | styl|eSheet =|
|00004860| 20 64 6f 63 75 6d 65 6e | 74 53 74 79 6c 65 53 68 | documen|tStyleSh|
|00004870| 65 65 74 73 5b 69 5d 3b | 0a 0a 20 20 20 20 20 20 |eets[i];|.. |
|00004880| 20 20 20 20 20 20 2f 2f | 20 49 66 20 74 68 69 73 | //| If this|
|00004890| 20 69 73 20 61 20 76 61 | 6c 69 64 20 73 74 79 6c | is a va|lid styl|
|000048a0| 65 20 73 68 65 65 74 20 | 61 6e 64 20 69 6e 63 6c |e sheet |and incl|
|000048b0| 75 64 69 6e 67 20 61 6c | 74 65 72 6e 61 74 65 20 |uding al|ternate |
|000048c0| 73 74 79 6c 65 20 73 68 | 65 65 74 73 20 6f 72 20 |style sh|eets or |
|000048d0| 74 68 69 73 20 69 73 20 | 6e 6f 74 20 61 6c 74 65 |this is |not alte|
|000048e0| 72 6e 61 74 65 0a 20 20 | 20 20 20 20 20 20 20 20 |rnate. | |
|000048f0| 20 20 69 66 28 77 65 62 | 64 65 76 65 6c 6f 70 65 | if(web|develope|
|00004900| 72 5f 69 73 56 61 6c 69 | 64 53 74 79 6c 65 53 68 |r_isVali|dStyleSh|
|00004910| 65 65 74 28 73 74 79 6c | 65 53 68 65 65 74 29 20 |eet(styl|eSheet) |
|00004920| 26 26 20 28 69 6e 63 6c | 75 64 65 41 6c 74 65 72 |&& (incl|udeAlter|
|00004930| 6e 61 74 65 20 7c 7c 20 | 21 77 65 62 64 65 76 65 |nate || |!webdeve|
|00004940| 6c 6f 70 65 72 5f 69 73 | 41 6c 74 65 72 6e 61 74 |loper_is|Alternat|
|00004950| 65 53 74 79 6c 65 53 68 | 65 65 74 28 73 74 79 6c |eStyleSh|eet(styl|
|00004960| 65 53 68 65 65 74 29 29 | 29 0a 20 20 20 20 20 20 |eSheet))|). |
|00004970| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00004980| 20 20 20 20 20 20 20 20 | 2f 2f 20 49 66 20 69 6e | |// If in|
|00004990| 63 6c 75 64 69 6e 67 20 | 69 6e 6c 69 6e 65 20 73 |cluding |inline s|
|000049a0| 74 79 6c 65 20 73 68 65 | 65 74 73 20 6f 72 20 74 |tyle she|ets or t|
|000049b0| 68 69 73 20 69 73 20 6e | 6f 74 20 69 6e 6c 69 6e |his is n|ot inlin|
|000049c0| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|000049d0| 20 20 69 66 28 69 6e 63 | 6c 75 64 65 49 6e 6c 69 | if(inc|ludeInli|
|000049e0| 6e 65 20 7c 7c 20 73 74 | 79 6c 65 53 68 65 65 74 |ne || st|yleSheet|
|000049f0| 2e 68 72 65 66 20 21 3d | 20 64 6f 63 75 6d 65 6e |.href !=| documen|
|00004a00| 74 55 52 4c 29 0a 20 20 | 20 20 20 20 20 20 20 20 |tURL). | |
|00004a10| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00004a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 74 79 6c | | styl|
|00004a30| 65 53 68 65 65 74 73 2e | 70 75 73 68 28 73 74 79 |eSheets.|push(sty|
|00004a40| 6c 65 53 68 65 65 74 29 | 3b 0a 20 20 20 20 20 20 |leSheet)|;. |
|00004a50| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 0a 20 20 20 | | }.. |
|00004a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 74 79 | | sty|
|00004a70| 6c 65 53 68 65 65 74 73 | 20 3d 20 73 74 79 6c 65 |leSheets| = style|
|00004a80| 53 68 65 65 74 73 2e 63 | 6f 6e 63 61 74 28 77 65 |Sheets.c|oncat(we|
|00004a90| 62 64 65 76 65 6c 6f 70 | 65 72 5f 67 65 74 53 74 |bdevelop|er_getSt|
|00004aa0| 79 6c 65 53 68 65 65 74 | 73 49 6d 70 6f 72 74 65 |yleSheet|sImporte|
|00004ab0| 64 46 72 6f 6d 53 74 79 | 6c 65 53 68 65 65 74 28 |dFromSty|leSheet(|
|00004ac0| 73 74 79 6c 65 53 68 65 | 65 74 29 29 3b 0a 20 20 |styleShe|et));. |
|00004ad0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 20 20 20 20 | | }. |
|00004ae0| 20 20 20 20 7d 0a 20 20 | 20 20 7d 0a 0a 20 20 20 | }. | }.. |
|00004af0| 20 72 65 74 75 72 6e 20 | 73 74 79 6c 65 53 68 65 | return |styleShe|
|00004b00| 65 74 73 3b 0a 7d 0a 0a | 2f 2f 20 52 65 74 75 72 |ets;.}..|// Retur|
|00004b10| 6e 73 20 74 68 65 20 6c | 69 73 74 20 6f 66 20 73 |ns the l|ist of s|
|00004b20| 74 79 6c 65 20 73 68 65 | 65 74 73 20 69 6d 70 6f |tyle she|ets impo|
|00004b30| 72 74 65 64 20 66 72 6f | 6d 20 74 68 65 20 73 70 |rted fro|m the sp|
|00004b40| 65 63 69 66 69 65 64 20 | 73 74 79 6c 65 20 73 68 |ecified |style sh|
|00004b50| 65 65 74 0a 66 75 6e 63 | 74 69 6f 6e 20 77 65 62 |eet.func|tion web|
|00004b60| 64 65 76 65 6c 6f 70 65 | 72 5f 67 65 74 53 74 79 |develope|r_getSty|
|00004b70| 6c 65 53 68 65 65 74 73 | 49 6d 70 6f 72 74 65 64 |leSheets|Imported|
|00004b80| 46 72 6f 6d 53 74 79 6c | 65 53 68 65 65 74 28 73 |FromStyl|eSheet(s|
|00004b90| 74 79 6c 65 53 68 65 65 | 74 29 0a 7b 0a 20 20 20 |tyleShee|t).{. |
|00004ba0| 20 76 61 72 20 73 74 79 | 6c 65 53 68 65 65 74 73 | var sty|leSheets|
|00004bb0| 20 3d 20 6e 65 77 20 41 | 72 72 61 79 28 29 3b 0a | = new A|rray();.|
|00004bc0| 0a 20 20 20 20 2f 2f 20 | 49 66 20 74 68 65 20 73 |. // |If the s|
|00004bd0| 74 79 6c 65 20 73 68 65 | 65 74 20 69 73 20 73 65 |tyle she|et is se|
|00004be0| 74 0a 20 20 20 20 69 66 | 28 73 74 79 6c 65 53 68 |t. if|(styleSh|
|00004bf0| 65 65 74 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |eet). | {. |
|00004c00| 20 20 20 76 61 72 20 63 | 73 73 52 75 6c 65 20 20 | var c|ssRule |
|00004c10| 20 20 20 20 20 20 20 20 | 20 20 3d 20 6e 75 6c 6c | | = null|
|00004c20| 3b 0a 20 20 20 20 20 20 | 20 20 76 61 72 20 63 73 |;. | var cs|
|00004c30| 73 52 75 6c 65 73 20 20 | 20 20 20 20 20 20 20 20 |sRules | |
|00004c40| 20 3d 20 73 74 79 6c 65 | 53 68 65 65 74 2e 63 73 | = style|Sheet.cs|
|00004c50| 73 52 75 6c 65 73 3b 0a | 20 20 20 20 20 20 20 20 |sRules;.| |
|00004c60| 76 61 72 20 63 73 73 52 | 75 6c 65 73 4c 65 6e 67 |var cssR|ulesLeng|
|00004c70| 74 68 20 20 20 20 20 3d | 20 63 73 73 52 75 6c 65 |th =| cssRule|
|00004c80| 73 2e 6c 65 6e 67 74 68 | 3b 0a 20 20 20 20 20 20 |s.length|;. |
|00004c90| 20 20 76 61 72 20 69 6d | 70 6f 72 74 65 64 53 74 | var im|portedSt|
|00004ca0| 79 6c 65 53 68 65 65 74 | 20 3d 20 6e 75 6c 6c 3b |yleSheet| = null;|
|00004cb0| 0a 20 20 20 20 20 20 20 | 20 76 61 72 20 69 6d 70 |. | var imp|
|00004cc0| 6f 72 74 52 75 6c 65 20 | 20 20 20 20 20 20 20 20 |ortRule | |
|00004cd0| 3d 20 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 69 6e 74 |= Compon|ents.int|
|00004ce0| 65 72 66 61 63 65 73 2e | 6e 73 49 44 4f 4d 43 53 |erfaces.|nsIDOMCS|
|00004cf0| 53 52 75 6c 65 2e 49 4d | 50 4f 52 54 5f 52 55 4c |SRule.IM|PORT_RUL|
|00004d00| 45 3b 0a 0a 20 20 20 20 | 20 20 20 20 2f 2f 20 4c |E;.. | // L|
|00004d10| 6f 6f 70 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |oop thro|ugh the |
|00004d20| 74 68 65 20 73 74 79 6c | 65 20 73 68 65 65 74 20 |the styl|e sheet |
|00004d30| 72 75 6c 65 73 0a 20 20 | 20 20 20 20 20 20 66 6f |rules. | fo|
|00004d40| 72 28 76 61 72 20 69 20 | 3d 20 30 3b 20 69 20 3c |r(var i |= 0; i <|
|00004d50| 20 63 73 73 52 75 6c 65 | 73 4c 65 6e 67 74 68 3b | cssRule|sLength;|
|00004d60| 20 69 2b 2b 29 0a 20 20 | 20 20 20 20 20 20 7b 0a | i++). | {.|
|00004d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 73 73 52 | | cssR|
|00004d80| 75 6c 65 20 3d 20 63 73 | 73 52 75 6c 65 73 5b 69 |ule = cs|sRules[i|
|00004d90| 5d 3b 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |];.. | |
|00004da0| 2f 2f 20 49 66 20 74 68 | 69 73 20 69 73 20 61 6e |// If th|is is an|
|00004db0| 20 69 6d 70 6f 72 74 20 | 72 75 6c 65 0a 20 20 20 | import |rule. |
|00004dc0| 20 20 20 20 20 20 20 20 | 20 69 66 28 63 73 73 52 | | if(cssR|
|00004dd0| 75 6c 65 2e 74 79 70 65 | 20 3d 3d 20 69 6d 70 6f |ule.type| == impo|
|00004de0| 72 74 52 75 6c 65 29 0a | 20 20 20 20 20 20 20 20 |rtRule).| |
|00004df0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00004e00| 20 20 20 20 20 20 69 6d | 70 6f 72 74 65 64 53 74 | im|portedSt|
|00004e10| 79 6c 65 53 68 65 65 74 | 20 3d 20 63 73 73 52 75 |yleSheet| = cssRu|
|00004e20| 6c 65 2e 73 74 79 6c 65 | 53 68 65 65 74 3b 0a 0a |le.style|Sheet;..|
|00004e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004e40| 2f 2f 20 49 66 20 74 68 | 69 73 20 73 74 79 6c 65 |// If th|is style|
|00004e50| 20 73 68 65 65 74 20 69 | 73 20 76 61 6c 69 64 0a | sheet i|s valid.|
|00004e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004e70| 69 66 28 77 65 62 64 65 | 76 65 6c 6f 70 65 72 5f |if(webde|veloper_|
|00004e80| 69 73 56 61 6c 69 64 53 | 74 79 6c 65 53 68 65 65 |isValidS|tyleShee|
|00004e90| 74 28 69 6d 70 6f 72 74 | 65 64 53 74 79 6c 65 53 |t(import|edStyleS|
|00004ea0| 68 65 65 74 29 29 0a 20 | 20 20 20 20 20 20 20 20 |heet)). | |
|00004eb0| 20 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 | {|. |
|00004ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 74 79 | | sty|
|00004ed0| 6c 65 53 68 65 65 74 73 | 2e 70 75 73 68 28 69 6d |leSheets|.push(im|
|00004ee0| 70 6f 72 74 65 64 53 74 | 79 6c 65 53 68 65 65 74 |portedSt|yleSheet|
|00004ef0| 29 3b 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.. | |
|00004f00| 20 20 20 20 20 20 20 20 | 73 74 79 6c 65 53 68 65 | |styleShe|
|00004f10| 65 74 73 20 3d 20 73 74 | 79 6c 65 53 68 65 65 74 |ets = st|yleSheet|
|00004f20| 73 2e 63 6f 6e 63 61 74 | 28 77 65 62 64 65 76 65 |s.concat|(webdeve|
|00004f30| 6c 6f 70 65 72 5f 67 65 | 74 53 74 79 6c 65 53 68 |loper_ge|tStyleSh|
|00004f40| 65 65 74 73 49 6d 70 6f | 72 74 65 64 46 72 6f 6d |eetsImpo|rtedFrom|
|00004f50| 53 74 79 6c 65 53 68 65 | 65 74 28 69 6d 70 6f 72 |StyleShe|et(impor|
|00004f60| 74 65 64 53 74 79 6c 65 | 53 68 65 65 74 29 29 3b |tedStyle|Sheet));|
|00004f70| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004f80| 20 7d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | }. | }|
|00004f90| 0a 20 20 20 20 20 20 20 | 20 7d 0a 20 20 20 20 7d |. | }. }|
|00004fa0| 0a 0a 20 20 20 20 72 65 | 74 75 72 6e 20 73 74 79 |.. re|turn sty|
|00004fb0| 6c 65 53 68 65 65 74 73 | 3b 0a 7d 0a 0a 2f 2f 20 |leSheets|;.}..// |
|00004fc0| 49 66 20 74 68 65 72 65 | 20 69 73 20 61 20 73 74 |If there| is a st|
|00004fd0| 79 6c 65 20 73 68 65 65 | 74 20 66 6f 72 20 74 68 |yle shee|t for th|
|00004fe0| 69 73 20 6d 65 64 69 61 | 20 74 79 70 65 0a 66 75 |is media| type.fu|
|00004ff0| 6e 63 74 69 6f 6e 20 77 | 65 62 64 65 76 65 6c 6f |nction w|ebdevelo|
|00005000| 70 65 72 5f 68 61 73 53 | 74 79 6c 65 53 68 65 65 |per_hasS|tyleShee|
|00005010| 74 46 6f 72 4d 65 64 69 | 61 28 73 74 79 6c 65 53 |tForMedi|a(styleS|
|00005020| 68 65 65 74 4c 69 73 74 | 2c 20 6d 65 64 69 61 29 |heetList|, media)|
|00005030| 0a 7b 0a 20 20 20 20 2f | 2f 20 49 66 20 74 68 65 |.{. /|/ If the|
|00005040| 20 73 74 79 6c 65 20 73 | 68 65 65 74 20 6c 69 73 | style s|heet lis|
|00005050| 74 20 61 6e 64 20 6d 65 | 64 69 61 20 61 72 65 20 |t and me|dia are |
|00005060| 73 65 74 0a 20 20 20 20 | 69 66 28 73 74 79 6c 65 |set. |if(style|
|00005070| 53 68 65 65 74 4c 69 73 | 74 20 26 26 20 6d 65 64 |SheetLis|t && med|
|00005080| 69 61 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 20 20 |ia). |{. |
|00005090| 20 20 76 61 72 20 73 74 | 79 6c 65 53 68 65 65 74 | var st|yleSheet|
|000050a0| 20 20 20 20 20 20 20 3d | 20 6e 75 6c 6c 3b 0a 20 | =| null;. |
|000050b0| 20 20 20 20 20 20 20 76 | 61 72 20 73 74 79 6c 65 | v|ar style|
|000050c0| 53 68 65 65 74 4c 65 6e | 67 74 68 20 3d 20 73 74 |SheetLen|gth = st|
|000050d0| 79 6c 65 53 68 65 65 74 | 4c 69 73 74 2e 6c 65 6e |yleSheet|List.len|
|000050e0| 67 74 68 3b 0a 0a 20 20 | 20 20 20 20 20 20 2f 2f |gth;.. | //|
|000050f0| 20 4c 6f 6f 70 20 74 68 | 72 6f 75 67 68 20 74 68 | Loop th|rough th|
|00005100| 65 20 73 74 79 6c 65 20 | 73 68 65 65 74 73 0a 20 |e style |sheets. |
|00005110| 20 20 20 20 20 20 20 66 | 6f 72 28 76 61 72 20 69 | f|or(var i|
|00005120| 20 3d 20 30 3b 20 69 20 | 3c 20 73 74 79 6c 65 53 | = 0; i |< styleS|
|00005130| 68 65 65 74 4c 65 6e 67 | 74 68 3b 20 69 2b 2b 29 |heetLeng|th; i++)|
|00005140| 0a 20 20 20 20 20 20 20 | 20 7b 0a 20 20 20 20 20 |. | {. |
|00005150| 20 20 20 20 20 20 20 73 | 74 79 6c 65 53 68 65 65 | s|tyleShee|
|00005160| 74 20 3d 20 73 74 79 6c | 65 53 68 65 65 74 4c 69 |t = styl|eSheetLi|
|00005170| 73 74 5b 69 5d 3b 0a 0a | 20 20 20 20 20 20 20 20 |st[i];..| |
|00005180| 20 20 20 20 2f 2f 20 49 | 66 20 74 68 69 73 20 73 | // I|f this s|
|00005190| 74 79 6c 65 20 73 68 65 | 65 74 20 69 73 20 76 61 |tyle she|et is va|
|000051a0| 6c 69 64 20 61 6e 64 20 | 69 73 20 66 6f 72 20 74 |lid and |is for t|
|000051b0| 68 69 73 20 6d 65 64 69 | 61 20 74 79 70 65 0a 20 |his medi|a type. |
|000051c0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 28 77 65 | | if(we|
|000051d0| 62 64 65 76 65 6c 6f 70 | 65 72 5f 69 73 56 61 6c |bdevelop|er_isVal|
|000051e0| 69 64 53 74 79 6c 65 53 | 68 65 65 74 28 73 74 79 |idStyleS|heet(sty|
|000051f0| 6c 65 53 68 65 65 74 29 | 20 26 26 20 77 65 62 64 |leSheet)| && webd|
|00005200| 65 76 65 6c 6f 70 65 72 | 5f 69 73 4d 65 64 69 61 |eveloper|_isMedia|
|00005210| 53 74 79 6c 65 53 68 65 | 65 74 28 73 74 79 6c 65 |StyleShe|et(style|
|00005220| 53 68 65 65 74 2c 20 6d | 65 64 69 61 29 29 0a 20 |Sheet, m|edia)). |
|00005230| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|00005240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 74 | | ret|
|00005250| 75 72 6e 20 74 72 75 65 | 3b 0a 20 20 20 20 20 20 |urn true|;. |
|00005260| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 20 20 | }.| |
|00005270| 7d 0a 20 20 20 20 7d 0a | 0a 20 20 20 20 72 65 74 |}. }.|. ret|
|00005280| 75 72 6e 20 66 61 6c 73 | 65 3b 0a 7d 0a 0a 2f 2f |urn fals|e;.}..//|
|00005290| 20 49 73 20 74 68 69 73 | 20 73 74 79 6c 65 20 73 | Is this| style s|
|000052a0| 68 65 65 74 20 61 6e 20 | 61 6c 74 65 72 6e 61 74 |heet an |alternat|
|000052b0| 65 20 73 74 79 6c 65 20 | 73 68 65 65 74 0a 66 75 |e style |sheet.fu|
|000052c0| 6e 63 74 69 6f 6e 20 77 | 65 62 64 65 76 65 6c 6f |nction w|ebdevelo|
|000052d0| 70 65 72 5f 69 73 41 6c | 74 65 72 6e 61 74 65 53 |per_isAl|ternateS|
|000052e0| 74 79 6c 65 53 68 65 65 | 74 28 73 74 79 6c 65 53 |tyleShee|t(styleS|
|000052f0| 68 65 65 74 29 0a 7b 0a | 20 20 20 20 2f 2f 20 49 |heet).{.| // I|
|00005300| 66 20 74 68 65 20 73 74 | 79 6c 65 20 73 68 65 65 |f the st|yle shee|
|00005310| 74 20 69 73 20 73 65 74 | 0a 20 20 20 20 69 66 28 |t is set|. if(|
|00005320| 73 74 79 6c 65 53 68 65 | 65 74 29 0a 20 20 20 20 |styleShe|et). |
|00005330| 7b 0a 20 20 20 20 20 20 | 20 20 76 61 72 20 6f 77 |{. | var ow|
|00005340| 6e 65 72 4e 6f 64 65 20 | 3d 20 73 74 79 6c 65 53 |nerNode |= styleS|
|00005350| 68 65 65 74 2e 6f 77 6e | 65 72 4e 6f 64 65 3b 0a |heet.own|erNode;.|
|00005360| 0a 20 20 20 20 20 20 20 | 20 2f 2f 20 49 66 20 74 |. | // If t|
|00005370| 68 65 20 6f 77 6e 65 72 | 20 6e 6f 64 65 20 69 73 |he owner| node is|
|00005380| 20 73 65 74 0a 20 20 20 | 20 20 20 20 20 69 66 28 | set. | if(|
|00005390| 6f 77 6e 65 72 4e 6f 64 | 65 29 0a 20 20 20 20 20 |ownerNod|e). |
|000053a0| 20 20 20 7b 0a 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000053b0| 20 2f 2f 20 49 66 20 74 | 68 65 20 6f 77 6e 65 72 | // If t|he owner|
|000053c0| 20 6e 6f 64 65 20 69 73 | 20 61 20 70 72 6f 63 65 | node is| a proce|
|000053d0| 73 73 69 6e 67 20 69 6e | 73 74 72 75 63 74 69 6f |ssing in|structio|
|000053e0| 6e 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 |n. | if|
|000053f0| 28 6f 77 6e 65 72 4e 6f | 64 65 2e 6e 6f 64 65 54 |(ownerNo|de.nodeT|
|00005400| 79 70 65 20 3d 3d 20 43 | 6f 6d 70 6f 6e 65 6e 74 |ype == C|omponent|
|00005410| 73 2e 69 6e 74 65 72 66 | 61 63 65 73 2e 6e 73 49 |s.interf|aces.nsI|
|00005420| 44 4f 4d 4e 6f 64 65 2e | 50 52 4f 43 45 53 53 49 |DOMNode.|PROCESSI|
|00005430| 4e 47 5f 49 4e 53 54 52 | 55 43 54 49 4f 4e 5f 4e |NG_INSTR|UCTION_N|
|00005440| 4f 44 45 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ODE). | |
|00005450| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00005460| 20 20 20 2f 2f 20 49 66 | 20 74 68 65 20 70 72 6f | // If| the pro|
|00005470| 63 65 73 73 69 6e 67 20 | 69 6e 73 74 72 75 63 74 |cessing |instruct|
|00005480| 69 6f 6e 20 64 61 74 61 | 20 63 6f 6e 74 61 69 6e |ion data| contain|
|00005490| 73 20 61 6c 74 65 72 6e | 61 74 65 3d 22 79 65 73 |s altern|ate="yes|
|000054a0| 22 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|000054b0| 20 20 69 66 28 6f 77 6e | 65 72 4e 6f 64 65 2e 64 | if(own|erNode.d|
|000054c0| 61 74 61 2e 69 6e 64 65 | 78 4f 66 28 27 61 6c 74 |ata.inde|xOf('alt|
|000054d0| 65 72 6e 61 74 65 3d 22 | 79 65 73 22 27 29 20 21 |ernate="|yes"') !|
|000054e0| 3d 20 2d 31 29 0a 20 20 | 20 20 20 20 20 20 20 20 |= -1). | |
|000054f0| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00005500| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 | | retu|
|00005510| 72 6e 20 74 72 75 65 3b | 0a 20 20 20 20 20 20 20 |rn true;|. |
|00005520| 20 20 20 20 20 20 20 20 | 20 7d 0a 20 20 20 20 20 | | }. |
|00005530| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|00005540| 20 20 20 20 20 65 6c 73 | 65 20 69 66 28 6f 77 6e | els|e if(own|
|00005550| 65 72 4e 6f 64 65 2e 68 | 61 73 41 74 74 72 69 62 |erNode.h|asAttrib|
|00005560| 75 74 65 28 22 72 65 6c | 22 29 20 26 26 20 6f 77 |ute("rel|") && ow|
|00005570| 6e 65 72 4e 6f 64 65 2e | 67 65 74 41 74 74 72 69 |nerNode.|getAttri|
|00005580| 62 75 74 65 28 22 72 65 | 6c 22 29 2e 74 6f 4c 6f |bute("re|l").toLo|
|00005590| 77 65 72 43 61 73 65 28 | 29 20 3d 3d 20 22 61 6c |werCase(|) == "al|
|000055a0| 74 65 72 6e 61 74 65 20 | 73 74 79 6c 65 73 68 65 |ternate |styleshe|
|000055b0| 65 74 22 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |et"). | |
|000055c0| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000055d0| 20 20 20 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0a | retur|n true;.|
|000055e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0a 20 20 | | }. |
|000055f0| 20 20 20 20 20 20 7d 0a | 20 20 20 20 7d 0a 0a 20 | }.| }.. |
|00005600| 20 20 20 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b | retur|n false;|
|00005610| 0a 7d 0a 0a 2f 2f 20 49 | 73 20 74 68 69 73 20 73 |.}..// I|s this s|
|00005620| 74 79 6c 65 20 73 68 65 | 65 74 20 66 6f 72 20 74 |tyle she|et for t|
|00005630| 68 69 73 20 6d 65 64 69 | 61 20 74 79 70 65 0a 66 |his medi|a type.f|
|00005640| 75 6e 63 74 69 6f 6e 20 | 77 65 62 64 65 76 65 6c |unction |webdevel|
|00005650| 6f 70 65 72 5f 69 73 4d | 65 64 69 61 53 74 79 6c |oper_isM|ediaStyl|
|00005660| 65 53 68 65 65 74 28 73 | 74 79 6c 65 53 68 65 65 |eSheet(s|tyleShee|
|00005670| 74 2c 20 6d 61 74 63 68 | 4d 65 64 69 61 54 79 70 |t, match|MediaTyp|
|00005680| 65 29 0a 7b 0a 20 20 20 | 20 2f 2f 20 49 66 20 74 |e).{. | // If t|
|00005690| 68 65 20 73 74 79 6c 65 | 20 73 68 65 65 74 20 61 |he style| sheet a|
|000056a0| 6e 64 20 6d 61 74 63 68 | 20 6d 65 64 69 61 20 74 |nd match| media t|
|000056b0| 79 70 65 20 61 72 65 20 | 73 65 74 0a 20 20 20 20 |ype are |set. |
|000056c0| 69 66 28 73 74 79 6c 65 | 53 68 65 65 74 20 26 26 |if(style|Sheet &&|
|000056d0| 20 6d 61 74 63 68 4d 65 | 64 69 61 54 79 70 65 29 | matchMe|diaType)|
|000056e0| 0a 20 20 20 20 7b 0a 20 | 20 20 20 20 20 20 20 76 |. {. | v|
|000056f0| 61 72 20 6d 65 64 69 61 | 20 20 20 20 20 20 20 3d |ar media| =|
|00005700| 20 73 74 79 6c 65 53 68 | 65 65 74 2e 6d 65 64 69 | styleSh|eet.medi|
|00005710| 61 3b 0a 20 20 20 20 20 | 20 20 20 76 61 72 20 6d |a;. | var m|
|00005720| 65 64 69 61 4c 65 6e 67 | 74 68 20 3d 20 6d 65 64 |ediaLeng|th = med|
|00005730| 69 61 2e 6c 65 6e 67 74 | 68 3b 0a 20 20 20 20 20 |ia.lengt|h;. |
|00005740| 20 20 20 76 61 72 20 6d | 65 64 69 61 54 79 70 65 | var m|ediaType|
|00005750| 20 20 20 3d 20 6e 75 6c | 6c 3b 0a 0a 20 20 20 20 | = nul|l;.. |
|00005760| 20 20 20 20 2f 2f 20 49 | 66 20 74 68 65 72 65 20 | // I|f there |
|00005770| 69 73 20 6e 6f 20 6d 65 | 64 69 61 20 61 6e 64 20 |is no me|dia and |
|00005780| 74 68 65 20 6d 61 74 63 | 68 20 6d 65 64 69 61 20 |the matc|h media |
|00005790| 74 79 70 65 20 69 73 20 | 73 63 72 65 65 6e 0a 20 |type is |screen. |
|000057a0| 20 20 20 20 20 20 20 69 | 66 28 6d 65 64 69 61 4c | i|f(mediaL|
|000057b0| 65 6e 67 74 68 20 3d 3d | 20 30 20 26 26 20 6d 61 |ength ==| 0 && ma|
|000057c0| 74 63 68 4d 65 64 69 61 | 54 79 70 65 20 3d 3d 20 |tchMedia|Type == |
|000057d0| 22 73 63 72 65 65 6e 22 | 29 0a 20 20 20 20 20 20 |"screen"|). |
|000057e0| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000057f0| 72 65 74 75 72 6e 20 74 | 72 75 65 3b 0a 20 20 20 |return t|rue;. |
|00005800| 20 20 20 20 20 7d 0a 0a | 20 20 20 20 20 20 20 20 | }..| |
|00005810| 2f 2f 20 4c 6f 6f 70 20 | 74 68 72 6f 75 67 68 20 |// Loop |through |
|00005820| 74 68 65 20 6d 65 64 69 | 61 0a 20 20 20 20 20 20 |the medi|a. |
|00005830| 20 20 66 6f 72 28 76 61 | 72 20 69 20 3d 20 30 3b | for(va|r i = 0;|
|00005840| 20 69 20 3c 20 6d 65 64 | 69 61 4c 65 6e 67 74 68 | i < med|iaLength|
|00005850| 3b 20 69 2b 2b 29 0a 20 | 20 20 20 20 20 20 20 7b |; i++). | {|
|00005860| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 65 64 |. | med|
|00005870| 69 61 54 79 70 65 20 3d | 20 6d 65 64 69 61 2e 69 |iaType =| media.i|
|00005880| 74 65 6d 28 69 29 2e 74 | 6f 4c 6f 77 65 72 43 61 |tem(i).t|oLowerCa|
|00005890| 73 65 28 29 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |se();.. | |
|000058a0| 20 20 20 2f 2f 20 49 66 | 20 74 68 65 20 6d 65 64 | // If| the med|
|000058b0| 69 61 20 74 79 70 65 20 | 69 73 20 61 6c 6c 20 6f |ia type |is all o|
|000058c0| 72 20 6d 61 74 63 68 65 | 73 20 74 68 65 20 6d 61 |r matche|s the ma|
|000058d0| 74 63 68 20 6d 65 64 69 | 61 20 74 79 70 65 0a 20 |tch medi|a type. |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 28 6d 65 | | if(me|
|000058f0| 64 69 61 54 79 70 65 20 | 3d 3d 20 22 61 6c 6c 22 |diaType |== "all"|
|00005900| 20 7c 7c 20 6d 65 64 69 | 61 54 79 70 65 20 3d 3d | || medi|aType ==|
|00005910| 20 6d 61 74 63 68 4d 65 | 64 69 61 54 79 70 65 29 | matchMe|diaType)|
|00005920| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 0a 20 |. | {. |
|00005930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00005940| 65 74 75 72 6e 20 74 72 | 75 65 3b 0a 20 20 20 20 |eturn tr|ue;. |
|00005950| 20 20 20 20 20 20 20 20 | 7d 0a 20 20 20 20 20 20 | |}. |
|00005960| 20 20 7d 0a 20 20 20 20 | 7d 0a 0a 20 20 20 20 72 | }. |}.. r|
|00005970| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0a 7d 0a 0a |eturn fa|lse;.}..|
|00005980| 2f 2f 20 49 73 20 74 68 | 69 73 20 73 74 79 6c 65 |// Is th|is style|
|00005990| 20 73 68 65 65 74 20 61 | 20 76 61 6c 69 64 20 73 | sheet a| valid s|
|000059a0| 74 79 6c 65 20 73 68 65 | 65 74 0a 66 75 6e 63 74 |tyle she|et.funct|
|000059b0| 69 6f 6e 20 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |ion webd|eveloper|
|000059c0| 5f 69 73 56 61 6c 69 64 | 53 74 79 6c 65 53 68 65 |_isValid|StyleShe|
|000059d0| 65 74 28 73 74 79 6c 65 | 53 68 65 65 74 29 0a 7b |et(style|Sheet).{|
|000059e0| 0a 20 20 20 20 2f 2f 20 | 49 66 20 74 68 65 20 73 |. // |If the s|
|000059f0| 74 79 6c 65 20 73 68 65 | 65 74 20 69 73 20 73 65 |tyle she|et is se|
|00005a00| 74 0a 20 20 20 20 69 66 | 28 73 74 79 6c 65 53 68 |t. if|(styleSh|
|00005a10| 65 65 74 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |eet). | {. |
|00005a20| 20 20 20 76 61 72 20 73 | 74 79 6c 65 53 68 65 65 | var s|tyleShee|
|00005a30| 74 48 72 65 66 20 3d 20 | 73 74 79 6c 65 53 68 65 |tHref = |styleShe|
|00005a40| 65 74 2e 68 72 65 66 3b | 0a 0a 20 20 20 20 20 20 |et.href;|.. |
|00005a50| 20 20 2f 2f 20 49 66 20 | 74 68 65 20 73 74 79 6c | // If |the styl|
|00005a60| 65 20 73 68 65 65 74 20 | 68 72 65 66 20 69 73 20 |e sheet |href is |
|00005a70| 73 65 74 20 61 6e 64 20 | 74 68 69 73 20 69 73 20 |set and |this is |
|00005a80| 6e 6f 74 20 61 6e 20 69 | 6e 74 65 72 6e 61 6c 20 |not an i|nternal |
|00005a90| 73 74 79 6c 65 20 73 68 | 65 65 74 20 6f 72 20 74 |style sh|eet or t|
|00005aa0| 68 65 20 73 74 79 6c 65 | 20 73 68 65 65 74 20 68 |he style| sheet h|
|00005ab0| 72 65 66 20 69 73 20 6e | 6f 74 20 73 65 74 20 61 |ref is n|ot set a|
|00005ac0| 6e 64 20 74 68 69 73 20 | 64 6f 65 73 20 6e 6f 74 |nd this |does not|
|00005ad0| 20 68 61 76 65 20 61 20 | 57 65 62 20 44 65 76 65 | have a |Web Deve|
|00005ae0| 6c 6f 70 65 72 20 69 64 | 0a 20 20 20 20 20 20 20 |loper id|. |
|00005af0| 20 69 66 28 28 73 74 79 | 6c 65 53 68 65 65 74 48 | if((sty|leSheetH|
|00005b00| 72 65 66 20 26 26 20 73 | 74 79 6c 65 53 68 65 65 |ref && s|tyleShee|
|00005b10| 74 48 72 65 66 2e 69 6e | 64 65 78 4f 66 28 22 61 |tHref.in|dexOf("a|
|00005b20| 62 6f 75 74 3a 50 72 65 | 66 65 72 65 6e 63 65 53 |bout:Pre|ferenceS|
|00005b30| 74 79 6c 65 53 68 65 65 | 74 22 29 20 21 3d 20 30 |tyleShee|t") != 0|
|00005b40| 20 26 26 20 73 74 79 6c | 65 53 68 65 65 74 48 72 | && styl|eSheetHr|
|00005b50| 65 66 2e 69 6e 64 65 78 | 4f 66 28 22 63 68 72 6f |ef.index|Of("chro|
|00005b60| 6d 65 3a 2f 2f 22 29 20 | 21 3d 20 30 20 26 26 20 |me://") |!= 0 && |
|00005b70| 73 74 79 6c 65 53 68 65 | 65 74 48 72 65 66 2e 69 |styleShe|etHref.i|
|00005b80| 6e 64 65 78 4f 66 28 22 | 64 61 74 61 3a 74 65 78 |ndexOf("|data:tex|
|00005b90| 74 2f 63 73 73 22 29 20 | 21 3d 20 30 20 26 26 20 |t/css") |!= 0 && |
|00005ba0| 73 74 79 6c 65 53 68 65 | 65 74 48 72 65 66 2e 69 |styleShe|etHref.i|
|00005bb0| 6e 64 65 78 4f 66 28 22 | 6a 61 72 3a 66 69 6c 65 |ndexOf("|jar:file|
|00005bc0| 3a 2f 2f 22 29 20 21 3d | 20 30 20 26 26 20 73 74 |://") !=| 0 && st|
|00005bd0| 79 6c 65 53 68 65 65 74 | 48 72 65 66 2e 69 6e 64 |yleSheet|Href.ind|
|00005be0| 65 78 4f 66 28 22 72 65 | 73 6f 75 72 63 65 3a 2f |exOf("re|source:/|
|00005bf0| 2f 22 29 20 21 3d 20 30 | 29 20 7c 7c 20 28 21 73 |/") != 0|) || (!s|
|00005c00| 74 79 6c 65 53 68 65 65 | 74 48 72 65 66 20 26 26 |tyleShee|tHref &&|
|00005c10| 20 28 21 73 74 79 6c 65 | 53 68 65 65 74 2e 68 61 | (!style|Sheet.ha|
|00005c20| 73 41 74 74 72 69 62 75 | 74 65 28 22 69 64 22 29 |sAttribu|te("id")|
|00005c30| 20 7c 7c 20 73 74 79 6c | 65 53 68 65 65 74 2e 67 | || styl|eSheet.g|
|00005c40| 65 74 41 74 74 72 69 62 | 75 74 65 28 22 69 64 22 |etAttrib|ute("id"|
|00005c50| 29 2e 69 6e 64 65 78 4f | 66 28 22 77 65 62 64 65 |).indexO|f("webde|
|00005c60| 76 65 6c 6f 70 65 72 2d | 22 29 20 21 3d 20 30 29 |veloper-|") != 0)|
|00005c70| 29 29 0a 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 |)). | {. |
|00005c80| 20 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 | | return |
|00005c90| 74 72 75 65 3b 0a 20 20 | 20 20 20 20 20 20 7d 0a |true;. | }.|
|00005ca0| 20 20 20 20 7d 0a 0a 20 | 20 20 20 72 65 74 75 72 | }.. | retur|
|00005cb0| 6e 20 66 61 6c 73 65 3b | 0a 7d 0a 0a 2f 2f 20 49 |n false;|.}..// I|
|00005cc0| 73 20 74 68 69 73 20 73 | 74 79 6c 65 20 72 75 6c |s this s|tyle rul|
|00005cd0| 65 20 69 73 20 61 20 76 | 61 6c 69 64 20 73 74 79 |e is a v|alid sty|
|00005ce0| 6c 65 20 72 75 6c 65 0a | 66 75 6e 63 74 69 6f 6e |le rule.|function|
|00005cf0| 20 77 65 62 64 65 76 65 | 6c 6f 70 65 72 5f 69 73 | webdeve|loper_is|
|00005d00| 56 61 6c 69 64 53 74 79 | 6c 65 52 75 6c 65 28 73 |ValidSty|leRule(s|
|00005d10| 74 79 6c 65 52 75 6c 65 | 4c 69 73 74 2c 20 73 74 |tyleRule|List, st|
|00005d20| 79 6c 65 52 75 6c 65 29 | 0a 7b 0a 20 20 20 20 2f |yleRule)|.{. /|
|00005d30| 2f 20 49 66 20 74 68 65 | 20 73 74 79 6c 65 20 72 |/ If the| style r|
|00005d40| 75 6c 65 20 69 73 20 73 | 65 74 0a 20 20 20 20 69 |ule is s|et. i|
|00005d50| 66 28 73 74 79 6c 65 52 | 75 6c 65 29 0a 20 20 20 |f(styleR|ule). |
|00005d60| 20 7b 0a 20 20 20 20 20 | 20 20 20 2f 2f 20 49 66 | {. | // If|
|00005d70| 20 74 68 65 20 73 74 79 | 6c 65 20 72 75 6c 65 20 | the sty|le rule |
|00005d80| 69 73 20 61 6e 20 69 6e | 76 61 6c 69 64 20 73 74 |is an in|valid st|
|00005d90| 79 6c 65 20 72 75 6c 65 | 0a 20 20 20 20 20 20 20 |yle rule|. |
|00005da0| 20 69 66 28 73 74 79 6c | 65 52 75 6c 65 2e 69 6e | if(styl|eRule.in|
|00005db0| 64 65 78 4f 66 28 22 2d | 6d 6f 7a 2d 22 29 20 3d |dexOf("-|moz-") =|
|00005dc0| 3d 20 30 20 7c 7c 20 28 | 28 73 74 79 6c 65 52 75 |= 0 || (|(styleRu|
|00005dd0| 6c 65 20 3d 3d 20 22 6d | 61 72 67 69 6e 2d 6c 65 |le == "m|argin-le|
|00005de0| 66 74 2d 6c 74 72 2d 73 | 6f 75 72 63 65 22 20 7c |ft-ltr-s|ource" ||
|00005df0| 7c 20 73 74 79 6c 65 52 | 75 6c 65 20 3d 3d 20 22 || styleR|ule == "|
|00005e00| 6d 61 72 67 69 6e 2d 6c | 65 66 74 2d 72 74 6c 2d |margin-l|eft-rtl-|
|00005e10| 73 6f 75 72 63 65 22 20 | 7c 7c 20 73 74 79 6c 65 |source" ||| style|
|00005e20| 52 75 6c 65 20 3d 3d 20 | 22 6d 61 72 67 69 6e 2d |Rule == |"margin-|
|00005e30| 72 69 67 68 74 2d 6c 74 | 72 2d 73 6f 75 72 63 65 |right-lt|r-source|
|00005e40| 22 20 7c 7c 20 73 74 79 | 6c 65 52 75 6c 65 20 3d |" || sty|leRule =|
|00005e50| 3d 20 22 6d 61 72 67 69 | 6e 2d 72 69 67 68 74 2d |= "margi|n-right-|
|00005e60| 72 74 6c 2d 73 6f 75 72 | 63 65 22 20 7c 7c 20 73 |rtl-sour|ce" || s|
|00005e70| 74 79 6c 65 52 75 6c 65 | 20 3d 3d 20 22 70 61 64 |tyleRule| == "pad|
|00005e80| 64 69 6e 67 2d 6c 65 66 | 74 2d 6c 74 72 2d 73 6f |ding-lef|t-ltr-so|
|00005e90| 75 72 63 65 22 20 7c 7c | 20 73 74 79 6c 65 52 75 |urce" ||| styleRu|
|00005ea0| 6c 65 20 3d 3d 20 22 70 | 61 64 64 69 6e 67 2d 6c |le == "p|adding-l|
|00005eb0| 65 66 74 2d 72 74 6c 2d | 73 6f 75 72 63 65 22 20 |eft-rtl-|source" |
|00005ec0| 7c 7c 20 73 74 79 6c 65 | 52 75 6c 65 20 3d 3d 20 ||| style|Rule == |
|00005ed0| 22 70 61 64 64 69 6e 67 | 2d 72 69 67 68 74 2d 6c |"padding|-right-l|
|00005ee0| 74 72 2d 73 6f 75 72 63 | 65 22 20 7c 7c 20 73 74 |tr-sourc|e" || st|
|00005ef0| 79 6c 65 52 75 6c 65 20 | 3d 3d 20 22 70 61 64 64 |yleRule |== "padd|
|00005f00| 69 6e 67 2d 72 69 67 68 | 74 2d 72 74 6c 2d 73 6f |ing-righ|t-rtl-so|
|00005f10| 75 72 63 65 22 29 20 26 | 26 20 73 74 79 6c 65 52 |urce") &|& styleR|
|00005f20| 75 6c 65 4c 69 73 74 2e | 67 65 74 50 72 6f 70 65 |uleList.|getPrope|
|00005f30| 72 74 79 56 61 6c 75 65 | 28 73 74 79 6c 65 52 75 |rtyValue|(styleRu|
|00005f40| 6c 65 29 20 3d 3d 20 22 | 70 68 79 73 69 63 61 6c |le) == "|physical|
|00005f50| 22 29 29 0a 20 20 20 20 | 20 20 20 20 7b 0a 20 20 |")). | {. |
|00005f60| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00005f70| 20 66 61 6c 73 65 3b 0a | 20 20 20 20 20 20 20 20 | false;.| |
|00005f80| 7d 0a 0a 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |}.. | retur|
|00005f90| 6e 20 74 72 75 65 3b 0a | 20 20 20 20 7d 0a 0a 20 |n true;.| }.. |
|00005fa0| 20 20 20 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b | retur|n false;|
|00005fb0| 0a 7d 50 4b 03 04 0a 00 | 00 00 00 00 0d 75 aa 36 |.}PK....|.....u.6|
|00005fc0| 0f 3f 15 fa cb 33 00 00 | cb 33 00 00 22 00 00 00 |.?...3..|.3.."...|
|00005fd0| 63 6f 6e 74 65 6e 74 2f | 77 65 62 64 65 76 65 6c |content/|webdevel|
|00005fe0| 6f 70 65 72 2f 63 6f 6d | 6d 6f 6e 2f 64 6f 6d 2e |oper/com|mon/dom.|
|00005ff0| 6a 73 2f 2f 20 52 65 74 | 75 72 6e 73 20 74 68 65 |js// Ret|urns the|
|00006000| 20 63 75 72 72 65 6e 74 | 20 63 6f 6e 74 65 6e 74 | current| content|
|00006010| 20 64 6f 63 75 6d 65 6e | 74 0a 66 75 6e 63 74 69 | documen|t.functi|
|00006020| 6f 6e 20 77 65 62 64 65 | 76 65 6c 6f 70 65 72 5f |on webde|veloper_|
|00006030| 67 65 74 43 6f 6e 74 65 | 6e 74 44 6f 63 75 6d 65 |getConte|ntDocume|
|00006040| 6e 74 28 29 0a 7b 0a 20 | 20 20 20 72 65 74 75 72 |nt().{. | retur|
|00006050| 6e 20 77 65 62 64 65 76 | 65 6c 6f 70 65 72 5f 67 |n webdev|eloper_g|
|00006060| 65 74 53 65 6c 65 63 74 | 65 64 42 72 6f 77 73 65 |etSelect|edBrowse|
|00006070| 72 28 29 2e 63 6f 6e 74 | 65 6e 74 44 6f 63 75 6d |r().cont|entDocum|
|00006080| 65 6e 74 3b 0a 7d 0a 0a | 2f 2f 20 52 65 74 75 72 |ent;.}..|// Retur|
|00006090| 6e 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 63 |ns the c|urrent c|
|000060a0| 6f 6e 74 65 6e 74 20 77 | 69 6e 64 6f 77 0a 66 75 |ontent w|indow.fu|
|000060b0| 6e 63 74 69 6f 6e 20 77 | 65 62 64 65 76 65 6c 6f |nction w|ebdevelo|
|000060c0| 70 65 72 5f 67 65 74 43 | 6f 6e 74 65 6e 74 57 69 |per_getC|ontentWi|
|000060d0| 6e 64 6f 77 28 29 0a 7b | 0a 20 20 20 20 72 65 74 |ndow().{|. ret|
|000060e0| 75 72 6e 20 77 65 62 64 | 65 76 65 6c 6f 70 65 72 |urn webd|eveloper|
|000060f0| 5f 67 65 74 53 65 6c 65 | 63 74 65 64 42 72 6f 77 |_getSele|ctedBrow|
|00006100| 73 65 72 28 29 2e 63 6f | 6e 74 65 6e 74 57 69 6e |ser().co|ntentWin|
|00006110| 64 6f 77 3b 0a 7d 0a 0a | 2f 2f 20 52 65 74 75 72 |dow;.}..|// Retur|
|00006120| 6e 73 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 20 |ns the d|ocument |
|00006130| 62 6f 64 79 20 65 6c 65 | 6d 65 6e 74 0a 66 75 6e |body ele|ment.fun|
|00006140| 63 74 69 6f 6e 20 77 65 | 62 64 65 76 65 6c 6f 70 |ction we|bdevelop|
|00006150| 65 72 5f 67 65 74 44 6f | 63 75 6d 65 6e 74 42 6f |er_getDo|cumentBo|
|00006160| 64 79 45 6c 65 6d 65 6e | 74 28 63 6f 6e 74 65 6e |dyElemen|t(conten|
|00006170| 74 44 6f 63 75 6d 65 6e | 74 29 0a 7b 0a 20 20 20 |tDocumen|t).{. |
|00006180| 20 2f 2f 20 49 66 20 74 | 68 65 72 65 20 69 73 20 | // If t|here is |
|00006190| 61 20 62 6f 64 79 20 65 | 6c 65 6d 65 6e 74 0a 20 |a body e|lement. |
|000061a0| 20 20 20 69 66 28 63 6f | 6e 74 65 6e 74 44 6f 63 | if(co|ntentDoc|
|000061b0| 75 6d 65 6e 74 2e 62 6f | 64 79 29 0a 20 20 20 20 |ument.bo|dy). |
|000061c0| 7b 0a 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |{. | return|
|000061d0| 20 63 6f 6e 74 65 6e 74 | 44 6f 63 75 6d 65 6e 74 | content|Document|
|000061e0| 2e 62 6f 64 79 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |.body;. | }. |
|000061f0| 20 65 6c 73 65 0a 20 20 | 20 20 7b 0a 20 20 20 20 | else. | {. |
|00006200| 20 20 20 20 76 61 72 20 | 62 6f 64 79 45 6c 65 6d | var |bodyElem|
|00006210| 65 6e 74 4c 69 73 74 20 | 3d 20 63 6f 6e 74 65 6e |entList |= conten|
|00006220| 74 44 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 |tDocumen|t.getEle|
|00006230| 6d 65 6e 74 73 42 79 54 | 61 67 4e 61 6d 65 28 22 |mentsByT|agName("|
|00006240| 62 6f 64 79 22 29 3b 0a | 0a 20 20 20 20 20 20 20 |body");.|. |
|00006250| 20 2f 2f 20 49 66 20 74 | 68 65 72 65 20 69 73 20 | // If t|here is |
|00006260| 61 20 62 6f 64 79 20 65 | 6c 65 6d 65 6e 74 0a 20 |a body e|lement. |
|00006270| 20 20 20 20 20 20 20 69 | 66 28 62 6f 64 79 45 6c | i|f(bodyEl|
|00006280| 65 6d 65 6e 74 4c 69 73 | 74 2e 6c 65 6e 67 74 68 |ementLis|t.length|
|00006290| 20 3e 20 30 29 0a 20 20 | 20 20 20 20 20 20 7b 0a | > 0). | {.|
|000062a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 | | retu|
|000062b0| 72 6e 20 62 6f 64 79 45 | 6c 65 6d 65 6e 74 4c 69 |rn bodyE|lementLi|
|000062c0| 73 74 5b 30 5d 3b 0a 20 | 20 20 20 20 20 20 20 7d |st[0];. | }|
|000062d0| 0a 20 20 20 20 7d 0a 0a | 20 20 20 20 72 65 74 75 |. }..| retu|
|000062e0| 72 6e 20 63 6f 6e 74 65 | 6e 74 44 6f 63 75 6d 65 |rn conte|ntDocume|
|000062f0| 6e 74 2e 64 6f 63 75 6d | 65 6e 74 45 6c 65 6d 65 |nt.docum|entEleme|
|00006300| 6e 74 3b 0a 7d 0a 0a 2f | 2f 20 52 65 74 75 72 6e |nt;.}../|/ Return|
|00006310| 73 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 68 |s the do|cument h|
|00006320| 65 61 64 20 65 6c 65 6d | 65 6e 74 0a 66 75 6e 63 |ead elem|ent.func|
|00006330| 74 69 6f 6e 20 77 65 62 | 64 65 76 65 6c 6f 70 65 |tion web|develope|
|00006340| 72 5f 67 65 74 44 6f 63 | 75 6d 65 6e 74 48 65 61 |r_getDoc|umentHea|
|00006350| 64 45 6c 65 6d 65 6e 74 | 28 63 6f 6e 74 65 6e 74 |dElement|(content|
|00006360| 44 6f 63 75 6d 65 6e 74 | 29 0a 7b 0a 20 20 20 20 |Document|).{. |
|00006370| 76 61 72 20 68 65 61 64 | 45 6c 65 6d 65 6e 74 4c |var head|ElementL|
|00006380| 69 73 74 20 3d 20 63 6f | 6e 74 65 6e 74 44 6f 63 |ist = co|ntentDoc|
|00006390| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|000063a0| 73 42 79 54 61 67 4e 61 | 6d 65 28 22 68 65 61 64 |sByTagNa|me("head|
|000063b0| 22 29 3b 0a 0a 20 20 20 | 20 2f 2f 20 49 66 20 74 |");.. | // If t|
|000063c0| 68 65 72 65 20 69 73 20 | 61 20 68 65 61 64 20 65 |here is |a head e|
|000063d0| 6c 65 6d 65 6e 74 0a 20 | 20 20 20 69 66 28 68 65 |lement. | if(he|
|000063e0| 61 64 45 6c 65 6d 65 6e | 74 4c 69 73 74 2e 6c 65 |adElemen|tList.le|
|000063f0| 6e 67 74 68 20 3e 20 30 | 29 0a 20 20 20 20 7b 0a |ngth > 0|). {.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.