Skip to content

Commit d30cd61

Browse files
authored
v0.2.1 (#2)
* Added Form * one-time connection * chore:Sanitized Codebase * 0.2.0 * Add Icon & Sanitize Code
1 parent d39ea58 commit d30cd61

File tree

9 files changed

+87
-13
lines changed

9 files changed

+87
-13
lines changed

README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1-
# Dev Helper
1+
<p align="center">
2+
<a href="https://github.com/Swarag-N/Dev-Helper">
3+
<img src="./src/img/icon512.png" width=150px />
4+
</a>
5+
<h1 align="center"> Dev Helper </h1>
6+
<h4 align="center"> Dev-Helper is a Chrome Extension to view borders of DOM Elements (on mouse hover). <h4>
7+
</p>
28

3-
Chrome Extension for Web Developer
9+
# Preview
10+
11+
<p align="center">
12+
<a href="https://github.com/Swarag-N/Dev-Helper"><img src="https://i.imgur.com/JZt85S7.png" title="Popup" /></a>
13+
<br>
14+
<a href="https://youtu.be/-X_E_3CDWOw"><img src="https://i.imgur.com/mRLvJqF.gif" title="Functioning of Dev Helper" /></a>
15+
</p>
16+
17+
18+
## Features
19+
20+
- See Borders of DOM Elements useful for Debugging CSS
21+
- Customizing Options
22+
- Border Length `1 - infinity`
23+
- Border Color
24+
- Select Through Color Box
25+
- Give HEX,RGB
26+
- Border Type
27+
- Dotted
28+
- Solid
29+
- Dashed
30+
- Few More
31+
- Reset to Default
32+
33+
## Install
34+
35+
- Google Chrome WebStore
36+
37+
- Coming Soon
38+
39+
- Add Manually
40+
- Download Latest Version of `src.zip`
41+
- <https://github.com/Swarag-N/Dev-Helper/releases>
42+
- Navigate to `chrome://extensions/`
43+
- Toggle `Developer Mode` at Top Right Corner
44+
- Use `Load unpacked` load the Extracted files from `src.zip` to Browser
45+
- Refresh the Tab to start Using Extension
46+
47+
## Contribute
48+
49+
### Local Development
50+
51+
- Clone the source
52+
53+
```sh
54+
git clone -b develop https://github.com/Swarag-N/Dev-Helper.git
55+
```
56+
57+
- Load up Chrome browser, go to URL `chrome://extensions`, and enable _Developer Mode_
58+
- Click on `Load Unpacked`, and use the `src` directory as the root.
59+
60+
<p align="center">
61+
Made with :heart: by <a href="https://github.com/Swarag-N">Swarag Naryanasetty</a>
62+
</p>

src/content.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
"use strict";
22
console.log("Using Dev-Helper");
33

4+
5+
// Using const
46
const bodyElement = document.getElementsByTagName("body");
57
let formData = {};
68
let borderProperties = `${formData.size}px ${formData.color} ${formData.bStyle}`;
79
// let borderProperties = "1px dashed #0000FF"
810

11+
/**
12+
*
13+
* @param {*} event eventHandler
14+
*/
915
function devHelper(event) {
1016
// highlight the mouseover target
1117
event.target.style.border = borderProperties;
@@ -16,6 +22,13 @@ function devHelper(event) {
1622
}, 500);
1723
}
1824

25+
26+
/**
27+
* @function DevHelperController Handles the commands come from popup
28+
* @param {*} commands contains the border properties user need
29+
* @param {*} sender
30+
* @param {*} sendResponse
31+
*/
1932
function DevHelperController(commands, sender, sendResponse) {
2033
console.log(commands);
2134
if (commands.onoffswitch) {

src/img/icon128.png

3.38 KB
Loading

src/img/icon16.png

292 Bytes
Loading

src/img/icon32.png

708 Bytes
Loading

src/img/icon48.png

1.58 KB
Loading

src/img/icon512.png

36.9 KB
Loading

src/index.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
let devForm = document.getElementById("customization");
2-
console.log(devForm);
32

3+
/**
4+
* @returns formData => Data in the Form
5+
*/
46
function readFormData() {
57
let formData = Object.fromEntries(
68
new FormData(document.querySelector("form")).entries()
@@ -15,12 +17,5 @@ function formEventHandler() {
1517
});
1618
}
1719

18-
devForm.addEventListener("input",formEventHandler,false);
19-
devForm.addEventListener("reset",formEventHandler,false);
20-
21-
// devForm.addEventListener("input", () => {
22-
// chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
23-
// let commands = readFormData();
24-
// chrome.tabs.sendMessage(tabs[0].id, commands);
25-
// });
26-
// });
20+
devForm.addEventListener("input", formEventHandler, false);
21+
devForm.addEventListener("reset", formEventHandler, false);

src/manifest.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
"manifest_version": 2,
33
"name": "Dev Helper",
44
"description": "Chrome Extension for Web Developer",
5-
"version": "0.2.0",
5+
"version": "0.2.1",
66
"author": "Swarag Naryanasetty",
77
"browser_action": {
88
"default_title": "Dev Helper",
99
"default_popup": "popup.html"
1010
},
11+
"icons": {
12+
"16": "img/icon16.png",
13+
"32": "img/icon32.png",
14+
"48": "img/icon48.png",
15+
"128": "img/icon128.png",
16+
"512":"img/icon512.png"
17+
},
1118
"content_scripts": [
1219
{
1320
"matches": ["<all_urls>"],

0 commit comments

Comments
 (0)