-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
1 parent
8701f9e
commit 4d5ec88
Showing
8 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
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.
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,36 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "WhatsApp-Monitor", | ||
"description": "WhatsApp-Monitor", | ||
"version": "1.0", | ||
"author": "Rizwan Ahmad", | ||
|
||
|
||
"icons": { | ||
|
||
"64": "images/icons/64.png", | ||
"128": "images/icons/128.png" | ||
}, | ||
|
||
"web_accessible_resources": [ | ||
"beep.mp3" | ||
], | ||
|
||
"content_scripts": [ | ||
{ | ||
"matches": ["https://web.whatsapp.com/*"], | ||
"js": ["start.js" ] | ||
} | ||
], | ||
|
||
"permissions": [ | ||
"storage","tabs","https://web.whatsapp.com/*" | ||
], | ||
|
||
"browser_action": { | ||
"default_popup": "popup.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,53 @@ | ||
var online = document.getElementsByClassName("_315-i"); | ||
var user = document.getElementsByClassName("_19RFN"); | ||
n=document.querySelector("#main > header > div._3V5x5 > div > div > span") | ||
function trackuser() { | ||
|
||
var flag=1; | ||
|
||
|
||
|
||
setTimeout(function(){ | ||
|
||
|
||
|
||
try { | ||
if (online[0].innerText == "online" || online[0].innerText == "typing..." ) { | ||
n.innerText=user[0].innerText+"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅦🅗🅐🅣🅢🅐🅟🅟 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅜🅞🅝🅘🅣🅞🅡"; | ||
n.style.color="green"; | ||
online[0].style.color="green"; | ||
|
||
console.log(user[0].innerText + " is Online"); | ||
let url = chrome.runtime.getURL('beep.mp3') | ||
let a = new Audio(url) | ||
a.play() | ||
flag=0; | ||
|
||
|
||
} else { | ||
console.log(online[0].innerText); | ||
n.innerText=user[0].innerText+" [Offine]"+"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅦🅗🅐🅣🅢🅐🅟🅟\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅜🅞🅝🅘🅣🅞🅡"; | ||
n.style.color="red"; | ||
|
||
flag=1; | ||
} | ||
} | ||
catch(error) { | ||
console.error("User offline"); | ||
n.innerText=user[0].innerText+" [Offine]"+"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅦🅗🅐🅣🅢🅐🅟🅟\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0🅜🅞🅝🅘🅣🅞🅡"; | ||
n.style.color="red"; | ||
flag=1 | ||
} | ||
|
||
var flag="" | ||
chrome.storage.local.get('flag', function (result) { | ||
flag = result.flag; | ||
if(flag==1){trackuser();} | ||
|
||
}); | ||
|
||
|
||
}, 3000); | ||
|
||
} | ||
trackuser() |
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,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Whatsapp Monitor</title> | ||
|
||
|
||
|
||
|
||
</head> | ||
<body style="width: 900px height:800px"> | ||
|
||
|
||
<h1> | ||
|
||
<center><button id="start"; style="border-radius:40px;height:80px;width:150px;background-color:green;">Start</button></center> | ||
<script type="text/javascript" src="popup.js"></script> | ||
|
||
<center> | ||
|
||
|
||
<h3>Open Contact Chat Window on WhatsApp Web</h3><br> | ||
|
||
|
||
|
||
|
||
<a href="https://github.com/rizwansoaib/whatsapp-monitor" target="_blank">About WhatsApp Monitor</a> | ||
|
||
|
||
</center> | ||
|
||
|
||
</h1> | ||
|
||
</body> | ||
</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,44 @@ | ||
|
||
function start() { | ||
|
||
b.innerText='Stop'; | ||
|
||
b.style.backgroundColor="red"; | ||
|
||
chrome.storage.local.set({ | ||
'flag': 1 | ||
|
||
}); | ||
|
||
chrome.tabs.executeScript({ | ||
file: 'online.js' | ||
}); | ||
|
||
} | ||
|
||
|
||
function stop() { | ||
|
||
chrome.storage.local.set({ | ||
'flag': 0 | ||
|
||
}); | ||
|
||
|
||
|
||
} | ||
|
||
function get() | ||
{ | ||
b=document.getElementById('start') | ||
if(b.innerText=='Start'){start();} | ||
else{stop();b.innerText='Start';b.style.backgroundColor="green";} | ||
|
||
} | ||
|
||
document.getElementById('start').addEventListener('click', get); | ||
|
||
|
||
|
||
|
||
|
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 @@ | ||
alert("You have WhatsApp Monitor Extension installed\nOpen Contacts Chat Window click extension then Start"); |