├── .csslintrc.json ├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── chrome ├── config │ ├── config.properties │ └── manifest.json └── gulp │ └── gulp.js ├── common ├── config │ └── config.properties ├── css │ ├── about │ │ └── about.css │ ├── embedded │ │ ├── dashboard │ │ │ ├── external │ │ │ │ ├── dashboard.css │ │ │ │ └── element-information.css │ │ │ └── internal │ │ │ │ └── dashboard.css │ │ └── toolbar │ │ │ ├── external │ │ │ ├── color-picker.css │ │ │ ├── line-guides.css │ │ │ ├── ruler.css │ │ │ └── toolbar.css │ │ │ └── internal │ │ │ ├── color-picker.css │ │ │ ├── line-guides.css │ │ │ └── toolbar.css │ ├── features │ │ ├── before.css │ │ ├── css │ │ │ └── use-border-box-model.css │ │ ├── forms │ │ │ ├── display-form-details.css │ │ │ └── outline-form-fields-without-labels.css │ │ ├── images │ │ │ ├── display-image-dimensions.css │ │ │ ├── hide-background-images.css │ │ │ ├── hide-images.css │ │ │ ├── make-images-invisible.css │ │ │ ├── outline-all-images.css │ │ │ ├── outline-background-images.css │ │ │ ├── outline-images-with-adjusted-dimensions.css │ │ │ ├── outline-images-with-empty-alt-attributes.css │ │ │ ├── outline-images-with-oversized-dimensions.css │ │ │ ├── outline-images-without-alt-attributes.css │ │ │ └── outline-images-without-dimensions.css │ │ ├── information │ │ │ ├── display-abbreviations.css │ │ │ ├── display-aria-roles.css │ │ │ ├── display-div-dimensions.css │ │ │ ├── display-div-order.css │ │ │ ├── display-link-details.css │ │ │ ├── display-object-information.css │ │ │ ├── display-table-information.css │ │ │ └── display-topographic-information.css │ │ ├── miscellaneous │ │ │ └── linearize-page.css │ │ └── outline │ │ │ ├── outline-block-level-elements-before.css │ │ │ ├── outline-block-level-elements.css │ │ │ ├── outline-deprecated-elements-before.css │ │ │ ├── outline-deprecated-elements.css │ │ │ ├── outline-floated-elements.css │ │ │ ├── outline-frames.css │ │ │ ├── outline-headings-before.css │ │ │ ├── outline-headings.css │ │ │ ├── outline-non-secure-elements.css │ │ │ ├── outline-positioned-elements.css │ │ │ ├── outline-table-captions.css │ │ │ ├── outline-table-cells-before.css │ │ │ ├── outline-table-cells.css │ │ │ └── outline-tables.css │ ├── generated │ │ ├── common.css │ │ ├── view-color-information.css │ │ ├── view-document-outline.css │ │ ├── view-javascript.css │ │ └── view-responsive-layouts.css │ ├── options │ │ ├── options.css │ │ └── syntax-highlight.css │ └── overlay │ │ └── overlay.css ├── gulp │ ├── build.js │ ├── gulp.js │ ├── img.js │ ├── lint.js │ └── package.js ├── html │ ├── about │ │ └── about.html │ ├── generated │ │ ├── find-broken-images.html │ │ ├── find-duplicate-ids.html │ │ ├── validate-local-css.html │ │ ├── validate-local-html.html │ │ ├── view-anchor-information.html │ │ ├── view-color-information.html │ │ ├── view-cookie-information.html │ │ ├── view-css.html │ │ ├── view-document-outline.html │ │ ├── view-form-information.html │ │ ├── view-image-information.html │ │ ├── view-javascript.html │ │ ├── view-link-information.html │ │ ├── view-meta-tag-information.html │ │ ├── view-response-headers.html │ │ └── view-responsive-layouts.html │ ├── options │ │ ├── options.html │ │ └── syntax-highlight.html │ └── overlay │ │ └── overlay.html ├── img │ ├── logos │ │ ├── color │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 48.png │ │ │ └── 64.png │ │ ├── gray │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 48.png │ │ │ └── 64.png │ │ └── monochrome │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 48.png │ │ │ └── 64.png │ └── transparent.png ├── js │ ├── about │ │ └── about.js │ ├── background │ │ └── background.js │ ├── common │ │ ├── common.js │ │ ├── cookies.js │ │ ├── css.js │ │ ├── locales.js │ │ └── storage.js │ ├── content │ │ └── content.js │ ├── embedded │ │ ├── dashboard │ │ │ ├── dashboard.js │ │ │ ├── edit-css.js │ │ │ └── element-information.js │ │ └── toolbar │ │ │ ├── color-picker.js │ │ │ ├── line-guides.js │ │ │ └── ruler.js │ ├── features │ │ ├── common.js │ │ ├── css.js │ │ ├── forms.js │ │ ├── images.js │ │ ├── information.js │ │ ├── miscellaneous.js │ │ └── outline.js │ ├── generated │ │ ├── common.js │ │ ├── find-broken-images.js │ │ ├── find-duplicate-ids.js │ │ ├── validate-local.js │ │ ├── view-anchor-information.js │ │ ├── view-color-information.js │ │ ├── view-cookie-information.js │ │ ├── view-css.js │ │ ├── view-document-outline.js │ │ ├── view-form-information.js │ │ ├── view-image-information.js │ │ ├── view-javascript.js │ │ ├── view-link-information.js │ │ ├── view-meta-tag-information.js │ │ ├── view-response-headers.js │ │ └── view-responsive-layouts.js │ ├── options │ │ ├── options.js │ │ └── syntax-highlight.js │ ├── overlay │ │ ├── cookies.js │ │ ├── css.js │ │ ├── disable.js │ │ ├── forms.js │ │ ├── images.js │ │ ├── information.js │ │ ├── miscellaneous.js │ │ ├── options.js │ │ ├── outline.js │ │ ├── overlay.js │ │ ├── resize.js │ │ └── tools.js │ └── upgrade │ │ └── upgrade.js ├── lib │ ├── beautify.js │ ├── bootstrap │ │ ├── bootstrap.css │ │ └── bootstrap.js │ ├── codemirror │ │ ├── codemirror.css │ │ ├── codemirror.js │ │ ├── css.js │ │ ├── htmlmixed.js │ │ ├── javascript.js │ │ ├── latte.css │ │ ├── mocha.css │ │ └── xml.js │ ├── mustache.js │ ├── purify.js │ └── reset.css ├── locales │ └── en_US │ │ └── messages.json ├── svg │ ├── donate │ │ └── icons.svg │ ├── icons │ │ └── icons.svg │ ├── logos │ │ ├── color │ │ │ └── logo.svg │ │ ├── gray │ │ │ └── logo.svg │ │ └── monochrome │ │ │ └── logo.svg │ ├── options │ │ ├── advanced.svg │ │ ├── colors.svg │ │ ├── general.svg │ │ ├── resize.svg │ │ ├── responsive.svg │ │ └── tools.svg │ └── overlay │ │ └── color │ │ ├── cookies.svg │ │ ├── css.svg │ │ ├── disable.svg │ │ ├── forms.svg │ │ ├── images.svg │ │ ├── information.svg │ │ ├── miscellaneous.svg │ │ ├── options.svg │ │ ├── outline.svg │ │ ├── resize.svg │ │ └── tools.svg └── tests │ └── html │ ├── dashboard │ ├── dashboard.html │ └── index.html │ ├── display-color-picker │ ├── index.html │ └── toolbar.html │ ├── display-line-guides │ ├── index.html │ └── toolbar.html │ ├── display-ruler │ ├── index.html │ └── toolbar.html │ ├── generated │ └── index.html │ └── options │ └── index.html ├── edge ├── config │ ├── config.properties │ └── manifest.json └── gulp │ └── gulp.js ├── firefox ├── config │ ├── config.properties │ └── manifest.json ├── css │ └── overlay │ │ └── overlay.css └── gulp │ └── gulp.js ├── gulpfile.js ├── license.txt ├── opera ├── config │ ├── config.properties │ └── manifest.json ├── css │ └── overlay │ │ └── overlay.css └── gulp │ └── gulp.js ├── package.json └── readme.md /.csslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-model": false, 4 | "box-sizing": false, 5 | "compatible-vendor-prefixes": false, 6 | "duplicate-background-images": false, 7 | "floats": false, 8 | "font-sizes": false, 9 | "ids": false, 10 | "important": false, 11 | "overqualified-elements": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "unique-headings": false, 15 | "universal-selector": false, 16 | "unqualified-attributes": false 17 | } 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors. See http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build/ 3 | merge/ 4 | node_modules/ 5 | package-lock.json 6 | -------------------------------------------------------------------------------- /chrome/config/config.properties: -------------------------------------------------------------------------------- 1 | version=3.0.1 2 | -------------------------------------------------------------------------------- /chrome/config/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": { "default_icon": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, "default_popup": "/overlay/overlay.html", "default_title": "__MSG_extensionName__" }, 3 | "background": { "service_worker": "/background/background.js" }, 4 | "content_scripts": [{ "js": ["/content/content.js"], "matches": [""] }], 5 | "default_locale": "en_US", 6 | "description": "__MSG_extensionDescription__", 7 | "homepage_url": "@url@", 8 | "host_permissions": [""], 9 | "icons": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, 10 | "manifest_version": 3, 11 | "name": "__MSG_extensionName__", 12 | "options_page": "/options/options.html", 13 | "permissions": ["browsingData", "contentSettings", "cookies", "history", "scripting", "storage", "tabs"], 14 | "version": "@version@", 15 | "web_accessible_resources": [{ "matches": [""], "resources": ["/embedded/css/*.css", "/embedded/js/dashboard/dashboard.js", "/features/css/*.css", "/img/transparent.png", "/lib/bootstrap/bootstrap.css", "/lib/bootstrap/bootstrap.js", "/lib/reset.css", "/svg/logos/color/logo.svg"], "use_dynamic_url": true }] 16 | } 17 | -------------------------------------------------------------------------------- /chrome/gulp/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | global.chromePackageName = "web-developer-chrome.zip"; 4 | 5 | var del = require("del"); 6 | var gulp = require("gulp"); 7 | var runSequence = require("run-sequence"); 8 | 9 | gulp.task("build-chrome-all", function() 10 | { 11 | return global.buildAll("chrome"); 12 | }); 13 | 14 | gulp.task("clean-chrome", function() 15 | { 16 | return del(["build/chrome", "build/chrome.properties", "build/" + global.chromePackageName]); 17 | }); 18 | 19 | gulp.task("initialize-chrome-build", function(callback) 20 | { 21 | global.initializeBuild("chrome", callback); 22 | }); 23 | 24 | gulp.task("package-chrome", function() 25 | { 26 | return global.packageTask("chrome", global.chromePackageName); 27 | }); 28 | 29 | gulp.task("build-chrome", function(callback) { runSequence("initialize-chrome-build", "build-chrome-all", callback); }); 30 | gulp.task("chrome", function(callback) { runSequence("build-chrome", "package-chrome", callback); }); 31 | -------------------------------------------------------------------------------- /common/config/config.properties: -------------------------------------------------------------------------------- 1 | author=Chris Pederick 2 | color.danger=#dc3545 3 | color.success=#198754 4 | description=Adds a toolbar button with various web developer tools. 5 | name=Web Developer 6 | url=https://chrispederick.com/work/web-developer/ 7 | -------------------------------------------------------------------------------- /common/css/about/about.css: -------------------------------------------------------------------------------- 1 | /* About styles */ 2 | 3 | #website { background-color: #8839ef; border-color: #8839ef; } 4 | #website:active, #website:hover { background-color: #7287fd; border-color: #7287fd; } 5 | .donate-icon { bottom: -1em; color: #a3cfbb; fill: currentColor; height: 5em; right: -1em; width: 5em; } 6 | -------------------------------------------------------------------------------- /common/css/embedded/dashboard/external/dashboard.css: -------------------------------------------------------------------------------- 1 | #web-developer-dashboard 2 | { 3 | background: transparent !important; 4 | border: none !important; 5 | -webkit-box-shadow: none !important; 6 | -moz-box-shadow: none !important; 7 | box-shadow: none !important; 8 | clear: none !important; 9 | display: block !important; 10 | float: none !important; 11 | font-style: normal !important; 12 | font-variant: normal !important; 13 | font-weight: normal !important; 14 | height: auto !important; 15 | letter-spacing: 0 !important; 16 | line-height: 1 !important; 17 | margin: 0 !important; 18 | opacity: 1 !important; 19 | padding: 0 !important; 20 | position: static !important; 21 | text-align: left !important; 22 | text-decoration: none !important; 23 | text-shadow: none !important; 24 | text-transform: none !important; 25 | width: auto !important; 26 | } 27 | #web-developer-dashboard { border-top: 1px solid #c4c8cb !important; bottom: 0 !important; box-shadow: 0 0 3px rgba(0, 0, 0, 0.175) !important; height: 200px !important; left: 0 !important; min-height: 100px !important; outline-style: none !important; position: fixed !important; width: 100% !important; z-index: 2147483647 !important; } 28 | -------------------------------------------------------------------------------- /common/css/embedded/dashboard/external/element-information.css: -------------------------------------------------------------------------------- 1 | * { cursor: crosshair !important; } 2 | *::selection { background-color: transparent !important; } 3 | -------------------------------------------------------------------------------- /common/css/embedded/dashboard/internal/dashboard.css: -------------------------------------------------------------------------------- 1 | /* Dashboard styles */ 2 | 3 | h1 { margin: 0; } 4 | h1 img { height: 1em; vertical-align: -0.125em; width: 1em; } 5 | #web-developer-dashboard-resizer { cursor: row-resize; height: 3px; } 6 | #web-developer-dashboard-tabs .nav-link { padding-top: 0.25rem; } 7 | #web-developer-dashboard-tabs .ms-auto .nav-link { padding-top: 0.5rem; } 8 | 9 | /* Edit CSS styles */ 10 | 11 | #web-developer-edit-css-panels > div > textarea { border-style: none; box-shadow: none; font-size: 0.875em; height: 100%; } 12 | 13 | /* Element ancestors styles */ 14 | 15 | #current-element-ancestors > .breadcrumb > li > a, .web-developer-middle-ancestor a { cursor: text; pointer-events: none; text-decoration: none; } 16 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/external/color-picker.css: -------------------------------------------------------------------------------- 1 | * { cursor: crosshair !important; } 2 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/external/line-guides.css: -------------------------------------------------------------------------------- 1 | .web-developer-line-guide, .web-developer-line-guide div 2 | { 3 | background: transparent !important; 4 | border: none !important; 5 | -webkit-box-shadow: none !important; 6 | -moz-box-shadow: none !important; 7 | box-shadow: none !important; 8 | clear: none !important; 9 | float: none !important; 10 | font-style: normal !important; 11 | font-variant: normal !important; 12 | font-weight: normal !important; 13 | letter-spacing: 0 !important; 14 | line-height: 1 !important; 15 | margin: 0 !important; 16 | opacity: 1 !important; 17 | padding: 0 !important; 18 | text-align: left !important; 19 | text-decoration: none !important; 20 | text-shadow: none !important; 21 | text-transform: none !important; 22 | } 23 | .web-developer-horizontal-line-guide { left: 0 !important; padding: 2px 0 !important; } 24 | .web-developer-horizontal-line-guide div { height: 1px !important; width: 100% !important; } 25 | .web-developer-line-guide { cursor: move !important; position: fixed !important; z-index: 2147483646 !important; } 26 | .web-developer-vertical-line-guide { padding: 0 2px !important; top: 0 !important; } 27 | .web-developer-vertical-line-guide div { height: 100% !important; width: 1px !important; } 28 | 29 | *::selection { background-color: transparent !important; } 30 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/external/ruler.css: -------------------------------------------------------------------------------- 1 | * { cursor: crosshair !important; } 2 | 3 | #web-developer-ruler { border-width: 1px !important; cursor: move !important; } 4 | #web-developer-ruler, #web-developer-ruler div { border-style: none !important; outline: #dc3545 solid 1px !important; } 5 | #web-developer-ruler, #web-developer-ruler div, #web-developer-ruler-background-bottom, #web-developer-ruler-background-left, #web-developer-ruler-background-right, #web-developer-ruler-background-top, #web-developer-ruler-container { margin: 0 !important; padding: 0 !important; position: absolute !important; } 6 | #web-developer-ruler div { background-color: #dc3545; background-color: rgba(241, 174, 181, 0.5); height: 20px !important; width: 20px !important; } 7 | #web-developer-ruler-background-bottom, #web-developer-ruler-bottom-left, #web-developer-ruler-bottom-right { bottom: 0 !important; } 8 | #web-developer-ruler-background-bottom, #web-developer-ruler-background-left, #web-developer-ruler-background-right, #web-developer-ruler-background-top { background: #000; height: 0; opacity: 0.25; width: 0; } 9 | #web-developer-ruler-background-bottom, #web-developer-ruler-background-left, #web-developer-ruler-background-right, #web-developer-ruler-background-top, #web-developer-ruler-container { border-style: none !important; } 10 | #web-developer-ruler-background-bottom, #web-developer-ruler-background-top, #web-developer-ruler-bottom-left, #web-developer-ruler-container, #web-developer-ruler-top-left { left: 0 !important; } 11 | #web-developer-ruler-background-right, #web-developer-ruler-bottom-right, #web-developer-ruler-top-right { right: 0 !important; } 12 | #web-developer-ruler-background-top, #web-developer-ruler-container, #web-developer-ruler-top-left, #web-developer-ruler-top-right { top: 0 !important; } 13 | #web-developer-ruler-bottom-left { cursor: sw-resize !important; } 14 | #web-developer-ruler-bottom-right { cursor: se-resize !important; } 15 | #web-developer-ruler-container { z-index: 2147483647 !important; } 16 | #web-developer-ruler-top-left { cursor: nw-resize !important; } 17 | #web-developer-ruler-top-right { cursor: ne-resize !important; } 18 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/external/toolbar.css: -------------------------------------------------------------------------------- 1 | .web-developer-toolbar 2 | { 3 | background: transparent !important; 4 | border: none !important; 5 | -webkit-box-shadow: none !important; 6 | -moz-box-shadow: none !important; 7 | box-shadow: none !important; 8 | clear: none !important; 9 | display: block !important; 10 | float: none !important; 11 | font-style: normal !important; 12 | font-variant: normal !important; 13 | font-weight: normal !important; 14 | height: auto !important; 15 | letter-spacing: 0 !important; 16 | line-height: 1 !important; 17 | margin: 0 !important; 18 | opacity: 1 !important; 19 | padding: 0 !important; 20 | position: static !important; 21 | text-align: left !important; 22 | text-decoration: none !important; 23 | text-shadow: none !important; 24 | text-transform: none !important; 25 | width: auto !important; 26 | } 27 | .web-developer-toolbar { border-top: 1px solid #c4c8cb !important; bottom: 0 !important; box-shadow: 0 0 3px rgba(0, 0, 0, 0.175) !important; height: 40px !important; left: 0 !important; outline-style: none !important; position: fixed !important; width: 100% !important; z-index: 2147483647 !important; } 28 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/internal/color-picker.css: -------------------------------------------------------------------------------- 1 | /* Color picker styles */ 2 | 3 | #web-developer-color-picker-hover-color, #web-developer-color-picker-selected-color { height: 30px; width: 30px; } 4 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/internal/line-guides.css: -------------------------------------------------------------------------------- 1 | #line-guide-information span { display: none; } 2 | .display-information #line-guide-information span { display: inline; } 3 | -------------------------------------------------------------------------------- /common/css/embedded/toolbar/internal/toolbar.css: -------------------------------------------------------------------------------- 1 | /* Toolbar styles */ 2 | 3 | h1 { font-size: 1rem; margin: 0; } 4 | h1 img { height: 1em; vertical-align: -0.125em; width: 1em; } 5 | .form-control { display: inline-block; width: 5em; } 6 | .form-label { margin: 0; } 7 | -------------------------------------------------------------------------------- /common/css/features/before.css: -------------------------------------------------------------------------------- 1 | *:before, [class^=web-developer], [class^=web-developer] * 2 | { 3 | background: transparent !important; 4 | border: none !important; 5 | -webkit-box-shadow: none !important; 6 | -moz-box-shadow: none !important; 7 | box-shadow: none !important; 8 | clear: none !important; 9 | float: none !important; 10 | font-style: normal !important; 11 | font-variant: normal !important; 12 | font-weight: normal !important; 13 | height: auto !important; 14 | letter-spacing: 0 !important; 15 | line-height: 1 !important; 16 | margin: 0 !important; 17 | opacity: 1 !important; 18 | padding: 0 !important; 19 | position: static !important; 20 | text-align: left !important; 21 | text-decoration: none !important; 22 | text-shadow: none !important; 23 | text-transform: none !important; 24 | width: auto !important; 25 | } 26 | 27 | *:before, [class^=web-developer] { background: #b94a48 !important; -webkit-border-radius: 3px !important; -moz-border-radius: 3px !important; border-radius: 3px !important; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3) !important; -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3) !important; box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3) !important; margin: 1px !important; padding: 1px !important; z-index: 2147483647 !important; } 28 | *:before, [class^=web-developer], [class^=web-developer] * { color: #fff !important; display: inline !important; font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; font-size: 13px !important; line-height: 15px !important; } 29 | -------------------------------------------------------------------------------- /common/css/features/css/use-border-box-model.css: -------------------------------------------------------------------------------- 1 | * { -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/forms/display-form-details.css: -------------------------------------------------------------------------------- 1 | form { outline: 1px solid #b94a48 !important; } 2 | 3 | form[action]:before { content: "
" !important; } 4 | form[action][autocomplete]:before { content: "" !important; } 5 | form[action][autocomplete][enctype]:before { content: "" !important; } 6 | form[action][autocomplete][enctype][id]:before { content: "" !important; } 7 | form[action][autocomplete][enctype][id][method]:before { content: "" !important; } 8 | form[action][autocomplete][enctype][id][method][name]:before { content: "" !important; } 9 | form[action][enctype]:before { content: "" !important; } 10 | form[action][enctype][id]:before { content: "" !important; } 11 | form[action][enctype][id][method]:before { content: "" !important; } 12 | form[action][enctype][id][method][name]:before { content: "" !important; } 13 | form[action][id]:before { content: "" !important; } 14 | form[action][id][method]:before { content: "" !important; } 15 | form[action][id][method][name]:before { content: "" !important; } 16 | form[action][method]:before { content: "" !important; } 17 | form[action][method][name]:before { content: "" !important; } 18 | form[action][name]:before { content: "" !important; } 19 | form[autocomplete]:before { content: "" !important; } 20 | form[autocomplete][enctype]:before { content: "" !important; } 21 | form[autocomplete][enctype][id]:before { content: "" !important; } 22 | form[autocomplete][enctype][id][method]:before { content: "" !important; } 23 | form[autocomplete][enctype][id][method][name]:before { content: "" !important; } 24 | form[autocomplete][id]:before { content: "" !important; } 25 | form[autocomplete][id][method]:before { content: "" !important; } 26 | form[autocomplete][id][method][name]:before { content: "" !important; } 27 | form[autocomplete][method]:before { content: "" !important; } 28 | form[autocomplete][method][name]:before { content: "" !important; } 29 | form[enctype]:before { content: "" !important; } 30 | form[enctype][id]:before { content: "" !important; } 31 | form[enctype][id][method]:before { content: "" !important; } 32 | form[enctype][id][method][name]:before { content: "" !important; } 33 | form[enctype][method]:before { content: "" !important; } 34 | form[enctype][method][name]:before { content: "" !important; } 35 | form[id]:before { content: "" !important; } 36 | form[id][method]:before { content: "" !important; } 37 | form[id][method][name]:before { content: "" !important; } 38 | form[id][name]:before { content: "" !important; } 39 | form[method]:before { content: "" !important; } 40 | form[method][name]:before { content: "" !important; } 41 | form[name]:before { content: "" !important; } 42 | -------------------------------------------------------------------------------- /common/css/features/forms/outline-form-fields-without-labels.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-form-fields-without-labels { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/display-image-dimensions.css: -------------------------------------------------------------------------------- 1 | img { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/hide-background-images.css: -------------------------------------------------------------------------------- 1 | *, *:after, *:before { background-image: none !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/hide-images.css: -------------------------------------------------------------------------------- 1 | *, *:after, *:before { background-image: none !important; } 2 | img { display: none !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/images/make-images-invisible.css: -------------------------------------------------------------------------------- 1 | * { background-image: url(/img/transparent.png) !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/outline-all-images.css: -------------------------------------------------------------------------------- 1 | img { outline: 1px solid #b94a48 !important; } 2 | input[type=image] { outline: 1px solid #468847 !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/images/outline-background-images.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-background-images { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/outline-images-with-adjusted-dimensions.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-images-with-adjusted-dimensions { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/outline-images-with-empty-alt-attributes.css: -------------------------------------------------------------------------------- 1 | img[alt=""] { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/images/outline-images-with-oversized-dimensions.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-images-with-oversized-dimensions { outline: 1px solid #b94a48 !important; } -------------------------------------------------------------------------------- /common/css/features/images/outline-images-without-alt-attributes.css: -------------------------------------------------------------------------------- 1 | img:not([alt]) { outline: 1px solid #b94a48 !important; } -------------------------------------------------------------------------------- /common/css/features/images/outline-images-without-dimensions.css: -------------------------------------------------------------------------------- 1 | img:not([height]):not([width]) { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/information/display-abbreviations.css: -------------------------------------------------------------------------------- 1 | abbr:before { content: 'abbr="' attr(title) '"' !important; } 2 | acronym:before { content: 'acronym="' attr(title) '"' !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/information/display-aria-roles.css: -------------------------------------------------------------------------------- 1 | *[role]:before { content: 'role="' attr(role) '"' !important; } -------------------------------------------------------------------------------- /common/css/features/information/display-div-dimensions.css: -------------------------------------------------------------------------------- 1 | div { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/information/display-div-order.css: -------------------------------------------------------------------------------- 1 | div { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/information/display-link-details.css: -------------------------------------------------------------------------------- 1 | a[href]:before { content: 'href="' attr(href) '"' !important; } 2 | a[href][rel]:before { content: 'href="' attr(href) '" rel="' attr(rel) '"' !important; } 3 | a[href][rel][target]:before { content: 'href="' attr(href) '" rel="' attr(rel) '" target="' attr(target) '"' !important; } 4 | a[href][target]:before { content: 'href="' attr(href) '" target="' attr(target) '"' !important; } 5 | a[rel]:before { content: 'rel="' attr(rel) '"' !important; } 6 | a[rel][target]:before { content: 'rel="' attr(rel) '" target="' attr(target) '"' !important; } 7 | a[target]:before { content: 'target="' attr(target) '"' !important; } -------------------------------------------------------------------------------- /common/css/features/information/display-object-information.css: -------------------------------------------------------------------------------- 1 | .web-developer-display-object-information { margin: 1px 0 5px 0 !important; padding: 5px !important; } 2 | .web-developer-display-object-information, .web-developer-display-object-information p { display: block !important; } 3 | .web-developer-display-object-information p { line-height: 13px !important; margin: 0 !important; } 4 | .web-developer-display-object-information .web-developer-object-information-param { background: transparent !important; border-style: none !important; margin-left: 20px !important; word-wrap: break-word !important; } 5 | -------------------------------------------------------------------------------- /common/css/features/information/display-table-information.css: -------------------------------------------------------------------------------- 1 | .web-developer-display-table-information, .web-developer-display-table-information p { display: block !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/information/display-topographic-information.css: -------------------------------------------------------------------------------- 1 | * { background-color: #000 !important; background-image: none !important; border-color: #000 !important; color: #fff !important; } 2 | * > * { background-color: #111 !important; border-color: #111 !important; } 3 | * > * > * { background-color: #222 !important; border-color: #222 !important; } 4 | * > * > * > * { background-color: #333 !important; border-color: #333 !important; } 5 | * > * > * > * > * { background-color: #444 !important; border-color: #444 !important; } 6 | * > * > * > * > * > * { background-color: #555 !important; border-color: #555 !important; } 7 | * > * > * > * > * > * > * { background-color: #666 !important; border-color: #666 !important; } 8 | * > * > * > * > * > * > * > * { background-color: #777 !important; border-color: #777 !important; } 9 | * > * > * > * > * > * > * > * > * { background-color: #888 !important; border-color: #888 !important; } 10 | * > * > * > * > * > * > * > * > * > * { background-color: #999 !important; border-color: #999 !important; } 11 | * > * > * > * > * > * > * > * > * > * > * { background-color: #aaa !important; border-color: #aaa !important; color: #000 !important; } 12 | * > * > * > * > * > * > * > * > * > * > * > * { background-color: #bbb !important; border-color: #bbb !important; color: #000 !important; } 13 | * > * > * > * > * > * > * > * > * > * > * > * > * { background-color: #ccc !important; border-color: #ccc !important; color: #000 !important; } 14 | * > * > * > * > * > * > * > * > * > * > * > * > * > * { background-color: #ddd !important; border-color: #ddd !important; color: #000 !important; } 15 | * > * > * > * > * > * > * > * > * > * > * > * > * > * > * { background-color: #eee !important; border-color: #eee !important; color: #000 !important; } 16 | * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * { background-color: #fff !important; border-color: #fff !important; color: #000 !important; } 17 | * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * { background-color: #f0f !important; border-color: #f0f !important; color: #000 !important; } -------------------------------------------------------------------------------- /common/css/features/miscellaneous/linearize-page.css: -------------------------------------------------------------------------------- 1 | * { float: none !important; position: static !important; } 2 | table, tbody, td, tfoot, th, thead, tr { display: block !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-block-level-elements-before.css: -------------------------------------------------------------------------------- 1 | address:before, blockquote:before, h1:before, h2:before, h3:before, h4:before, h5:before, h6:before, p:before, pre:before { background: #b94a48 !important;} 2 | dd:before, dl:before, dt:before, ol:before, ul:before { background: #468847 !important; } 3 | div:before, form:before, table:before { background: #3a87ad !important; } 4 | 5 | address:before { content: "
" !important; } 6 | blockquote:before { content: "
" !important; } 7 | div:before { content: "
" !important; } 8 | dl:before { content: "
" !important; } 9 | form:before { content: "" !important; } 10 | h1:before { content: "

