-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
850 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# HTTP-Listener | ||
|
||
Listen to all HTTP, HTTPS, and AJAX requests. | ||
|
||
This is an extension of Google Chrome and Opera lets you listen to all HTTP, HTTPS, and AJAX requests. | ||
|
||
You can use it to check how websites and APIs work and view all browser requests. | ||
|
||
# ScreenShot | ||
![ScreenShot](https://github.com/alisaki20/HTTP-Listener/blob/master/screenshot.png?raw=true) | ||
|
||
# Installation | ||
1. Open the Extension Management page by navigating to chrome://extensions. | ||
2. The Extension Management page can also be opened by clicking on the Chrome menu, hovering over More Tools then selecting Extensions. | ||
3. Enable Developer Mode by clicking the toggle switch next to Developer mode. | ||
4. Click the LOAD UNPACKED button and select the extension directory. | ||
|
||
# License | ||
MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"extensionName": { | ||
"message": "HTTP Listener", | ||
"description": "Title of the extension" | ||
}, | ||
"extensionDescription": { | ||
"message": "استمع إلى جميع طلبات HTTP و HTTPS و AJAX" | ||
}, | ||
"dir": { | ||
"message": "rtl" | ||
}, | ||
"filterByUrl": { | ||
"message": "تصفية حسب Url" | ||
}, | ||
"start": { | ||
"message": "ابدأ" | ||
}, | ||
"stop": { | ||
"message": "توقف" | ||
}, | ||
"clear": { | ||
"message": "نظف" | ||
}, | ||
"type": { | ||
"message": "نوع" | ||
}, | ||
"method": { | ||
"message": "طريقة" | ||
}, | ||
"url": { | ||
"message": "رابط" | ||
}, | ||
"runButton": { | ||
"message": "تشغیل" | ||
}, | ||
"closeButton": { | ||
"message": "إغلاق" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"extensionName": { | ||
"message": "HTTP Listener", | ||
"description": "Title of the extension" | ||
}, | ||
"extensionDescription": { | ||
"message": "Listen to all HTTP, HTTPS, and AJAX requests" | ||
}, | ||
"dir": { | ||
"message": "ltr" | ||
}, | ||
"filterByUrl": { | ||
"message": "Filter By Url" | ||
}, | ||
"start": { | ||
"message": "Start" | ||
}, | ||
"stop": { | ||
"message": "Stop" | ||
}, | ||
"clear": { | ||
"message": "Clear" | ||
}, | ||
"type": { | ||
"message": "Type" | ||
}, | ||
"method": { | ||
"message": "Method" | ||
}, | ||
"url": { | ||
"message": "Url" | ||
}, | ||
"runButton": { | ||
"message": "Run" | ||
}, | ||
"closeButton": { | ||
"message": "Close" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"extensionName": { | ||
"message": "HTTP Listener", | ||
"description": "Title of the extension" | ||
}, | ||
"extensionDescription": { | ||
"message": "گوش دادن به تمام درخواست های HTTP ، HTTPS و AJAX " | ||
}, | ||
"dir": { | ||
"message": "rtl" | ||
}, | ||
"filterByUrl": { | ||
"message": "فیلتر بر اساس آدرس" | ||
}, | ||
"start": { | ||
"message": "شروع" | ||
}, | ||
"stop": { | ||
"message": "توقف" | ||
}, | ||
"clear": { | ||
"message": "تمیز کردن" | ||
}, | ||
"type": { | ||
"message": "نوع" | ||
}, | ||
"method": { | ||
"message": "روش" | ||
}, | ||
"url": { | ||
"message": "پیوند" | ||
}, | ||
"runButton": { | ||
"message": "اجرا کن" | ||
}, | ||
"closeButton": { | ||
"message": "بستن" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
'use strict'; | ||
|
||
function onAddRequest() { | ||
this.listeners = []; | ||
this.addListener = (callback) => { | ||
if (typeof callback !== 'function') { | ||
console.error(`The listener callback must be a function, the given type is ${typeof callback}`); | ||
} else { | ||
this.listeners.push(callback); | ||
}; | ||
}; | ||
this.removeListener = (callback) => { | ||
this.listeners = this.listeners.filter(listener => { | ||
return listener != callback | ||
}); | ||
}; | ||
this.dispatch = (details) => { | ||
this.listeners.forEach((listener) => { | ||
listener(details); | ||
}); | ||
}; | ||
}; | ||
|
||
function onClearAllRequest() { | ||
this.listeners = []; | ||
this.addListener = (callback) => { | ||
if (typeof callback !== 'function') { | ||
console.error(`The listener callback must be a function, the given type is ${typeof callback}`); | ||
} else { | ||
this.listeners.push(callback); | ||
}; | ||
}; | ||
this.removeListener = (callback) => { | ||
this.listeners = this.listeners.filter(listener => { | ||
return listener != callback | ||
}); | ||
}; | ||
this.dispatch = () => { | ||
this.listeners.forEach((listener) => { | ||
listener(); | ||
}); | ||
}; | ||
}; | ||
|
||
function onRecordChange() { | ||
this.listeners = []; | ||
this.addListener = (callback) => { | ||
if (typeof callback !== 'function') { | ||
console.error(`The listener callback must be a function, the given type is ${typeof callback}`); | ||
} else { | ||
this.listeners.push(callback); | ||
}; | ||
}; | ||
this.removeListener = (callback) => { | ||
this.listeners = this.listeners.filter(listener => { | ||
return listener != callback | ||
}); | ||
}; | ||
this.dispatch = (newRecord) => { | ||
this.listeners.forEach((listener) => { | ||
listener(newRecord); | ||
}); | ||
}; | ||
}; | ||
|
||
var onAddRequest = new onAddRequest(), | ||
onClearAllRequest = new onClearAllRequest(), | ||
onRecordChange = new onRecordChange(), | ||
allRequests = [], | ||
record = false; | ||
|
||
function clearAllRequest() { | ||
allRequests = []; | ||
onClearAllRequest.dispatch(); | ||
}; | ||
|
||
function switchRecord() { | ||
if (record) { | ||
record = false; | ||
} else { | ||
record = true; | ||
}; | ||
onRecordChange.dispatch(record); | ||
}; | ||
|
||
chrome.webRequest.onBeforeRequest.addListener((details) => { | ||
if (!record) { | ||
return; | ||
}; | ||
|
||
if (details.initiator != undefined) { | ||
if (details.initiator.substr(0, 19) == "chrome-extension://") return; | ||
} else { | ||
if (details.url.substr(0, 19) == "chrome-extension://") return; | ||
}; | ||
|
||
allRequests.push(details); | ||
|
||
if (allRequests.length > 2000) { | ||
allRequests = allRequests.slice(0, 2000); | ||
}; | ||
|
||
onAddRequest.dispatch(details); | ||
}, {urls: ["<all_urls>"]}, ["requestBody"]); | ||
|
||
chrome.browserAction.onClicked.addListener(() => { | ||
chrome.tabs.create ({ | ||
active: true, url: chrome.extension.getURL("requests_dashboard.html") | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* fallback */ | ||
@font-face { | ||
font-family: 'Material Icons'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(icons.woff2) format('woff2'); | ||
} | ||
|
||
.material-icons { | ||
font-family: 'Material Icons'; | ||
font-weight: normal; | ||
font-style: normal; | ||
font-size: 24px; | ||
line-height: 1; | ||
letter-spacing: normal; | ||
text-transform: none; | ||
display: inline-block; | ||
white-space: nowrap; | ||
word-wrap: normal; | ||
direction: ltr; | ||
-webkit-font-feature-settings: 'liga'; | ||
-webkit-font-smoothing: antialiased; | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "__MSG_extensionName__", | ||
"description": "__MSG_extensionDescription__", | ||
"default_locale": "en", | ||
"version": "1.0", | ||
"permissions": ["webRequest", "<all_urls>"], | ||
"background": { | ||
"scripts": ["background.js"], | ||
"persistent": true | ||
}, | ||
"browser_action": { | ||
"default_icon": { | ||
"16": "images/icon16.png", | ||
"32": "images/icon32.png", | ||
"48": "images/icon48.png", | ||
"128": "images/icon128.png" | ||
} | ||
}, | ||
"icons": { | ||
"16": "images/icon16.png", | ||
"32": "images/icon32.png", | ||
"48": "images/icon48.png", | ||
"128": "images/icon128.png" | ||
}, | ||
"manifest_version": 2 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.