rizwansoaib / whatsapp-monitor

Free Whatsapp Online Tracker App Android,iOS, Windows, Linux,MACπŸ“² | WhatsApp last seen tracker | [Get Notification πŸ”” and history πŸ“œ of Online WhatsApp Contact]
https://wpmonitor.online
GNU General Public License v3.0
1.05k stars 202 forks source link

the interface buttons have moved to the side #223

Open Azrael1980 opened 3 weeks ago

Azrael1980 commented 3 weeks ago

Win 10 Chrome browser

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

rizwansoaib commented 2 days ago

@Azrael1980 please let me know once you get updates latest version and this issue is resolved or not yet

Azrael1980 commented 2 days ago

@Azrael1980 please let me know once you get updates latest version and this issue is resolved or not yet

not work( no icons, no writing logs to site

3.2 version, not log to site too (((

Azrael1980 commented 2 days ago

Uncaught TypeError: Cannot read properties of null (reading 'parentElement')

var nno="" var nkey; chrome.storage.local.get('nno', function (myresult) { nno = myresult.nno; console.log("nno val in online.js",nno); if(nno==2){

var mnkey="" chrome.storage.local.get('mnkey', function (result2) { mnkey = result2.mnkey; console.log("mnkey val from online.js",mnkey,typeof(mnkey))

      if(mnkey != "undefined"){
        alert("Subcribe any Device for Notification\n"+mnkey)
        nkey=mnkey;
      }

    });

    }

}); 

console.log("nno val from online.js",nno);

pso="" chrome.storage.local.get('pso', function (result3) { pso = result3.pso;

});

console.log("pso val from online.js",pso);

function onotif(user) { if(nkey==null||nkey==undefined||nkey==""||nkey=="undefined") return else{ var xhr = new XMLHttpRequest(); xhr.open("POST", nkey,true); xhr.send("πŸ“±WhatsApp Monitor: "+user+" is Online")

}

}

function save(user,t1,t2,t){ var d = new Date(); var curd=d.toLocaleDateString("en-GB").split(' ')[0] user=user.replace(/[^a-zA-Z0-9]/g, "") curd=curd.replace(/[^a-zA-Z0-9]/g, "")

const surl='https://wpmonitor.online/save/'+user+'/'+curd+'/'+t1+'/'+t2+'/'+t var xhr = new XMLHttpRequest(); xhr.open("GET",surl); xhr.send()

}

function playsound() {

let url = chrome.runtime.getURL('open.mp3') let a = new Audio(url) a.play()

}

setInterval(function(){ try{ olb=document.querySelector('#online_list_btn').innerText if(olb=='true' && pso=='3') {

  playsound();
}
prev=document.querySelectorAll('#userbtn')[0].innerHTML
if(prev!='null'&&pso=='1')
{
  playsound();
}

} catch(err){}

try{ olb=document.querySelector('#online_list_btn').innerText if(olb=='true' && pso=='3') {

  playsound();
}

user=document.querySelectorAll('#contactbtn')[0].innerHTML; if(user!='null') onotif(user); } catch(err){}

},2200)

function dcsv2() { console.log("Downloading History as CSV File") var rows = document.body.querySelectorAll(' table' + ' tr'); var csv = []; for (var i = 0; i < rows.length; i++) { var row = [], cols = rows[i].querySelectorAll('td, th'); for (var j = 0; j < cols.length; j++) { var data = cols[j].innerText.replace(/(\r\n|\n|\r)/gm, '').replace(/(\s\s)/gm, ' ') row.push('"' + data + '"'); } csv.push(row.join(';')); } var csv_string = csv.join('\n');

var filename = `whatsapp-monitor_${new Date().toISOString().split('T')[0]}&&${new Date().toLocaleTimeString()}.csv`;
var link = document.createElement('a');
link.style.display = 'none';
link.setAttribute('target', '_blank');
link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv_string));
link.setAttribute('download', filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);

 /*

console.log(csv,csv_string); // Save the CSV file. var blob = new Blob([csv], {type: 'text/csv'}); var url = window.URL.createObjectURL(blob); var link = document.createElement('a'); console.log(link,url); link.href = url; link.download = 'table.csv'; document.body.appendChild(link); link.click(); document.body.removeChild(link);

*/

}

chrome.storage.local.get('save_interval', function (result4) { save_interval = parseInt(result4.save_interval); if(save_interval>=1) setInterval(dcsv2,save_interval*60000);

});

function isElementPresentById(id) { return document.getElementById(id) !== null; }

function exec_after_delay(){

const element_present =document.querySelector('div[aria-label="Status"]').parentElement.parentElement;
if(element_present && !(isElementPresentById('download')))
{

    var elementHeight = "30px";

    var btn = document.createElement("BUTTON");
    var btnImage = document.createElement("IMG");

    btnImage.src = "https://raw.githubusercontent.com/rizwansoaib/whatsapp-monitor/master/Chrome-Extension/WhatsApp%20Monitor/images/icons/csv_download.jpg";

    btnImage.style.height = elementHeight;
    btn.appendChild(btnImage);
    btn.id="download";
    element_present.appendChild(btn);

    /*
    var img=document.createElement("IMG");
    img.id="download"
    img.src="https://raw.githubusercontent.com/rizwansoaib/whatsapp-monitor/master/Chrome-Extension/WhatsApp%20Monitor/images/icons/csv_download.jpg"
    document.querySelector("#side > header").appendChild(img);
    */

    var img=document.createElement("IMG");
    img.src="https://raw.githubusercontent.com/rizwansoaib/whatsapp-monitor/master/Chrome-Extension/WhatsApp%20Monitor/images/icons/icon_gray.png"
    img.style.height = elementHeight;
    img.addEventListener("click", function() {
        chrome.runtime.sendMessage({ action: "open_popup" });
    });
    element_present.appendChild(img);

    console.log('background online.js loaded successfully');

    document.getElementById('download').addEventListener('click', dcsv2);

}

else{
    setTimeout(exec_after_delay,60000);
}

}

setTimeout(exec_after_delay,20000);

var numarray=[] chrome.storage.sync.get('numarray', function (data) { numarray = data.numarray; if(numarray) {

      //console.log('start',numarray);

    numarray.forEach(function(obj, index) {
      setTimeout(function(){
        openChat(obj)
      }, 5000 * (index + 1));
  });

    }

});

var openChat = phone => {

 // console.log('opening chat...',phone);
  var link = document.createElement("a");
  link.setAttribute("href", `whatsapp://send?phone=${phone}`);
  document.body.append(link);
  link.click();
  document.body.removeChild(link);
};

/* chrome.tabs.query({active: true, currentWindow: true}).then(([tab]) => { chrome.scripting.executeScript( { target: {tabId: tab.id}, files: ['websocket.js'], // function: () => {}, // files or function, both do not work. }) })

chrome.tabs.query({active: true, currentWindow: true}).then(([tab]) => { chrome.scripting.executeScript( { target: {tabId: tab.id}, files: ['protobuf.js'], // function: () => {}, // files or function, both do not work. }) })

chrome.tabs.query({active: true, currentWindow: true}).then(([tab]) => { chrome.scripting.executeScript( { target: {tabId: tab.id}, files: ['main.js'], // function: () => {}, // files or function, both do not work. }) })

*/

rizwansoaib commented 2 days ago

@Azrael1980 please let me know once you get updates latest version and this issue is resolved or not yet

not work( no icons, no writing logs to site

3.2 version, not log to site too (((

I have updated in version 3.3 soon after publish by Google in chrome webstore it will update extension automatically

rizwansoaib commented 2 days ago

Temporary solution to use new version 3.3

https://github.com/rizwansoaib/whatsapp-monitor/tree/master/Chrome-Extension

Features - 1.Now no need to open extension everytime when you open whatsapp it will start automatically if user is logged in WhatsApp Web

  1. No need to move mouse only should be open whatsapp web main screen all time

Let me know if anyone facing issue unfortunately I didn't tested it more so may be face issue on based on os, chrome version just type your issue here we will try to fix those issues in future updates

Azrael1980 commented 1 day ago

3.2 works well, but the buttons are on the side. Which doesn't bother me. 3.3 Still doesn't work, writes errors

rizwansoaib commented 1 day ago

3.2 works well, but the buttons are on the side. Which doesn't bother me. 3.3 Still doesn't work, writes errors

How you are able to use 3.3 its not published on Chrome web store?

Have you tried from release section zip file?

rizwansoaib commented 1 day ago

Are you using Whatsapp business?

I have tested the issue is for different version have different UI on whatsapp web in my Whatsapp there is sidebar on whatsapp web for chat,status, setting,profile, meta ai chat

I think in your whatsapp web there is no sidebar

Azrael1980 commented 1 day ago

3.2 Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ Ρ…ΠΎΡ€ΠΎΡˆΠΎ, Π½ΠΎ ΠΊΠ½ΠΎΠΏΠΊΠΈ сбоку. Π§Ρ‚ΠΎ мСня Π½Π΅ бСспокоит. 3.3 ВсС Ρ€Π°Π²Π½ΠΎ Π½Π΅ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚, ΠΏΠΈΡˆΠ΅Ρ‚ ошибки

Как Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ Π²Π΅Ρ€ΡΠΈΡŽ 3.3, которая Π½Π΅ ΠΎΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½Π° Π² ΠΈΠ½Ρ‚Π΅Ρ€Π½Π΅Ρ‚-ΠΌΠ°Π³Π°Π·ΠΈΠ½Π΅ Chrome?

Π’Ρ‹ ΠΏΡ€ΠΎΠ±ΠΎΠ²Π°Π»ΠΈ ΠΈΠ· zip-Ρ„Π°ΠΉΠ»Π° Ρ€Π°Π·Π΄Π΅Π»Π° выпуска?

YES

rizwansoaib commented 1 day ago

Screenshot_2024-11-04-13-50-53-52_40deb401b9ffe8e1df2f1cc5ba480b12

Whatsapp Web SideBar

Azrael1980 commented 1 day ago

I use a regular WhatsApp, you can see the sidebar in the picture. This works with version 3.2 On version 3.3 the sidebar is not visible.

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

Azrael1980 commented 1 day ago

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ 3.3 error

rizwansoaib commented 1 day ago

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ 3.3 error

Click on next parent element error

Azrael1980 commented 1 day ago

Click on next parent element error

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

rizwansoaib commented 1 day ago

I will try to fix in next updates this error

Within 5 days

Azrael1980 commented 1 day ago

Thanks

rizwansoaib commented 1 day ago

Thanks

Please update your whatsapp in smartphone

Maybe I am on latest version of Whatsapp so sidebar is showing

Azrael1980 commented 1 day ago

photo_2024-11-04_11-45-16 Latest version for Russia)

rizwansoaib commented 1 day ago

Ok i got that I have beta

Screenshot_2024-11-04-14-43-31-01_6012fa4d4ddec268fc5c7112cbb265e7

Now I will try to fix bug based on your whatsapp version

Thank you for sending screenshot

rizwansoaib commented 21 hours ago

chromev3.3_new.zip

This is alpha development version

@Azrael1980 please can you check by using extension in developer mode

Azrael1980 commented 21 hours ago

chromev3.3_new.zip

Π­Ρ‚ΠΎ Π°Π»ΡŒΡ„Π°-вСрсия Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ

@Azrael1980 поТалуйста, ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π»ΠΈ Π²Ρ‹ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒ, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡ Ρ€Π°ΡΡˆΠΈΡ€Π΅Π½ΠΈΠ΅ Π² Ρ€Π΅ΠΆΠΈΠΌΠ΅ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠ°

Everything works. You need to enable the extension. You don't need to move the mouse anymore. Cool

rizwansoaib commented 19 hours ago

Even don't need to enable extension now from version 3.3 no need to open extension popup every time or click ok

Only need to open WhatsApp web and open contact chat ( or add contacts in favourite to open chat automatically)

rizwansoaib commented 19 hours ago

Please check this also just close browser, open browser, open Whatsapp web

Once Whatsapp web will open automatically monitoring will start

Azrael1980 commented 18 hours ago

No. If I don't launch the application, it goes to WhatsApp error

Azrael1980 commented 18 hours ago

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

rizwansoaib commented 18 hours ago

Refresh url at whatsapp web opened already

Wait for 30 sec if (icon of CSV downloader, Extension icon) in chat header its mean its working

Please try above steps

If not working this send me console error( Ctrl+shift+c then console tab) or browser extension error ( chrome://extensions)

Azrael1980 commented 18 hours ago

web.whatsapp.com-1730805808109.log

I clear phone numbers

rizwansoaib commented 17 hours ago

From log i think there should be no issue

@Azrael1980 does after refresh Whatsapp web after 30 sec extension icon and CSV downloader appeared in chat header ?

Azrael1980 commented 17 hours ago

From log i think there should be no issue

@Azrael1980 does after refresh Whatsapp web after 30 sec extension icon and CSV downloader appeared in chat header ?

No

rizwansoaib commented 15 hours ago

Ok

I need to test it more on different devices,version,os etc.

I will update here if I found any bug or feature not working