" !important; } 11 | h2:before { content: "

" !important; } 12 | h3:before { content: "

" !important; } 13 | h4:before { content: "

" !important; } 14 | h5:before { content: "

" !important; } 15 | h6:before { content: "
" !important; } 16 | ol:before { content: "
    " !important; } 17 | p:before { content: "

    " !important; } 18 | pre:before { content: "

    " !important; }
    19 | table:before { content: "" !important; }
    20 | ul:before { content: "
      " !important; } 21 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-block-level-elements.css: -------------------------------------------------------------------------------- 1 | address, blockquote, h1, h2, h3, h4, h5, h6, p, pre { outline: 1px solid #b94a48 !important; } 2 | dd, dl, dt, ol, ul { outline: 1px solid #468847 !important; } 3 | div, form, table { outline: 1px solid #3a87ad !important; } 4 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-deprecated-elements-before.css: -------------------------------------------------------------------------------- 1 | applet:before, basefont:before, center:before, dir:before, font:before, isindex:before, menu:before, s:before, strike:before, u:before { outline: 1px solid #b94a48 !important; } 2 | 3 | applet:before { content: "" !important; } 4 | basefont:before { content: "" !important; } 5 | center:before { content: "
      " !important; } 6 | dir:before { content: "" !important; } 7 | font:before { content: "" !important; } 8 | isindex:before { content: "" !important; } 9 | menu:before { content: "" !important; } 10 | s:before { content: "" !important; } 11 | strike:before { content: "" !important; } 12 | u:before { content: "" !important; } 13 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-deprecated-elements.css: -------------------------------------------------------------------------------- 1 | applet, basefont, center, dir, font, isindex, menu, s, strike, u { outline: 1px solid #b94a48 !important; } 2 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-floated-elements.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-floated-elements { outline: 1px solid #b94a48 !important; } -------------------------------------------------------------------------------- /common/css/features/outline/outline-frames.css: -------------------------------------------------------------------------------- 1 | frame, frameset { border: 1px solid #b94a48 !important; } 2 | iframe:not([id^=web-developer]) { border: 1px solid #468847 !important; } -------------------------------------------------------------------------------- /common/css/features/outline/outline-headings-before.css: -------------------------------------------------------------------------------- 1 | h1:before, h4:before { background: #b94a48 !important; } 2 | h2:before, h5:before { background: #468847 !important; } 3 | h3:before, h6:before { background: #3a87ad !important; } 4 | 5 | h1:before { content: "

      " !important; } 6 | h2:before { content: "

      " !important; } 7 | h3:before { content: "

      " !important; } 8 | h4:before { content: "

      " !important; } 9 | h5:before { content: "

      " !important; } 10 | h6:before { content: "
      " !important; } 11 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-headings.css: -------------------------------------------------------------------------------- 1 | h1, h4 { outline: 1px solid #b94a48 !important; } 2 | h2, h5 { outline: 1px solid #468847 !important; } 3 | h3, h6 { outline: 1px solid #3a87ad !important; } 4 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-non-secure-elements.css: -------------------------------------------------------------------------------- 1 | img[src^=http\:], object[codebase^=http\:], object[src^=http\:] { outline: 1px solid #b94a48 !important; } 2 | iframe[src^=http\:] { border: 1px solid #b94a48 !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-positioned-elements.css: -------------------------------------------------------------------------------- 1 | .web-developer-outline-absolute-positioned-elements { outline: 1px solid #b94a48 !important; } 2 | .web-developer-outline-fixed-positioned-elements { outline: 1px solid #468847 !important; } 3 | .web-developer-outline-relative-positioned-elements { outline: 1px solid #3a87ad !important; } 4 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-table-captions.css: -------------------------------------------------------------------------------- 1 | caption { border: 1px solid #b94a48 !important; } 2 | table { border-collapse: separate !important; } 3 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-table-cells-before.css: -------------------------------------------------------------------------------- 1 | td:before, th:before { background: #b94a48 !important; } 2 | table table td:before, table table th:before { background: #468847 !important; } 3 | table table table td:before, table table table th:before { background: #3a87ad !important; } 4 | table table table table td:before, table table table table th:before { background: #b94a48 !important; } 5 | table table table table table td:before, table table table table table th:before { background: #468847 !important; } 6 | table table table table table table td:before, table table table table table table th:before { background: #3a87ad !important; } 7 | 8 | td:before { content: "
    " !important; } 9 | th:before { content: "" !important; } 10 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-table-cells.css: -------------------------------------------------------------------------------- 1 | table { border-collapse: separate !important; } 2 | td, th { border: 1px solid #b94a48 !important; } 3 | table table td, table table th { border-color: #468847 !important; } 4 | table table table td, table table table th { border-color: #3a87ad !important; } 5 | table table table table td, table table table table th { border-color: #b94a48 !important; } 6 | table table table table table td, table table table table table th { border-color: #468847 !important; } 7 | table table table table table table td, table table table table table table th { border-color: #3a87ad !important; } 8 | -------------------------------------------------------------------------------- /common/css/features/outline/outline-tables.css: -------------------------------------------------------------------------------- 1 | table { border: 1px solid #b94a48 !important; border-collapse: separate !important; } 2 | table table { border-color: #468847 !important; } 3 | table table table { border-color: #3a87ad !important; } 4 | table table table table { border-color: #b94a48 !important; } 5 | table table table table table { border-color: #468847 !important; } 6 | table table table table table table { border-color: #3a87ad !important; } 7 | -------------------------------------------------------------------------------- /common/css/generated/common.css: -------------------------------------------------------------------------------- 1 | /* Generated styles */ 2 | 3 | .alert .bi, .btn .bi { vertical-align: -0.125em; } 4 | .bi { fill: currentColor; height: 1em; width: 1em; } 5 | 6 | /* Form styles */ 7 | 8 | .form-check-input { margin-top: 0.3em; } 9 | .input-group-text { font-size: 0.875rem; line-height: 1em; } 10 | 11 | /* Header styles */ 12 | 13 | h3 .bi { cursor: pointer; height: 16px; vertical-align: 2px; width: 16px; } 14 | h3 .icon-expand { display: none; } 15 | .collapsed .icon-collapse { display: none; } 16 | .collapsed .icon-expand { display: inline; } 17 | 18 | /* Sidebar styles */ 19 | 20 | .donate-icon { bottom: -1em; color: #a3cfbb; fill: currentColor; height: 5em; right: -1em; width: 5em; } 21 | 22 | /* Syntax highlighting styles */ 23 | 24 | .CodeMirror { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.875em; height: auto; } 25 | -------------------------------------------------------------------------------- /common/css/generated/view-color-information.css: -------------------------------------------------------------------------------- 1 | /* View color information styles */ 2 | 3 | .web-developer-color { height: 100px; width: 100px; } 4 | -------------------------------------------------------------------------------- /common/css/generated/view-document-outline.css: -------------------------------------------------------------------------------- 1 | /* View document outline styles */ 2 | 3 | .web-developer-document > h2 { margin-left: 6rem; } 4 | .web-developer-document > h3 { margin-left: 11rem; } 5 | .web-developer-document > h4 { margin-left: 16rem; } 6 | .web-developer-document > h5 { margin-left: 20rem; } 7 | .web-developer-document > h6 { margin-left: 24rem; } 8 | -------------------------------------------------------------------------------- /common/css/generated/view-javascript.css: -------------------------------------------------------------------------------- 1 | /* View JavaScript styles */ 2 | 3 | .undo-beautify, .web-developer-beautified .beautify, .web-developer-original { display: none; } 4 | .web-developer-beautified .undo-beautify { display: inline;} 5 | -------------------------------------------------------------------------------- /common/css/generated/view-responsive-layouts.css: -------------------------------------------------------------------------------- 1 | /* Responsive layouts styles */ 2 | 3 | iframe { position: relative; z-index: 2000; } 4 | 5 | -------------------------------------------------------------------------------- /common/css/options/options.css: -------------------------------------------------------------------------------- 1 | /* Options styles */ 2 | 3 | .bi { fill: currentColor; height: 1em; vertical-align: -0.125em; width: 1em; } 4 | .nav { font-size: 0.875rem; } 5 | .nav-link { padding-left: 0.5rem; padding-right: 0.5rem; } 6 | .single .btn-danger { display: none; } 7 | 8 | /* Sidebar styles */ 9 | 10 | .donate-icon { bottom: -1em; color: #a3cfbb; fill: currentColor; height: 5em; right: -1em; width: 5em; } 11 | 12 | /* Drag and drop styles */ 13 | 14 | .draggable { cursor: move; user-select: none; } 15 | .dragging { opacity: 0.25; } 16 | -------------------------------------------------------------------------------- /common/css/options/syntax-highlight.css: -------------------------------------------------------------------------------- 1 | html { overflow: hidden; } 2 | #web-developer-syntax-highlight-example { margin-bottom: 0; } 3 | #web-developer-syntax-highlight-example, .CodeMirror { height: 400px; } 4 | .CodeMirror { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.875em; } 5 | -------------------------------------------------------------------------------- /common/css/overlay/overlay.css: -------------------------------------------------------------------------------- 1 | /* Overlay styles */ 2 | 3 | body, html { overflow: hidden; width: 800px; } 4 | body::-webkit-scrollbar, html::-webkit-scrollbar { display: none; } 5 | .bi { fill: currentColor; height: 1em; width: 1em; } 6 | .icon-link { gap: 0.25rem; } 7 | 8 | /* Toolbar styles */ 9 | 10 | .nav { font-size: 0.75rem; } 11 | .nav-item .bi { height: 14px; width: 14px; } 12 | .nav-link { padding-left: 0.25rem; padding-right: 0.25rem; } 13 | .overlay-text .bi { display: none; } 14 | 15 | /* Menu styles */ 16 | 17 | .tab-content { font-size: 0.8125rem; } 18 | .tab-content *::selection { background-color: transparent; } 19 | .tab-content a .text-danger { display: none;} 20 | .tab-content a.active:hover .text-danger { display: block;} 21 | .tab-content a.active:hover .text-success { display: none;} 22 | .tab-pane .active .bi { visibility: visible; } 23 | .tab-pane .bi { visibility: hidden; } 24 | 25 | /* Form styles */ 26 | 27 | legend { font-size: 1.25rem; } 28 | #add-cookie-dialog { width: 500px; } 29 | #resize-window-dialog { width: 400px; } 30 | .btn .bi { vertical-align: -0.125em; } 31 | .form-check-input { margin-top: 0.3em; } 32 | .input-group-text { font-size: 0.875rem; line-height: 1em; } 33 | 34 | /* Notification styles */ 35 | 36 | #notification .bi { display: none; } 37 | #notification.alert-danger .icon-danger, #notification.alert-info .icon-info, #notification.alert-success .icon-success, #notification.alert-warning .icon-danger { display: inline; } 38 | -------------------------------------------------------------------------------- /common/gulp/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var dateFormat = require("dateformat"); 4 | var filterProperties = require("gulp-filter-java-properties"); 5 | var fs = require("fs"); 6 | var gulp = require("gulp"); 7 | var lazypipe = require("lazypipe"); 8 | var log = require("fancy-log"); 9 | var plugins = require("gulp-load-plugins")(); 10 | var runSequence = require("run-sequence"); 11 | 12 | global.errorHandler = function(error, emitEnd, task) 13 | { 14 | log.error(error.plugin + " error: " + error.message); 15 | log.error(error); 16 | 17 | // If should emit end 18 | if(emitEnd) 19 | { 20 | task.emit("end"); 21 | } 22 | else 23 | { 24 | process.exit(1); 25 | } 26 | }; 27 | 28 | global.filterProperties = function(browserName) 29 | { 30 | return lazypipe() 31 | .pipe(filterProperties, { propertiesPath: "build/" + browserName + ".properties" }) 32 | .pipe(filterProperties, { propertiesPath: "common/config/config.properties" }) 33 | .pipe(filterProperties, { propertiesPath: browserName + "/config/config.properties" }); 34 | }; 35 | 36 | global.initializeBuild = function(browserName, callback) 37 | { 38 | fs.writeFileSync("build/" + browserName + ".properties", "browser=" + browserName + "\nbuild.date=" + dateFormat(new Date(), "mmmm d, yyyy")); 39 | callback(); 40 | }; 41 | 42 | gulp.task("lint-gulp", function() 43 | { 44 | return gulp.src(["gulpfile.js", "common/gulp/*.js", "chrome/gulp/*.js", "edge/gulp/*.js", "firefox/gulp/*.js", "opera/gulp/*.js"]) 45 | .pipe(plugins.eslint()) 46 | .pipe(plugins.eslint.format()); 47 | }); 48 | 49 | gulp.task("all", function(callback) { runSequence("clean", "build", "package", "lint", callback); }); 50 | gulp.task("build", ["build-chrome", "build-edge", "build-firefox", "build-opera"]); 51 | gulp.task("clean", ["clean-chrome", "clean-edge", "clean-firefox", "clean-opera"]); 52 | gulp.task("default", ["all"]); 53 | gulp.task("package", ["package-chrome", "package-edge", "package-firefox", "package-opera"]); 54 | -------------------------------------------------------------------------------- /common/gulp/img.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | global.imageminConfiguration = { interlaced: true, multipass: true, optimizationLevel: 7, progressive: true, svgoPlugins: [{ removeViewBox: false }] }; 4 | 5 | var gulp = require("gulp"); 6 | var plugins = require("gulp-load-plugins")(); 7 | 8 | gulp.task("minify-images", function() 9 | { 10 | return gulp.src("images/**/*.{gif,jpg,png}") 11 | .pipe(plugins.imagemin(global.imageminConfiguration).on("error", global.errorHandler)) 12 | .pipe(gulp.dest("images")); 13 | }); 14 | 15 | gulp.task("images", ["minify-images"]); 16 | -------------------------------------------------------------------------------- /common/gulp/lint.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var exec = require("child_process"); 4 | var gulp = require("gulp"); 5 | var plugins = require("gulp-load-plugins")(); 6 | 7 | gulp.task("lint-js", function() 8 | { 9 | return gulp.src(["common/**/*.js", "!common/lib/**/*.js", "chrome/**/*.js"]) 10 | .pipe(plugins.eslint()) 11 | .pipe(plugins.eslint.format()); 12 | }); 13 | 14 | gulp.task("lint-css", function() 15 | { 16 | return gulp.src(["common/**/*.css", "!common/lib/**/*.css", "firefox/**/*.css", "opera/**/*.css"]) 17 | .pipe(plugins.plumber({ errorHandler: function(error) { global.errorHandler(error, true, this); } })) 18 | .pipe(plugins.csslint(".csslintrc.json")) 19 | .pipe(plugins.csslint.formatter("compact")); 20 | }); 21 | 22 | gulp.task("lint-web-extension", function(callback) 23 | { 24 | process.chdir("build/firefox"); 25 | exec.exec("../../node_modules/web-ext/bin/web-ext lint -w", function(error, output, errors) 26 | { 27 | console.log(output); // eslint-disable-line no-console 28 | console.log(errors); // eslint-disable-line no-console 29 | callback(error); 30 | }); 31 | process.chdir("../.."); 32 | }); 33 | 34 | gulp.task("lint", ["lint-js", "lint-css"]); 35 | -------------------------------------------------------------------------------- /common/gulp/package.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var gulp = require("gulp"); 4 | var plugins = require("gulp-load-plugins")(); 5 | 6 | global.packageTask = function(browserName, packageName) 7 | { 8 | return gulp.src(["build/" + browserName + "/**", "license.txt"]) 9 | .pipe(plugins.zip(packageName)) 10 | .pipe(gulp.dest("build")); 11 | }; 12 | -------------------------------------------------------------------------------- /common/html/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @name@ 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 | 18 |

    19 |

    20 | 21 |
    22 |
    23 |

    24 |

    @author@

    25 |
    26 | 27 |
    28 |

    29 |

    @version@

    30 |
    31 | 32 |
    33 |

    34 |

    @build.date@

    35 |
    36 |
    37 | 38 | 39 | 40 |
    41 |
    42 |
    43 |
    44 |

    45 | 46 |
    47 | 48 |
    49 |
    50 |
    51 |
    52 |
    53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /common/html/generated/find-broken-images.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 77 | 78 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /common/html/generated/find-duplicate-ids.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 77 | 78 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /common/html/generated/validate-local-css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 |

    @name@

    17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /common/html/generated/validate-local-html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 |

    @name@

    17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 | 25 | 26 |
    27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /common/html/generated/view-anchor-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 77 | 78 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /common/html/generated/view-color-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 |
    26 |
    27 |
    28 |

    @name@

    29 | 30 |
    31 |
    32 |
    33 |
    34 |
    35 | 53 |
    54 |
    55 |
    56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 78 | 79 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /common/html/generated/view-css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 41 | 42 |
    43 |
    44 |
    45 |

    @name@

    46 | 47 |
    48 |
    49 |
    50 |
    51 |
    52 | 70 |
    71 |
    72 |
    73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /common/html/generated/view-document-outline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 |
    26 |
    27 |
    28 |

    @name@

    29 | 30 |
    31 |
    32 |
    33 |
    34 |
    35 | 53 |
    54 |
    55 |
    56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /common/html/generated/view-form-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 78 | 79 | 82 | 83 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /common/html/generated/view-image-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /common/html/generated/view-javascript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 43 | 44 |
    45 |
    46 |
    47 |

    @name@

    48 | 49 |
    50 |
    51 |
    52 |
    53 |
    54 | 72 |
    73 |
    74 |
    75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /common/html/generated/view-link-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 77 | 78 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /common/html/generated/view-meta-tag-information.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 52 |
    53 |
    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 77 | 78 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /common/html/generated/view-response-headers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    @name@

    28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | 43 |
    44 |
    45 |
    46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /common/html/generated/view-responsive-layouts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 32 | 33 |
    34 |
    35 |
    36 |

    @name@

    37 | 38 |
    39 |
    40 |
    41 |
    42 |
    43 | 75 |
    76 |
    77 |
    78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /common/html/options/syntax-highlight.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @name@ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    
    20 |   
    41 | 
    42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /common/img/logos/color/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/128.png -------------------------------------------------------------------------------- /common/img/logos/color/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/16.png -------------------------------------------------------------------------------- /common/img/logos/color/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/256.png -------------------------------------------------------------------------------- /common/img/logos/color/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/32.png -------------------------------------------------------------------------------- /common/img/logos/color/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/48.png -------------------------------------------------------------------------------- /common/img/logos/color/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/color/64.png -------------------------------------------------------------------------------- /common/img/logos/gray/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/128.png -------------------------------------------------------------------------------- /common/img/logos/gray/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/16.png -------------------------------------------------------------------------------- /common/img/logos/gray/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/256.png -------------------------------------------------------------------------------- /common/img/logos/gray/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/32.png -------------------------------------------------------------------------------- /common/img/logos/gray/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/48.png -------------------------------------------------------------------------------- /common/img/logos/gray/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/gray/64.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/128.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/16.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/256.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/32.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/48.png -------------------------------------------------------------------------------- /common/img/logos/monochrome/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/logos/monochrome/64.png -------------------------------------------------------------------------------- /common/img/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrispederick/web-developer/ced7002df61163a0ab5671ec0543fce7f6b87935/common/img/transparent.png -------------------------------------------------------------------------------- /common/js/about/about.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.About = WebDeveloper.About || {}; 4 | 5 | // Initializes the about page 6 | WebDeveloper.About.initialize = function() 7 | { 8 | var extensionName = WebDeveloper.Locales.getString("extensionName"); 9 | 10 | document.getElementById("author").append(WebDeveloper.Locales.getString("author")); 11 | document.getElementById("build-date").append(WebDeveloper.Locales.getString("buildDate")); 12 | document.getElementById("description").append(WebDeveloper.Locales.getString("extensionDescription")); 13 | document.getElementById("donate-link").prepend(WebDeveloper.Locales.getString("donate")); 14 | document.getElementById("name").append(extensionName); 15 | document.getElementById("version").append(WebDeveloper.Locales.getString("version")); 16 | document.getElementById("website").prepend(WebDeveloper.Locales.getString("visitTheWebsite")); 17 | document.querySelector("title").replaceChildren(WebDeveloper.Locales.getString("about") + " " + extensionName); 18 | document.querySelector(".card-text").insertAdjacentHTML("beforeend", DOMPurify.sanitize('' + extensionName + " " + WebDeveloper.Locales.getString("donationCard"))); 19 | }; 20 | 21 | // If the document is still loading 22 | if(document.readyState === "loading") 23 | { 24 | document.addEventListener("DOMContentLoaded", WebDeveloper.About.initialize); 25 | } 26 | else 27 | { 28 | WebDeveloper.About.initialize(); 29 | } 30 | -------------------------------------------------------------------------------- /common/js/background/background.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Background = WebDeveloper.Background || {}; 4 | WebDeveloper.Background.maximumCaptureVisibleTabCallsPerSecond = 1000; 5 | 6 | // Gets the content from a URL 7 | WebDeveloper.Background.getURLContent = async function(url, errorMessage) 8 | { 9 | return new Promise((resolve) => 10 | { 11 | var urlContent = fetch(url); 12 | 13 | // Get the response 14 | urlContent.then((response) => 15 | { 16 | // If the response is okay 17 | if(response.ok) 18 | { 19 | // Get the response text 20 | response.text().then((text) => 21 | { 22 | resolve({ content: text, url: url }); 23 | }); 24 | } 25 | else 26 | { 27 | resolve({ content: errorMessage, url: url }); 28 | } 29 | }); 30 | }); 31 | }; 32 | 33 | // Gets the content from a set of URLs 34 | WebDeveloper.Background.getURLContents = async function(urls, errorMessage, sendResponse) 35 | { 36 | var promises = []; 37 | var results = null; 38 | 39 | // Loop through the urls 40 | for(var i = 0, l = urls.length; i < l; i++) 41 | { 42 | promises.push(WebDeveloper.Background.getURLContent(urls[i], errorMessage)); 43 | } 44 | 45 | results = await Promise.all(promises); 46 | 47 | sendResponse(results); 48 | }; 49 | 50 | // Gets the visible tab 51 | WebDeveloper.Background.getVisibleTab = function(sendResponse) 52 | { 53 | chrome.tabs.captureVisibleTab(null, null, function(dataUrl) 54 | { 55 | sendResponse({ dataUrl: dataUrl, maximumPerSecond: WebDeveloper.Background.maximumCaptureVisibleTabCallsPerSecond }); 56 | }); 57 | }; 58 | 59 | // Handles any background messages 60 | WebDeveloper.Background.message = function(message, sender, sendResponse) 61 | { 62 | // If the message type is to get a storage item 63 | if(message.type == "get-storage-item") 64 | { 65 | WebDeveloper.Storage.getItem(message.item, function(item) 66 | { 67 | sendResponse({ value: item }); 68 | }); 69 | } 70 | else if(message.type == "get-url-contents") 71 | { 72 | WebDeveloper.Background.getURLContents(message.urls, message.errorMessage, sendResponse); 73 | } 74 | else if(message.type == "get-visible-tab") 75 | { 76 | WebDeveloper.Background.getVisibleTab(sendResponse); 77 | } 78 | else if(message.type == "set-storage-item") 79 | { 80 | WebDeveloper.Storage.setItem(message.item, message.value); 81 | 82 | // No response required 83 | sendResponse({}); 84 | } 85 | 86 | return true; 87 | }; 88 | 89 | // If the maximum capture visible tab calls per second is set 90 | if(chrome.tabs.MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND) 91 | { 92 | WebDeveloper.Background.maximumCaptureVisibleTabCallsPerSecond = chrome.tabs.MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND; 93 | } 94 | 95 | chrome.runtime.onMessage.addListener(WebDeveloper.Background.message); 96 | -------------------------------------------------------------------------------- /common/js/common/locales.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Locales = WebDeveloper.Locales || {}; 4 | 5 | // Returns a formatted string from the locale 6 | WebDeveloper.Locales.getFormattedString = function(name, parameters) 7 | { 8 | return chrome.i18n.getMessage(name, parameters); 9 | }; 10 | 11 | // Returns a string from the locale 12 | WebDeveloper.Locales.getString = function(name) 13 | { 14 | return chrome.i18n.getMessage(name); 15 | }; 16 | 17 | // Sets up the generated locale 18 | WebDeveloper.Locales.setupGeneratedLocale = function() 19 | { 20 | var locale = {}; 21 | 22 | locale.collapseAll = WebDeveloper.Locales.getString("collapseAll"); 23 | locale.documents = WebDeveloper.Locales.getString("documents"); 24 | locale.donate = WebDeveloper.Locales.getString("donate"); 25 | locale.donationCard = WebDeveloper.Locales.getString("donationCard"); 26 | locale.expandAll = WebDeveloper.Locales.getString("expandAll"); 27 | locale.extensionName = WebDeveloper.Locales.getString("extensionName"); 28 | locale.from = WebDeveloper.Locales.getString("from"); 29 | 30 | return locale; 31 | }; 32 | -------------------------------------------------------------------------------- /common/js/features/common.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Common = WebDeveloper.Common || {}; 4 | 5 | // Displays a notification 6 | WebDeveloper.Common.displayNotification = function(message, parameters) 7 | { 8 | chrome.runtime.sendMessage({ message: message, parameters: parameters, type: "display-notification" }); 9 | }; 10 | -------------------------------------------------------------------------------- /common/js/features/miscellaneous.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Miscellaneous = WebDeveloper.Miscellaneous || {}; 4 | 5 | // Displays all hidden elements 6 | WebDeveloper.Miscellaneous.displayHiddenElements = function(documents) 7 | { 8 | var contentDocument = null; 9 | var displayedElements = 0; 10 | var inputElements = null; 11 | var node = null; 12 | var treeWalker = null; 13 | 14 | // Loop through the documents 15 | for(var i = 0, l = documents.length; i < l; i++) 16 | { 17 | contentDocument = documents[i]; 18 | inputElements = contentDocument.querySelectorAll("input[type=hidden]"); 19 | treeWalker = contentDocument.createTreeWalker(WebDeveloper.Common.getDocumentBodyElement(contentDocument), NodeFilter.SHOW_ELEMENT, WebDeveloper.Miscellaneous.hiddenNodeFilter, false); 20 | 21 | // Loop through the input elements 22 | for(var j = 0, m = inputElements.length; j < m; j++) 23 | { 24 | inputElements[j].removeAttribute("type"); 25 | 26 | displayedElements++; 27 | } 28 | 29 | // While the tree walker has more nodes 30 | while((node = treeWalker.nextNode()) !== null) 31 | { 32 | node.style.setProperty("display", "revert", "important"); 33 | 34 | displayedElements++; 35 | } 36 | 37 | treeWalker = contentDocument.createTreeWalker(WebDeveloper.Common.getDocumentBodyElement(contentDocument), NodeFilter.SHOW_ELEMENT, WebDeveloper.Miscellaneous.invisibleNodeFilter, false); 38 | 39 | // While the tree walker has more nodes 40 | while((node = treeWalker.nextNode()) !== null) 41 | { 42 | node.style.setProperty("visibility", "visible", "important"); 43 | 44 | displayedElements++; 45 | } 46 | } 47 | 48 | // If one element was displayed 49 | if(displayedElements == 1) 50 | { 51 | WebDeveloper.Common.displayNotification("displayHiddenElementsSingleResult"); 52 | } 53 | else 54 | { 55 | WebDeveloper.Common.displayNotification("displayHiddenElementsMultipleResult", [displayedElements]); 56 | } 57 | }; 58 | 59 | // Filter for the hidden node tree walker 60 | WebDeveloper.Miscellaneous.hiddenNodeFilter = function(node) 61 | { 62 | // If the node is set and is not a Web Developer node 63 | if(node && (!node.hasAttribute("id") || node.getAttribute("id").indexOf("web-developer") !== 0)) 64 | { 65 | var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node, null); 66 | 67 | // If the computed style is set 68 | if(computedStyle) 69 | { 70 | var display = WebDeveloper.Common.getPropertyCSSValue(computedStyle, "display"); 71 | var tagName = node.tagName; 72 | 73 | // If this element has a display and tag name, is not a script or style and the display is set to none 74 | if(display && tagName && tagName.toLowerCase() != "script" && tagName.toLowerCase() != "style" && WebDeveloper.Common.getCSSText(display) == "none") 75 | { 76 | return NodeFilter.FILTER_ACCEPT; 77 | } 78 | } 79 | } 80 | 81 | return NodeFilter.FILTER_SKIP; 82 | }; 83 | 84 | // Filter for the invisible node tree walker 85 | WebDeveloper.Miscellaneous.invisibleNodeFilter = function(node) 86 | { 87 | // If the node is set and is not a Web Developer node 88 | if(node && (!node.hasAttribute("id") || node.getAttribute("id").indexOf("web-developer") !== 0)) 89 | { 90 | var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node, null); 91 | 92 | // If the computed style is set 93 | if(computedStyle) 94 | { 95 | var visibility = WebDeveloper.Common.getPropertyCSSValue(computedStyle, "visibility"); 96 | 97 | // If this element has a visibility and the visibility is set to collapse or hidden 98 | if(visibility && (WebDeveloper.Common.getCSSText(visibility) == "collapse" || WebDeveloper.Common.getCSSText(visibility) == "hidden")) 99 | { 100 | return NodeFilter.FILTER_ACCEPT; 101 | } 102 | } 103 | } 104 | 105 | return NodeFilter.FILTER_SKIP; 106 | }; 107 | 108 | // Linearizes the page 109 | WebDeveloper.Miscellaneous.linearizePage = function(documents) 110 | { 111 | // Loop through the documents 112 | for(var i = 0, l = documents.length; i < l; i++) 113 | { 114 | WebDeveloper.Common.toggleStyleSheet("/features/css/miscellaneous/linearize-page.css", "web-developer-linearize-page", documents[i], false); 115 | } 116 | }; 117 | 118 | // Makes all frames resizable 119 | WebDeveloper.Miscellaneous.makeFramesResizable = function(documents) 120 | { 121 | var frame = null; 122 | var frames = null; 123 | var resizableFrames = 0; 124 | 125 | // Loop through the documents 126 | for(var i = 0, l = documents.length; i < l; i++) 127 | { 128 | frames = documents[i].getElementsByTagName("frame"); 129 | 130 | // Loop through the frames 131 | for(var j = 0, m = frames.length; j < m; j++) 132 | { 133 | frame = frames[j]; 134 | 135 | // If the frame has a no resize attribute 136 | if(frame.hasAttribute("noresize")) 137 | { 138 | frame.removeAttribute("noresize"); 139 | 140 | resizableFrames++; 141 | } 142 | } 143 | } 144 | 145 | // If one frame was made resizable 146 | if(resizableFrames == 1) 147 | { 148 | WebDeveloper.Common.displayNotification("makeFramesResizableSingleResult"); 149 | } 150 | else 151 | { 152 | WebDeveloper.Common.displayNotification("makeFramesResizableMultipleResult", [resizableFrames]); 153 | } 154 | }; 155 | -------------------------------------------------------------------------------- /common/js/generated/find-broken-images.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var brokenImages = locale.brokenImages; 9 | var brokenImageTemplate = document.getElementById("broken-image").innerHTML; 10 | var content = document.getElementById("content"); 11 | var contentDocument = null; 12 | var documents = data.documents; 13 | var imagesLength = null; 14 | var list = null; 15 | 16 | WebDeveloper.Generated.emptyContent(); 17 | WebDeveloper.Generated.initializeHeader(brokenImages, data, locale); 18 | WebDeveloper.Generated.initializeSidebar(locale); 19 | Mustache.parse(brokenImageTemplate); 20 | 21 | // Loop through the documents 22 | for(var i = 0, l = documents.length; i < l; i++) 23 | { 24 | contentDocument = documents[i]; 25 | imagesLength = contentDocument.images.length; 26 | 27 | WebDeveloper.Generated.addDocument(contentDocument.url, i, locale.brokenImages, ""); 28 | 29 | // If there are broken images 30 | if(imagesLength > 0) 31 | { 32 | list = document.createElement("ol"); 33 | 34 | // Loop through the images 35 | for(var j = 0, m = imagesLength; j < m; j++) 36 | { 37 | WebDeveloper.Generated.testForBrokenImage(contentDocument.images[j], brokenImageTemplate, list); 38 | } 39 | 40 | content.appendChild(list); 41 | } 42 | 43 | WebDeveloper.Generated.addSeparator(); 44 | } 45 | 46 | WebDeveloper.Generated.initializeCommonElements(); 47 | }; 48 | 49 | // Tests for a broken image 50 | WebDeveloper.Generated.testForBrokenImage = function(src, brokenImageTemplate, list) 51 | { 52 | var image = new Image(); 53 | 54 | // Add a load event listener to the image 55 | image.onerror = function() 56 | { 57 | list.insertAdjacentHTML("beforeend", DOMPurify.sanitize(Mustache.render(brokenImageTemplate, { src: image.src }), { ADD_ATTR: ["target"] })); 58 | }; 59 | 60 | image.src = src; 61 | }; 62 | -------------------------------------------------------------------------------- /common/js/generated/find-duplicate-ids.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var content = document.getElementById("content"); 9 | var contentDocument = null; 10 | var documents = data.documents; 11 | var duplicateIds = locale.duplicateIds; 12 | var duplicateIdTemplate = document.getElementById("duplicate-id").innerHTML; 13 | var idDescription = null; 14 | var ids = null; 15 | var idsLength = null; 16 | var list = null; 17 | var url = null; 18 | 19 | WebDeveloper.Generated.emptyContent(); 20 | WebDeveloper.Generated.initializeHeader(duplicateIds, data, locale); 21 | WebDeveloper.Generated.initializeSidebar(locale); 22 | Mustache.parse(duplicateIdTemplate); 23 | 24 | // Loop through the documents 25 | for(var i = 0, l = documents.length; i < l; i++) 26 | { 27 | contentDocument = documents[i]; 28 | idDescription = duplicateIds.toLowerCase(); 29 | ids = contentDocument.ids; 30 | idsLength = ids.length; 31 | url = contentDocument.url; 32 | 33 | // If there is only one image 34 | if(idsLength == 1) 35 | { 36 | idDescription = locale.duplicateId; 37 | } 38 | 39 | WebDeveloper.Generated.addDocument(contentDocument.url, i, idDescription, idsLength, true); 40 | 41 | // If there are duplicate ids 42 | if(idsLength > 0) 43 | { 44 | list = document.createElement("ol"); 45 | 46 | // Loop through the ids 47 | for(var j = 0; j < idsLength; j++) 48 | { 49 | list.insertAdjacentHTML("beforeend", DOMPurify.sanitize(Mustache.render(duplicateIdTemplate, { id: ids[j], url: url }), { ADD_ATTR: ["target"] })); 50 | } 51 | 52 | content.appendChild(list); 53 | } 54 | 55 | WebDeveloper.Generated.addSeparator(); 56 | } 57 | 58 | WebDeveloper.Generated.initializeCommonElements(); 59 | }; 60 | -------------------------------------------------------------------------------- /common/js/generated/validate-local.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Validation = WebDeveloper.Validation || {}; 4 | 5 | // Initializes the validation 6 | WebDeveloper.Validation.initialize = function(data) 7 | { 8 | document.getElementById("form-content").value = data; 9 | 10 | document.getElementById("form").submit(); 11 | }; 12 | -------------------------------------------------------------------------------- /common/js/generated/view-anchor-information.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var anchorDescription = null; 9 | var anchorInformation = locale.anchorInformation; 10 | var anchors = null; 11 | var anchorsLength = null; 12 | var anchorTemplate = document.getElementById("anchor").innerHTML; 13 | var content = document.getElementById("content"); 14 | var contentDocument = null; 15 | var documents = data.documents; 16 | var list = null; 17 | var url = null; 18 | 19 | WebDeveloper.Generated.emptyContent(); 20 | WebDeveloper.Generated.initializeHeader(anchorInformation, data, locale); 21 | WebDeveloper.Generated.initializeSidebar(locale); 22 | Mustache.parse(anchorTemplate); 23 | 24 | // Loop through the documents 25 | for(var i = 0, l = documents.length; i < l; i++) 26 | { 27 | anchorDescription = locale.anchors.toLowerCase(); 28 | contentDocument = documents[i]; 29 | anchors = contentDocument.anchors; 30 | anchorsLength = anchors.length; 31 | url = contentDocument.url; 32 | 33 | // If there is only one anchor 34 | if(anchorsLength == 1) 35 | { 36 | anchorDescription = locale.anchor.toLowerCase(); 37 | } 38 | 39 | WebDeveloper.Generated.addDocument(url, i, anchorDescription, anchorsLength, true); 40 | 41 | // If there are anchors 42 | if(anchorsLength > 0) 43 | { 44 | list = document.createElement("ol"); 45 | 46 | // Loop through the anchors 47 | for(var j = 0; j < anchorsLength; j++) 48 | { 49 | list.insertAdjacentHTML("beforeend", DOMPurify.sanitize(Mustache.render(anchorTemplate, { anchor: anchors[j], url: url }))); 50 | } 51 | 52 | content.appendChild(list); 53 | } 54 | 55 | WebDeveloper.Generated.addSeparator(); 56 | } 57 | 58 | WebDeveloper.Generated.initializeCommonElements(); 59 | }; 60 | -------------------------------------------------------------------------------- /common/js/generated/view-color-information.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var colorDescription = null; 9 | var colorInformation = locale.colorInformation; 10 | var colorsLength = null; 11 | var colorsTemplate = document.getElementById("colors").innerHTML; 12 | var container = null; 13 | var content = document.getElementById("content"); 14 | var contentDocument = null; 15 | var documents = data.documents; 16 | 17 | WebDeveloper.Generated.emptyContent(); 18 | WebDeveloper.Generated.initializeHeader(colorInformation, data, locale); 19 | WebDeveloper.Generated.initializeSidebar(locale); 20 | Mustache.parse(colorsTemplate); 21 | 22 | // Loop through the documents 23 | for(var i = 0, l = documents.length; i < l; i++) 24 | { 25 | colorDescription = locale.colors.toLowerCase(); 26 | contentDocument = documents[i]; 27 | colorsLength = contentDocument.colors.length; 28 | 29 | // If there is only one anchor 30 | if(colorsLength == 1) 31 | { 32 | colorDescription = locale.color.toLowerCase(); 33 | } 34 | 35 | WebDeveloper.Generated.addDocument(contentDocument.url, i, colorDescription, colorsLength, true); 36 | 37 | // If there are colors 38 | if(colorsLength > 0) 39 | { 40 | container = WebDeveloper.Generated.generateDocumentContainer(); 41 | 42 | container.insertAdjacentHTML("beforeend", DOMPurify.sanitize(Mustache.render(colorsTemplate, contentDocument))); 43 | content.appendChild(container); 44 | } 45 | 46 | WebDeveloper.Generated.addSeparator(); 47 | } 48 | 49 | WebDeveloper.Generated.initializeCommonElements(); 50 | }; 51 | -------------------------------------------------------------------------------- /common/js/generated/view-css.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var contentDocument = null; 9 | var css = locale.css; 10 | var documents = data.documents; 11 | var embeddedContainers = null; 12 | var embeddedCSSFrom = locale.embeddedCSSFrom; 13 | var styleSheets = null; 14 | var styleSheetsCount = null; 15 | var styleSheetsCounter = 0; 16 | var styleSheetsDescription = null; 17 | var styleSheetsLength = 0; 18 | var url = null; 19 | var urlContentRequests = []; 20 | 21 | WebDeveloper.Generated.storeLocale(locale); 22 | WebDeveloper.Generated.emptyContent(); 23 | WebDeveloper.Generated.initializeHeader(css, data, locale); 24 | WebDeveloper.Generated.initializeSidebar(locale); 25 | 26 | // Loop through the documents 27 | for(var i = 0, l = documents.length; i < l; i++) 28 | { 29 | contentDocument = documents[i]; 30 | styleSheets = contentDocument.styleSheets; 31 | styleSheetsCount = styleSheets.length; 32 | styleSheetsDescription = locale.styleSheets.toLowerCase(); 33 | styleSheetsLength = styleSheetsCount; 34 | url = contentDocument.url; 35 | 36 | // If there are embedded styles 37 | if(contentDocument.embedded) 38 | { 39 | styleSheetsLength++; 40 | } 41 | 42 | // If there is only one style sheet 43 | if(styleSheetsLength == 1) 44 | { 45 | styleSheetsDescription = locale.styleSheet.toLowerCase(); 46 | } 47 | 48 | WebDeveloper.Generated.addDocument(url, i, styleSheetsDescription, styleSheetsLength, false); 49 | 50 | // If there are embedded styles 51 | if(contentDocument.embedded) 52 | { 53 | embeddedContainers = WebDeveloper.Generated.output(embeddedCSSFrom + " " + url, null, "css", false, styleSheetsCounter++, i); 54 | 55 | // Loop through the embedded containers 56 | for(var j = 0, m = embeddedContainers.length; j < m; j++) 57 | { 58 | embeddedContainers[j].textContent = contentDocument.embedded; 59 | } 60 | } 61 | 62 | // Loop through the style sheets 63 | for(var k = 0; k < styleSheetsCount; k++) 64 | { 65 | url = styleSheets[k]; 66 | 67 | urlContentRequests.push({ outputContainers: WebDeveloper.Generated.output(null, url, "css", false, styleSheetsCounter++, i), url: url }); 68 | } 69 | 70 | // If there are no style sheets 71 | if(!contentDocument.embedded && styleSheetsCount === 0) 72 | { 73 | WebDeveloper.Generated.addSeparator(); 74 | } 75 | } 76 | 77 | WebDeveloper.Generated.initializeCommonElements(); 78 | 79 | // If there are external style sheets to get the CSS from 80 | if(urlContentRequests.length) 81 | { 82 | WebDeveloper.Common.getURLContents(urlContentRequests, "/* " + locale.couldNotLoadCSS + " */", function() 83 | { 84 | var outputContainers = null; 85 | var urlContentRequest = null; 86 | 87 | // Loop through the URL content requests 88 | for(var n = 0, p = urlContentRequests.length; n < p; n++) 89 | { 90 | urlContentRequest = urlContentRequests[n]; 91 | outputContainers = urlContentRequest.outputContainers; 92 | 93 | // Loop through the output containers 94 | for(var q = 0, r = outputContainers.length; q < r; q++) 95 | { 96 | outputContainers[q].textContent = urlContentRequest.content; 97 | } 98 | } 99 | 100 | WebDeveloper.Generated.initializeSyntaxHighlight(data.theme); 101 | }); 102 | } 103 | else 104 | { 105 | WebDeveloper.Generated.initializeSyntaxHighlight(data.theme); 106 | } 107 | }; 108 | -------------------------------------------------------------------------------- /common/js/generated/view-document-outline.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var childElement = null; 9 | var container = null; 10 | var content = document.getElementById("content"); 11 | var contentDocument = null; 12 | var documentOutline = locale.documentOutline; 13 | var documents = data.documents; 14 | var heading = null; 15 | var headingDescription = null; 16 | var headingLevel = null; 17 | var headings = null; 18 | var headingsLength = null; 19 | var headingText = null; 20 | var previousHeadingLevel = null; 21 | 22 | WebDeveloper.Generated.emptyContent(); 23 | WebDeveloper.Generated.initializeHeader(documentOutline, data, locale); 24 | WebDeveloper.Generated.initializeSidebar(locale); 25 | 26 | // Loop through the documents 27 | for(var i = 0, l = documents.length; i < l; i++) 28 | { 29 | contentDocument = documents[i]; 30 | headingDescription = locale.headings.toLowerCase(); 31 | headings = contentDocument.headings; 32 | headingsLength = headings.length; 33 | 34 | // If there is only one heading 35 | if(headingsLength == 1) 36 | { 37 | headingDescription = locale.heading.toLowerCase(); 38 | } 39 | 40 | WebDeveloper.Generated.addDocument(contentDocument.url, i, headingDescription, headingsLength, true); 41 | 42 | // If there are headings 43 | if(headingsLength > 0) 44 | { 45 | container = WebDeveloper.Generated.generateDocumentContainer(); 46 | previousHeadingLevel = 0; 47 | 48 | // Loop through the headings 49 | for(var j = 0; j < headingsLength; j++) 50 | { 51 | heading = headings[j]; 52 | headingLevel = heading.level; 53 | headingText = heading.text; 54 | 55 | // Loop through any missing headers 56 | for(var k = previousHeadingLevel + 1; k < headingLevel; k++) 57 | { 58 | childElement = document.createElement("span"); 59 | heading = document.createElement("h" + k); 60 | 61 | childElement.appendChild(document.createTextNode("")); 62 | childElement.setAttribute("class", "badge font-monospace me-1 px-2 text-bg-warning"); 63 | heading.appendChild(childElement); 64 | 65 | childElement = document.createElement("em"); 66 | 67 | childElement.appendChild(document.createTextNode(locale.missingHeading)); 68 | childElement.setAttribute("class", "text-secondary"); 69 | heading.appendChild(childElement); 70 | container.appendChild(heading); 71 | } 72 | 73 | // If there is no heading text 74 | if(!headingText) 75 | { 76 | headingText = locale.noHeadingText; 77 | } 78 | 79 | childElement = document.createElement("span"); 80 | heading = document.createElement("h" + headingLevel); 81 | 82 | childElement.appendChild(document.createTextNode("")); 83 | childElement.setAttribute("class", "badge font-monospace me-1 px-2 text-bg-success"); 84 | heading.appendChild(childElement); 85 | heading.appendChild(document.createTextNode(headingText)); 86 | container.appendChild(heading); 87 | 88 | previousHeadingLevel = headingLevel; 89 | } 90 | 91 | content.appendChild(container); 92 | } 93 | 94 | WebDeveloper.Generated.addSeparator(); 95 | } 96 | 97 | WebDeveloper.Generated.initializeCommonElements(); 98 | }; 99 | -------------------------------------------------------------------------------- /common/js/generated/view-link-information.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var content = document.getElementById("content"); 9 | var contentDocument = null; 10 | var documents = data.documents; 11 | var linkDescription = null; 12 | var linkInformation = locale.linkInformation; 13 | var linksLength = null; 14 | var linksTemplate = document.getElementById("links").innerHTML; 15 | var list = null; 16 | 17 | WebDeveloper.Generated.emptyContent(); 18 | WebDeveloper.Generated.initializeHeader(linkInformation, data, locale); 19 | WebDeveloper.Generated.initializeSidebar(locale); 20 | Mustache.parse(linksTemplate); 21 | 22 | // Loop through the documents 23 | for(var i = 0, l = documents.length; i < l; i++) 24 | { 25 | contentDocument = documents[i]; 26 | linkDescription = locale.links.toLowerCase(); 27 | linksLength = contentDocument.links.length; 28 | 29 | // If there is only one link 30 | if(linksLength == 1) 31 | { 32 | linkDescription = locale.link.toLowerCase(); 33 | } 34 | 35 | WebDeveloper.Generated.addDocument(contentDocument.url, i, linkDescription, linksLength, true); 36 | 37 | // If there are links 38 | if(linksLength > 0) 39 | { 40 | list = document.createElement("ol"); 41 | 42 | list.insertAdjacentHTML("beforeend", DOMPurify.sanitize(Mustache.render(linksTemplate, contentDocument), { ADD_ATTR: ["target"] })); 43 | content.appendChild(list); 44 | } 45 | 46 | WebDeveloper.Generated.addSeparator(); 47 | } 48 | 49 | WebDeveloper.Generated.initializeCommonElements(); 50 | }; 51 | -------------------------------------------------------------------------------- /common/js/generated/view-meta-tag-information.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | 5 | // Initializes the page with data 6 | WebDeveloper.Generated.initialize = function(data, locale) 7 | { 8 | var childElement = null; 9 | var content = document.getElementById("content"); 10 | var contentDocument = null; 11 | var documents = data.documents; 12 | var element = null; 13 | var metaTagDescription = null; 14 | var metaTagsDescription = locale.metaTags; 15 | var metaTagsLength = null; 16 | var metaTagsTemplate = document.getElementById("meta-tags").innerHTML; 17 | var table = null; 18 | var tableContainer = null; 19 | var tableWrapper = document.createElement("div"); 20 | 21 | WebDeveloper.Generated.emptyContent(); 22 | WebDeveloper.Generated.initializeHeader(metaTagsDescription, data, locale); 23 | WebDeveloper.Generated.initializeSidebar(locale); 24 | Mustache.parse(metaTagsTemplate); 25 | 26 | // Loop through the documents 27 | for(var i = 0, l = documents.length; i < l; i++) 28 | { 29 | contentDocument = documents[i]; 30 | metaTagDescription = metaTagsDescription.toLowerCase(); 31 | metaTagsLength = contentDocument.metaTags.length; 32 | 33 | // If there is only one meta tag 34 | if(metaTagsLength == 1) 35 | { 36 | metaTagDescription = locale.metaTag; 37 | } 38 | 39 | WebDeveloper.Generated.addDocument(contentDocument.url, i, metaTagDescription, metaTagsLength, true); 40 | 41 | // If there are meta tags 42 | if(metaTagsLength > 0) 43 | { 44 | childElement = document.createElement("th"); 45 | element = document.createElement("tr"); 46 | table = document.createElement("table"); 47 | tableContainer = document.createElement("thead"); 48 | 49 | childElement.appendChild(document.createTextNode(locale.name)); 50 | element.appendChild(childElement); 51 | 52 | childElement = document.createElement("th"); 53 | 54 | childElement.appendChild(document.createTextNode(locale.content)); 55 | element.appendChild(childElement); 56 | tableContainer.appendChild(element); 57 | table.appendChild(tableContainer); 58 | 59 | tableContainer = document.createElement("tbody"); 60 | 61 | tableContainer.insertAdjacentHTML("beforeend", DOMPurify.sanitize("" + Mustache.render(metaTagsTemplate, contentDocument) + "
    ", { ALLOWED_TAGS: ["tr", "td"] })); 62 | table.appendChild(tableContainer); 63 | table.setAttribute("class", "table table-borderless table-striped"); 64 | tableWrapper.appendChild(table); 65 | tableWrapper.setAttribute("class", "table-responsive"); 66 | content.appendChild(tableWrapper); 67 | } 68 | 69 | WebDeveloper.Generated.addSeparator(); 70 | } 71 | 72 | WebDeveloper.Generated.initializeCommonElements(); 73 | }; 74 | -------------------------------------------------------------------------------- /common/js/generated/view-response-headers.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Generated = WebDeveloper.Generated || {}; 4 | WebDeveloper.Generated.requestTimeout = 10000; 5 | 6 | // Displays the headers 7 | WebDeveloper.Generated.displayHeaders = function(url, headers, status, statusText) 8 | { 9 | var childElement = document.createElement("a"); 10 | var content = document.getElementById("content"); 11 | var element = document.createElement("h2"); 12 | 13 | childElement.appendChild(document.createTextNode(url)); 14 | childElement.setAttribute("href", url); 15 | element.appendChild(childElement); 16 | element.setAttribute("class", "text-break"); 17 | content.appendChild(element); 18 | 19 | element = document.createElement("pre"); 20 | 21 | element.appendChild(document.createTextNode(headers + "\n" + status + " " + statusText)); 22 | element.setAttribute("class", "bg-body-tertiary border p-2"); 23 | content.appendChild(element); 24 | }; 25 | 26 | // Initializes the page with data 27 | WebDeveloper.Generated.initialize = function(data, locale) 28 | { 29 | var request = null; 30 | var url = data.pageURL; 31 | 32 | WebDeveloper.Generated.emptyContent(); 33 | WebDeveloper.Generated.initializeHeader(locale.responseHeaders, data, locale); 34 | WebDeveloper.Generated.initializeSidebar(locale); 35 | 36 | // Try to get the response headers 37 | try 38 | { 39 | request = new XMLHttpRequest(); 40 | request.timeout = WebDeveloper.Generated.requestTimeout; 41 | 42 | request.onreadystatechange = function() 43 | { 44 | // If the request completed 45 | if(request.readyState == 4) 46 | { 47 | WebDeveloper.Generated.displayHeaders(url, request.getAllResponseHeaders(), request.status, request.statusText); 48 | } 49 | }; 50 | 51 | request.ontimeout = function() 52 | { 53 | WebDeveloper.Generated.displayHeaders(url, locale.couldNotLoadResponseHeaders, "", ""); 54 | }; 55 | 56 | request.open("get", url); 57 | request.send(null); 58 | } 59 | catch(exception) 60 | { 61 | WebDeveloper.Generated.displayHeaders(url, locale.couldNotLoadResponseHeaders, "", ""); 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /common/js/options/syntax-highlight.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.pre = null; 4 | WebDeveloper.syntaxHighlighter = null; 5 | 6 | // Returns the syntax highlight theme for a color 7 | WebDeveloper.getSyntaxHighlightTheme = function(color) 8 | { 9 | var theme = "none"; 10 | 11 | // If the color is dark 12 | if(color == "dark") 13 | { 14 | theme = "ctp-mocha"; 15 | } 16 | else if(color == "light") 17 | { 18 | theme = "ctp-latte"; 19 | } 20 | 21 | return theme; 22 | }; 23 | 24 | // Initializes the syntax highlighting 25 | WebDeveloper.initialize = function() 26 | { 27 | var textArea = document.getElementById("web-developer-syntax-highlight-sample"); 28 | 29 | WebDeveloper.pre = document.getElementById("web-developer-syntax-highlight-example"); 30 | 31 | WebDeveloper.pre.textContent = textArea.value; 32 | 33 | /* eslint-disable indent */ 34 | WebDeveloper.syntaxHighlighter = CodeMirror.fromTextArea(textArea, 35 | { 36 | lineNumbers: true, 37 | mode: "htmlmixed", 38 | readOnly: true, 39 | tabSize: 2 40 | }); 41 | /* eslint-enable indent */ 42 | 43 | WebDeveloper.syntaxHighlighter.getWrapperElement().classList.add("d-none"); 44 | 45 | WebDeveloper.Storage.getItem("syntax_highlight_theme", function(item) 46 | { 47 | WebDeveloper.setTheme(item); 48 | }); 49 | }; 50 | 51 | // Sets the theme 52 | WebDeveloper.setTheme = function(color) 53 | { 54 | var theme = WebDeveloper.getSyntaxHighlightTheme(color); 55 | 56 | // If there is no theme 57 | if(theme == "none") 58 | { 59 | WebDeveloper.syntaxHighlighter.getWrapperElement().classList.add("d-none"); 60 | WebDeveloper.pre.classList.remove("d-none"); 61 | } 62 | else 63 | { 64 | WebDeveloper.syntaxHighlighter.setOption("theme", theme); 65 | WebDeveloper.pre.classList.add("d-none"); 66 | WebDeveloper.syntaxHighlighter.getWrapperElement().classList.remove("d-none"); 67 | } 68 | }; 69 | 70 | // If the document is still loading 71 | if(document.readyState === "loading") 72 | { 73 | document.addEventListener("DOMContentLoaded", WebDeveloper.initialize); 74 | } 75 | else 76 | { 77 | WebDeveloper.initialize(); 78 | } 79 | -------------------------------------------------------------------------------- /common/js/overlay/disable.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Overlay = WebDeveloper.Overlay || {}; 4 | WebDeveloper.Overlay.Disable = WebDeveloper.Overlay.Disable || {}; 5 | 6 | // Initializes the disable overlay 7 | WebDeveloper.Overlay.Disable.initialize = function() 8 | { 9 | var disableJavaScriptMenu = document.getElementById("disable-javascript"); 10 | var disableNotificationsMenu = document.getElementById("disable-notifications"); 11 | var disablePopupsMenu = document.getElementById("disable-popups"); 12 | var resetDisableFeaturesMenu = document.getElementById("reset-disable-features"); 13 | 14 | disableJavaScriptMenu.appendChild(document.createTextNode(WebDeveloper.Locales.getString("disableJavaScript"))); 15 | disableNotificationsMenu.appendChild(document.createTextNode(WebDeveloper.Locales.getString("disableNotifications"))); 16 | disablePopupsMenu.appendChild(document.createTextNode(WebDeveloper.Locales.getString("disablePopups"))); 17 | resetDisableFeaturesMenu.appendChild(document.createTextNode(WebDeveloper.Locales.getString("resetDisableFeatures"))); 18 | 19 | disableJavaScriptMenu.addEventListener("click", WebDeveloper.Overlay.Disable.toggleJavaScript); 20 | disableNotificationsMenu.addEventListener("click", WebDeveloper.Overlay.Disable.toggleNotifications); 21 | disablePopupsMenu.addEventListener("click", WebDeveloper.Overlay.Disable.togglePopups); 22 | resetDisableFeaturesMenu.addEventListener("click", WebDeveloper.Overlay.Disable.resetFeatures); 23 | 24 | WebDeveloper.Overlay.updateContentSettingMenu(disableJavaScriptMenu, "javascript"); 25 | WebDeveloper.Overlay.updateContentSettingMenu(disableNotificationsMenu, "notifications"); 26 | WebDeveloper.Overlay.updateContentSettingMenu(disablePopupsMenu, "popups"); 27 | }; 28 | 29 | // Resets the disable features 30 | WebDeveloper.Overlay.Disable.resetFeatures = function() 31 | { 32 | chrome.contentSettings.cookies.clear({}); 33 | chrome.contentSettings.images.clear({}); 34 | chrome.contentSettings.javascript.clear({}); 35 | chrome.contentSettings.notifications.clear({}); 36 | chrome.contentSettings.popups.clear({}); 37 | 38 | WebDeveloper.Overlay.updateContentSettingMenu(document.getElementById("disable-javascript"), "javascript"); 39 | WebDeveloper.Overlay.updateContentSettingMenu(document.getElementById("disable-notifications"), "notifications"); 40 | WebDeveloper.Overlay.updateContentSettingMenu(document.getElementById("disable-popups"), "popups"); 41 | 42 | WebDeveloper.Overlay.displayNotification(WebDeveloper.Locales.getString("resetDisableFeaturesResult")); 43 | }; 44 | 45 | // Toggles JavaScript 46 | WebDeveloper.Overlay.Disable.toggleJavaScript = function() 47 | { 48 | WebDeveloper.Overlay.toggleContentSetting("javascript", this, "enableJavaScriptResult", "disableJavaScriptResult"); 49 | }; 50 | 51 | // Toggles notifications 52 | WebDeveloper.Overlay.Disable.toggleNotifications = function() 53 | { 54 | WebDeveloper.Overlay.toggleContentSetting("notifications", this, "enableNotificationsResult", "disableNotificationsResult"); 55 | }; 56 | 57 | // Toggles popups 58 | WebDeveloper.Overlay.Disable.togglePopups = function() 59 | { 60 | WebDeveloper.Overlay.toggleContentSetting("popups", this, "enablePopupsResult", "disablePopupsResult"); 61 | }; 62 | 63 | // If the document is still loading 64 | if(document.readyState === "loading") 65 | { 66 | document.addEventListener("DOMContentLoaded", WebDeveloper.Overlay.Disable.initialize); 67 | } 68 | else 69 | { 70 | WebDeveloper.Overlay.Disable.initialize(); 71 | } 72 | -------------------------------------------------------------------------------- /common/js/overlay/options.js: -------------------------------------------------------------------------------- 1 | var WebDeveloper = WebDeveloper || {}; // eslint-disable-line no-redeclare, no-use-before-define 2 | 3 | WebDeveloper.Overlay = WebDeveloper.Overlay || {}; 4 | WebDeveloper.Overlay.Options = WebDeveloper.Overlay.Options || {}; 5 | 6 | // Opens the about page 7 | WebDeveloper.Overlay.Options.about = function() 8 | { 9 | WebDeveloper.Overlay.getSelectedTab(function(tab) 10 | { 11 | chrome.tabs.create({ index: tab.index + 1, url: chrome.runtime.getURL("/about/about.html") }); 12 | WebDeveloper.Overlay.close(); 13 | }); 14 | }; 15 | 16 | // Initializes the options overlay 17 | WebDeveloper.Overlay.Options.initialize = function() 18 | { 19 | var aboutMenu = document.getElementById("about"); 20 | var helpMenu = document.getElementById("help"); 21 | var optionsMenu = document.getElementById("options"); 22 | var resetPageMenu = document.getElementById("reset-page"); 23 | 24 | aboutMenu.append(WebDeveloper.Locales.getString("aboutMenu")); 25 | helpMenu.append(WebDeveloper.Locales.getString("help")); 26 | optionsMenu.append(WebDeveloper.Locales.getString("optionsMenu")); 27 | resetPageMenu.append(WebDeveloper.Locales.getString("resetPage")); 28 | 29 | aboutMenu.addEventListener("click", WebDeveloper.Overlay.Options.about); 30 | optionsMenu.addEventListener("click", WebDeveloper.Overlay.Options.options); 31 | resetPageMenu.addEventListener("click", WebDeveloper.Overlay.Options.resetPage); 32 | }; 33 | 34 | // Opens the options 35 | WebDeveloper.Overlay.Options.options = function() 36 | { 37 | chrome.runtime.openOptionsPage(); 38 | WebDeveloper.Overlay.close(); 39 | }; 40 | 41 | // Resets the page 42 | WebDeveloper.Overlay.Options.resetPage = function() 43 | { 44 | WebDeveloper.Overlay.getSelectedTab(function(tab) 45 | { 46 | WebDeveloper.Overlay.addScriptToTab(tab, function() { window.location.reload(); }, function() 47 | { 48 | WebDeveloper.Overlay.close(); 49 | }); 50 | }); 51 | }; 52 | 53 | // If the document is still loading 54 | if(document.readyState === "loading") 55 | { 56 | document.addEventListener("DOMContentLoaded", WebDeveloper.Overlay.Options.initialize); 57 | } 58 | else 59 | { 60 | WebDeveloper.Overlay.Options.initialize(); 61 | } 62 | -------------------------------------------------------------------------------- /common/lib/codemirror/latte.css: -------------------------------------------------------------------------------- 1 | div.cm-s-ctp-latte.CodeMirror { 2 | --bg0: #eff1f5; 3 | --bg1: #8c8fa1; 4 | --bg4: #9ca0b0; 5 | --fg: #4c4f69; 6 | --fg3: #6c6f85; 7 | --gray: #5c5f77; 8 | --blue: #1e66f5; 9 | --yellow: #df8e1d; 10 | --aqua: #1e66f5; 11 | --orange: #fe640b; 12 | --primary-bg: #eff1f5; 13 | --current-line: #ccd0da; 14 | --selection: #acb0be; 15 | --atom: #7287fd; 16 | --cursor: #8c8fa1; 17 | --keyword: #d20f39; 18 | --operator: #04a5e5; 19 | --number: #fe640b; 20 | --definition: #1e66f5; 21 | --string: #40a02b; 22 | } 23 | 24 | .cm-s-ctp-latte.CodeMirror, 25 | .cm-s-ctp-latte .CodeMirror-gutters { 26 | background-color: var(--primary-bg); 27 | color: var(--fg3); 28 | } 29 | .cm-s-ctp-latte .CodeMirror-gutters { 30 | background: var(--primary-bg); 31 | border-right: 0px; 32 | } 33 | .cm-s-ctp-latte .CodeMirror-linenumber { 34 | color: var(--bg4); 35 | } 36 | .cm-s-ctp-latte .CodeMirror-cursor { 37 | border-left: 1px solid var(--fg); 38 | } 39 | .cm-s-ctp-latte.cm-fat-cursor .CodeMirror-cursor { 40 | background-color: var(--cursor) !important; 41 | } 42 | .cm-s-ctp-latte .cm-animate-fat-cursor { 43 | background-color: var(--cursor) !important; 44 | } 45 | .cm-s-ctp-latte div.CodeMirror-selected { 46 | background: var(--selection); 47 | } 48 | .cm-s-ctp-latte span.cm-meta { 49 | color: var(--blue); 50 | } 51 | .cm-s-ctp-latte span.cm-comment { 52 | color: var(--gray); 53 | } 54 | .cm-s-ctp-latte span.cm-number { 55 | color: var(--number); 56 | } 57 | .cm-s-ctp-latte span.cm-atom { 58 | color: var(--atom); 59 | } 60 | .cm-s-ctp-latte span.cm-keyword { 61 | color: var(--keyword); 62 | } 63 | .cm-s-ctp-latte span.cm-variable { 64 | color: var(--fg); 65 | } 66 | .cm-s-ctp-latte span.cm-variable-2 { 67 | color: var(--fg); 68 | } 69 | .cm-s-ctp-latte span.cm-variable-3, 70 | .cm-s-ctp-latte .cm-s-gruvbox-dark span.cm-type { 71 | color: var(--yellow); 72 | } 73 | .cm-s-ctp-latte span.cm-operator { 74 | color: var(--operator); 75 | } 76 | .cm-s-ctp-latte span.cm-callee { 77 | color: var(--fg); 78 | } 79 | .cm-s-ctp-latte span.cm-def { 80 | color: var(--definition); 81 | } 82 | .cm-s-ctp-latte span.cm-property { 83 | color: var(--fg); 84 | } 85 | .cm-s-ctp-latte span.cm-string { 86 | color: var(--string); 87 | } 88 | .cm-s-ctp-latte span.cm-string-2 { 89 | color: var(--aqua); 90 | } 91 | .cm-s-ctp-latte span.cm-qualifier { 92 | color: var(--aqua); 93 | } 94 | .cm-s-ctp-latte span.cm-attribute { 95 | color: var(--aqua); 96 | } 97 | .cm-s-ctp-latte .CodeMirror-activeline-background { 98 | background: var(--current-line); 99 | } 100 | .cm-s-ctp-latte .CodeMirror-matchingbracket { 101 | background: var(--gray); 102 | color: var(--bg0) !important; 103 | } 104 | .cm-s-ctp-latte span.cm-builtin { 105 | color: var(--orange); 106 | } 107 | .cm-s-ctp-latte span.cm-tag { 108 | color: var(--orange); 109 | } -------------------------------------------------------------------------------- /common/lib/codemirror/mocha.css: -------------------------------------------------------------------------------- 1 | div.cm-s-ctp-mocha.CodeMirror { 2 | --bg0: #1e1e2e; 3 | --bg1: #7f849c; 4 | --bg4: #6c7086; 5 | --fg: #cdd6f4; 6 | --fg3: #a6adc8; 7 | --gray: #bac2de; 8 | --blue: #89b4fa; 9 | --yellow: #f9e2af; 10 | --aqua: #89b4fa; 11 | --orange: #fab387; 12 | --primary-bg: #1e1e2e; 13 | --current-line: #313244; 14 | --selection: #585b70; 15 | --atom: #b4befe; 16 | --cursor: #7f849c; 17 | --keyword: #f38ba8; 18 | --operator: #89dceb; 19 | --number: #fab387; 20 | --definition: #89b4fa; 21 | --string: #a6e3a1; 22 | } 23 | 24 | .cm-s-ctp-mocha.CodeMirror, 25 | .cm-s-ctp-mocha .CodeMirror-gutters { 26 | background-color: var(--primary-bg); 27 | color: var(--fg3); 28 | } 29 | .cm-s-ctp-mocha .CodeMirror-gutters { 30 | background: var(--primary-bg); 31 | border-right: 0px; 32 | } 33 | .cm-s-ctp-mocha .CodeMirror-linenumber { 34 | color: var(--bg4); 35 | } 36 | .cm-s-ctp-mocha .CodeMirror-cursor { 37 | border-left: 1px solid var(--fg); 38 | } 39 | .cm-s-ctp-mocha.cm-fat-cursor .CodeMirror-cursor { 40 | background-color: var(--cursor) !important; 41 | } 42 | .cm-s-ctp-mocha .cm-animate-fat-cursor { 43 | background-color: var(--cursor) !important; 44 | } 45 | .cm-s-ctp-mocha div.CodeMirror-selected { 46 | background: var(--selection); 47 | } 48 | .cm-s-ctp-mocha span.cm-meta { 49 | color: var(--blue); 50 | } 51 | .cm-s-ctp-mocha span.cm-comment { 52 | color: var(--gray); 53 | } 54 | .cm-s-ctp-mocha span.cm-number { 55 | color: var(--number); 56 | } 57 | .cm-s-ctp-mocha span.cm-atom { 58 | color: var(--atom); 59 | } 60 | .cm-s-ctp-mocha span.cm-keyword { 61 | color: var(--keyword); 62 | } 63 | .cm-s-ctp-mocha span.cm-variable { 64 | color: var(--fg); 65 | } 66 | .cm-s-ctp-mocha span.cm-variable-2 { 67 | color: var(--fg); 68 | } 69 | .cm-s-ctp-mocha span.cm-variable-3, 70 | .cm-s-ctp-mocha .cm-s-gruvbox-dark span.cm-type { 71 | color: var(--yellow); 72 | } 73 | .cm-s-ctp-mocha span.cm-operator { 74 | color: var(--operator); 75 | } 76 | .cm-s-ctp-mocha span.cm-callee { 77 | color: var(--fg); 78 | } 79 | .cm-s-ctp-mocha span.cm-def { 80 | color: var(--definition); 81 | } 82 | .cm-s-ctp-mocha span.cm-property { 83 | color: var(--fg); 84 | } 85 | .cm-s-ctp-mocha span.cm-string { 86 | color: var(--string); 87 | } 88 | .cm-s-ctp-mocha span.cm-string-2 { 89 | color: var(--aqua); 90 | } 91 | .cm-s-ctp-mocha span.cm-qualifier { 92 | color: var(--aqua); 93 | } 94 | .cm-s-ctp-mocha span.cm-attribute { 95 | color: var(--aqua); 96 | } 97 | .cm-s-ctp-mocha .CodeMirror-activeline-background { 98 | background: var(--current-line); 99 | } 100 | .cm-s-ctp-mocha .CodeMirror-matchingbracket { 101 | background: var(--gray); 102 | color: var(--bg0) !important; 103 | } 104 | .cm-s-ctp-mocha span.cm-builtin { 105 | color: var(--orange); 106 | } 107 | .cm-s-ctp-mocha span.cm-tag { 108 | color: var(--orange); 109 | } -------------------------------------------------------------------------------- /common/lib/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /common/svg/donate/icons.svg: -------------------------------------------------------------------------------- 1 | present -------------------------------------------------------------------------------- /common/svg/logos/color/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/logos/gray/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/logos/monochrome/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/advanced.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/colors.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/general.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/resize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/responsive.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/options/tools.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/cookies.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/css.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/disable.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/forms.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/images.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/information.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/miscellaneous.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/options.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/resize.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/svg/overlay/color/tools.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /common/tests/html/dashboard/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Web Developer Tests - Dashboard 6 | 7 | 8 | 9 | 10 | 11 | 12 |
    13 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /common/tests/html/dashboard/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer Tests - Dashboard 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    Web Developer Tests

    15 |

    Dashboard

    16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /common/tests/html/display-color-picker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer Tests - Display Color Picker 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Web Developer Tests

    16 |

    Display Color Picker

    17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /common/tests/html/display-color-picker/toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Web Developer Tests - Display Color Picker 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 |
    15 |
    16 |

    Web Developer logoWeb Developer Line Guides

    17 |
    18 |
    19 | Hover Color: 20 | 21 | #f9ffff 22 | Selected Color: 23 | 24 | #00ff00 25 |
    26 |
    27 |
    28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /common/tests/html/display-line-guides/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer Tests - Display Line Guides 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Web Developer Tests

    16 |

    Display Line Guides

    17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /common/tests/html/display-line-guides/toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Web Developer Tests - Display Line Guides 6 | 7 | 8 | 9 | 10 | 11 | 12 |
    13 |
    14 |
    15 |

    Web Developer logoWeb Developer Line Guides

    16 |
    17 |
    18 | 19 | Position = 20 | 100px 21 | Previous Position = 22 | 0px 23 | Next Position = 24 | 0px 25 | 26 | 27 | 28 |
    29 |
    30 |
    31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /common/tests/html/display-ruler/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer Tests - Display Ruler 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

    Web Developer Tests

    16 |

    Display Ruler

    17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /common/tests/html/display-ruler/toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Web Developer Tests - Display Ruler 6 | 7 | 8 | 9 | 10 | 11 | 12 |
    13 |
    14 |
    15 |

    Web Developer logoWeb Developer Ruler

    16 |
    17 |
    18 | 19 | 20 | 21 | 22 | 23 | Start Position: X = 24 | 200px 25 | Y = 26 | 200px 27 | End Position: X = 28 | 500px 29 | Y = 30 | 400px 31 |
    32 |
    33 |
    34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /common/tests/html/generated/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer Tests - Generated 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 32 | 33 |
    34 |
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 92 |
    93 |
    94 |
    95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /common/tests/html/options/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Web Developer 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 24 |
    25 |
    26 |
    27 |

    Web Developer

    28 | 29 | 37 | 38 |
    39 |
    40 |
    41 |
    42 | Overlay icon 43 |
    44 |
    45 | 46 | 47 |
    48 |
    49 | 50 | 51 |
    52 |
    53 | 54 | 55 |
    56 |
    57 |
    58 |
    59 | 60 |
    61 | 66 |
    67 |
    68 |
    69 |
    70 |
    71 |
    72 | 84 |
    85 |
    86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /edge/config/config.properties: -------------------------------------------------------------------------------- 1 | version=3.0.1 2 | -------------------------------------------------------------------------------- /edge/config/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": { "default_icon": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, "default_popup": "/overlay/overlay.html", "default_title": "__MSG_extensionName__" }, 3 | "background": { "service_worker": "/background/background.js" }, 4 | "content_scripts": [{ "js": ["/content/content.js"], "matches": [""] }], 5 | "default_locale": "en_US", 6 | "description": "__MSG_extensionDescription__", 7 | "homepage_url": "@url@", 8 | "host_permissions": [""], 9 | "icons": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, 10 | "manifest_version": 3, 11 | "name": "__MSG_extensionName__", 12 | "options_page": "/options/options.html", 13 | "permissions": ["browsingData", "contentSettings", "cookies", "history", "scripting", "storage", "tabs"], 14 | "version": "@version@", 15 | "web_accessible_resources": [{ "matches": [""], "resources": ["/embedded/css/*.css", "/embedded/js/dashboard/dashboard.js", "/features/css/*.css", "/img/transparent.png", "/lib/bootstrap/bootstrap.css", "/lib/bootstrap/bootstrap.js", "/lib/reset.css", "/svg/logos/color/logo.svg"], "use_dynamic_url": true }] 16 | } 17 | -------------------------------------------------------------------------------- /edge/gulp/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | global.edgePackageName = "web-developer-edge.zip"; 4 | 5 | var del = require("del"); 6 | var gulp = require("gulp"); 7 | var runSequence = require("run-sequence"); 8 | 9 | gulp.task("build-edge-all", function() 10 | { 11 | return global.buildAll("edge"); 12 | }); 13 | 14 | gulp.task("clean-edge", function() 15 | { 16 | return del(["build/edge", "build/edge.properties", "build/" + global.edgePackageName]); 17 | }); 18 | 19 | gulp.task("initialize-edge-build", function(callback) 20 | { 21 | global.initializeBuild("edge", callback); 22 | }); 23 | 24 | gulp.task("package-edge", function() 25 | { 26 | return global.packageTask("edge", global.edgePackageName); 27 | }); 28 | 29 | gulp.task("build-edge", function(callback) { runSequence("initialize-edge-build", "build-edge-all", callback); }); 30 | gulp.task("edge", function(callback) { runSequence("build-edge", "package-edge", callback); }); 31 | -------------------------------------------------------------------------------- /firefox/config/config.properties: -------------------------------------------------------------------------------- 1 | version=3.0.1 2 | -------------------------------------------------------------------------------- /firefox/config/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": { "default_icon": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, "default_popup": "/overlay/overlay.html", "default_title": "__MSG_extensionName__" }, 3 | "background": { "scripts": ["/background/background.js"] }, 4 | "browser_specific_settings": { "gecko": { "id": "{c45c406e-ab73-11d8-be73-000a95be3b12}", "strict_min_version": "109.0" } }, 5 | "content_scripts": [{ "js": ["/content/content.js"], "matches": [""] }], 6 | "default_locale": "en_US", 7 | "description": "__MSG_extensionDescription__", 8 | "homepage_url": "@url@", 9 | "host_permissions": [""], 10 | "icons": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, 11 | "manifest_version": 3, 12 | "name": "__MSG_extensionName__", 13 | "options_ui": { "open_in_tab": true, "page": "/options/options.html" }, 14 | "permissions": ["browsingData", "cookies", "history", "scripting", "storage", "tabs"], 15 | "version": "@version@", 16 | "web_accessible_resources": [{ "matches": [""], "resources": ["/embedded/css/*.css", "/embedded/js/dashboard/dashboard.js", "/features/css/*.css", "/img/transparent.png", "/lib/bootstrap/bootstrap.css", "/lib/bootstrap/bootstrap.js", "/lib/reset.css", "/svg/logos/color/logo.svg"] }] 17 | } 18 | -------------------------------------------------------------------------------- /firefox/css/overlay/overlay.css: -------------------------------------------------------------------------------- 1 | /* Overlay styles */ 2 | 3 | #disable-cookies, #disable-images, #disable-menu, #disable-toolbar { display: none; } 4 | -------------------------------------------------------------------------------- /firefox/gulp/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | global.firefoxPackageName = "web-developer-firefox.zip"; 4 | 5 | var del = require("del"); 6 | var exec = require("child_process"); 7 | var gulp = require("gulp"); 8 | var runSequence = require("run-sequence"); 9 | 10 | gulp.task("build-firefox-all", function() 11 | { 12 | return global.buildAll("firefox"); 13 | }); 14 | 15 | gulp.task("clean-firefox", function() 16 | { 17 | return del(["build/firefox", "build/firefox.properties", "build/" + global.firefoxPackageName]); 18 | }); 19 | 20 | gulp.task("initialize-firefox-build", function(callback) 21 | { 22 | global.initializeBuild("firefox", callback); 23 | }); 24 | 25 | gulp.task("temporary-install-firefox", function(callback) 26 | { 27 | process.chdir("build/firefox"); 28 | exec.exec("../../node_modules/web-ext/bin/web-ext run --bc -f=firefox --start-url chrispederick.com", function(error, output, errors) 29 | { 30 | console.log(output); // eslint-disable-line no-console 31 | console.log(errors); // eslint-disable-line no-console 32 | callback(error); 33 | }); 34 | }); 35 | 36 | gulp.task("temporary-install-firefox-beta", function(callback) 37 | { 38 | process.chdir("build/firefox"); 39 | exec.exec("../../node_modules/web-ext/bin/web-ext run --bc -f=beta --start-url chrispederick.com", function(error, output, errors) 40 | { 41 | console.log(output); // eslint-disable-line no-console 42 | console.log(errors); // eslint-disable-line no-console 43 | callback(error); 44 | }); 45 | }); 46 | 47 | gulp.task("temporary-install-firefox-developer", function(callback) 48 | { 49 | process.chdir("build/firefox"); 50 | exec.exec("../../node_modules/web-ext/bin/web-ext run --bc -f=firefoxdeveloperedition --start-url chrispederick.com -v", function(error, output, errors) 51 | { 52 | console.log(output); // eslint-disable-line no-console 53 | console.log(errors); // eslint-disable-line no-console 54 | callback(error); 55 | }); 56 | }); 57 | 58 | gulp.task("package-firefox", function() 59 | { 60 | return global.packageTask("firefox", global.firefoxPackageName); 61 | }); 62 | 63 | gulp.task("build-firefox", function(callback) { runSequence("initialize-firefox-build", "build-firefox-all", callback); }); 64 | gulp.task("firefox", function(callback) { runSequence("build-firefox", "package-firefox", callback); }); 65 | gulp.task("install-firefox", function(callback) { runSequence("build-firefox", "temporary-install-firefox", callback); }); 66 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var requireDir = require("require-dir"); 4 | 5 | requireDir("./common/gulp"); 6 | requireDir("./chrome/gulp"); 7 | requireDir("./edge/gulp"); 8 | requireDir("./firefox/gulp"); 9 | requireDir("./opera/gulp"); 10 | -------------------------------------------------------------------------------- /opera/config/config.properties: -------------------------------------------------------------------------------- 1 | version=3.0.1 2 | -------------------------------------------------------------------------------- /opera/config/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": { "default_icon": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, "default_popup": "/overlay/overlay.html", "default_title": "__MSG_extensionName__" }, 3 | "background": { "service_worker": "/background/background.js" }, 4 | "content_scripts": [{ "js": ["/content/content.js"], "matches": [""] }], 5 | "default_locale": "en_US", 6 | "description": "__MSG_extensionDescription__", 7 | "homepage_url": "@url@", 8 | "host_permissions": [""], 9 | "icons": { "16": "/img/logos/color/16.png", "32": "/img/logos/color/32.png", "48": "/img/logos/color/48.png", "64": "/img/logos/color/64.png", "128": "/img/logos/color/128.png", "256": "/img/logos/color/256.png" }, 10 | "manifest_version": 3, 11 | "name": "__MSG_extensionName__", 12 | "options_page": "/options/options.html", 13 | "permissions": ["browsingData", "contentSettings", "cookies", "history", "scripting", "storage", "tabs"], 14 | "version": "@version@", 15 | "web_accessible_resources": [{ "matches": [""], "resources": ["/embedded/css/*.css", "/embedded/js/dashboard/dashboard.js", "/features/css/*.css", "/img/transparent.png", "/lib/bootstrap/bootstrap.css", "/lib/bootstrap/bootstrap.js", "/lib/reset.css", "/svg/logos/color/logo.svg"], "use_dynamic_url": true }] 16 | } 17 | -------------------------------------------------------------------------------- /opera/css/overlay/overlay.css: -------------------------------------------------------------------------------- 1 | /* Overlay styles */ 2 | 3 | #disable-cookies, #disable-images, #disable-menu, #disable-toolbar { display: none; } 4 | -------------------------------------------------------------------------------- /opera/gulp/gulp.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | global.operaPackageName = "web-developer-opera.nex"; 4 | 5 | var del = require("del"); 6 | var gulp = require("gulp"); 7 | var runSequence = require("run-sequence"); 8 | 9 | gulp.task("build-opera-all", function() 10 | { 11 | return global.buildAll("opera"); 12 | }); 13 | 14 | gulp.task("clean-opera", function() 15 | { 16 | return del(["build/opera", "build/opera.properties", "build/" + global.operaPackageName]); 17 | }); 18 | 19 | gulp.task("initialize-opera-build", function(callback) 20 | { 21 | global.initializeBuild("opera", callback); 22 | }); 23 | 24 | gulp.task("package-opera", function() 25 | { 26 | return global.packageTask("opera", global.operaPackageName); 27 | }); 28 | 29 | gulp.task("build-opera", function(callback) { runSequence("initialize-opera-build", "build-opera-all", callback); }); 30 | gulp.task("opera", function(callback) { runSequence("build-opera", "package-opera", callback); }); 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Web Developer", 3 | "license": "GPL-3.0", 4 | "name": "web-developer", 5 | "version": "1.0.0", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/chrispederick/web-developer" 9 | }, 10 | "devDependencies": { 11 | "dateformat": "4.5.1", 12 | "del": "5.1.0", 13 | "fancy-log": "1.3.3", 14 | "gulp": "3.9.1", 15 | "gulp-concat": "*", 16 | "gulp-csslint": "*", 17 | "gulp-eslint": "*", 18 | "gulp-filter-java-properties": "*", 19 | "gulp-footer": "*", 20 | "gulp-imagemin": "4.1.0", 21 | "gulp-load-plugins": "*", 22 | "gulp-plumber": "*", 23 | "gulp-rename": "*", 24 | "gulp-replace": "*", 25 | "gulp-zip": "4.2.0", 26 | "lazypipe": "*", 27 | "merge-stream": "*", 28 | "require-dir": "*", 29 | "run-sequence": "*", 30 | "web-ext": "*" 31 | }, 32 | "dependencies": {} 33 | } 34 | --------------------------------------------------------------------------------